Compare commits

..

No commits in common. "f433f725cd42428f6437f303ade0f1a89a386fd1" and "f87e508efd48d5196c89c86582f0971decef07c0" have entirely different histories.

48 changed files with 2018 additions and 2593 deletions

View File

@ -39,28 +39,25 @@
"type-check": "vue-tsc --noEmit" "type-check": "vue-tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-app": "3.0.0-3081220230817001",
"@dcloudio/uni-app-plus": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-app-plus": "3.0.0-3081220230817001",
"@dcloudio/uni-components": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-components": "3.0.0-3081220230817001",
"@dcloudio/uni-h5": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-h5": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-mp-alipay": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-mp-baidu": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-jd": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-mp-jd": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-mp-kuaishou": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-mp-lark": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-mp-qq": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-mp-toutiao": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-mp-weixin": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-xhs": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-quickapp-webview": "3.0.0-3081220230817001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-ui": "^1.5.2", "@dcloudio/uni-ui": "^1.5.2",
"@esbuild/darwin-x64": "^0.20.2",
"@rollup/rollup-darwin-x64": "^4.17.2",
"amfe-flexible": "^2.2.1", "amfe-flexible": "^2.2.1",
"clipboard": "^2.0.11", "clipboard": "^2.0.11",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"echarts": "^5.5.0", "echarts": "^5.5.0",
"esbuild": "^0.20.2", "esbuild": "0.17.19",
"luch-request": "^3.1.1", "luch-request": "^3.1.1",
"pinia": "2.0.33", "pinia": "2.0.33",
"pinia-plugin-persistedstate": "^3.2.1", "pinia-plugin-persistedstate": "^3.2.1",
@ -68,26 +65,26 @@
"underscore": "^1.13.6", "underscore": "^1.13.6",
"unplugin-auto-import": "^0.17.3", "unplugin-auto-import": "^0.17.3",
"uview-plus": "^3.2.14", "uview-plus": "^3.2.14",
"vue": "^3.4.27", "vue": "^3.2.45",
"vue-i18n": "^9.13.1" "vue-i18n": "^9.1.9"
}, },
"devDependencies": { "devDependencies": {
"@dcloudio/types": "^3.4.8", "@dcloudio/types": "^3.3.2",
"@dcloudio/uni-automator": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-automator": "3.0.0-3081220230817001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-cli-shared": "3.0.0-3081220230817001",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-4010520240507001", "@dcloudio/uni-stacktracey": "3.0.0-3081220230817001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-4010520240507001", "@dcloudio/vite-plugin-uni": "3.0.0-3081220230817001",
"@types/node": "^20.11.22", "@types/node": "^20.11.22",
"@types/underscore": "^1.11.15", "@types/underscore": "^1.11.15",
"@types/wechat-miniprogram": "^3.4.7", "@types/wechat-miniprogram": "^3.4.7",
"@uni-helper/uni-app-types": "^0.5.12", "@uni-helper/uni-app-types": "^0.5.12",
"@uni-helper/uni-ui-types": "^0.5.11", "@uni-helper/uni-ui-types": "^0.5.11",
"@vue/runtime-core": "^3.4.27", "@vue/runtime-core": "^3.2.45",
"@vue/tsconfig": "^0.1.3", "@vue/tsconfig": "^0.1.3",
"sass": "^1.69.7", "sass": "^1.69.7",
"sass-loader": "10", "sass-loader": "10",
"typescript": "^4.9.4", "typescript": "^4.9.4",
"vite": "5.2.8", "vite": "4.1.4",
"vue-tsc": "^1.0.24" "vue-tsc": "^1.0.24"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app"; import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
const isFirstLaunch = ref(true);
onLaunch(() => { onLaunch(() => {
console.log("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");
@ -24,9 +12,9 @@ onHide(() => {
</script> </script>
<style lang="scss"> <style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */ /* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "uview-plus/index.scss"; @import "uview-plus/index.scss";
body { body {
font-size: 12px; font-size: 12px;
} }
</style> </style>

View File

@ -56,9 +56,8 @@ import Title from "@/components/Title/index.vue";
import TabBar from "@/components/TabBar/index.vue"; import TabBar from "@/components/TabBar/index.vue";
import { useMemberStore } from "@/store/index"; import { useMemberStore } from "@/store/index";
import { ProfileApi } from "@/services"; import { ProfileApi } from "@/services";
import pinia from '@/store'
const store = useMemberStore(pinia); const store = useMemberStore();
const list = reactive([ const list = reactive([
{ {
title: "收货", title: "收货",

View File

@ -71,7 +71,7 @@
<view class="num">{{ <view class="num">{{
formatMoney(state.summary.totalPaidPrice) formatMoney(state.summary.totalPaidPrice)
}}</view> }}</view>
<view>已付金额</view> <view>实收金额</view>
</view> </view>
</up-col> </up-col>
<up-col span="4"> <up-col span="4">

View File

@ -1,6 +1,6 @@
<template> <template>
<view <view
:class="{ box: isShow }" :class="{'box': isShow}"
:style="{ :style="{
marginTop: navbarRect.height + navbarRect.top + 'px', marginTop: navbarRect.height + navbarRect.top + 'px',
height: navbarRect.safeHeight + 'px', height: navbarRect.safeHeight + 'px',
@ -15,7 +15,7 @@ const props = withDefaults(
isShow: boolean; isShow: boolean;
}>(), }>(),
{ {
isShow: false, isShow: false
} }
); );
const navbarRect = reactive({ const navbarRect = reactive({
@ -39,17 +39,12 @@ const getSafeHeight = () => {
// #endif // #endif
}; };
onMounted(() => { onMounted(() => {
// #ifdef MP-WEIXIN // #ifdef APP-PLUS || MP-WEIXIN
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
navbarRect.height = menuButtonInfo.height; navbarRect.height = menuButtonInfo.height;
navbarRect.top = menuButtonInfo.top; navbarRect.top = menuButtonInfo.top;
getSafeHeight(); getSafeHeight();
// #endif // #endif
// #ifndef MP-WEIXIN
const systemInfo = uni.getSystemInfoSync();
navbarRect.safeHeight = (systemInfo.safeArea as any).height;
getSafeHeight();
// #endif
}); });
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -30,14 +30,12 @@ const props = withDefaults(
show: false show: false
} }
); );
const emit = defineEmits(["handleModal", "handleOk", "handleCancel"]); const emit = defineEmits(["handleModal", "handleOk"]);
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>

View File

@ -22,47 +22,19 @@
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { import { ProfileApi,ReceiveApi,ShipmentApi,PictureApi,ReceiveProductApi,DeviceApi,StockCardApi,GoodsApi,SupplierApi,CustomerApi,FinanceApi,MessageApi } from '@/services';
ProfileApi,
ReceiveApi,
ShipmentApi,
PictureApi,
ReceiveProductApi,
DeviceApi,
StockCardApi,
GoodsApi,
SupplierApi,
CustomerApi,
FinanceApi,
MessageApi,
} from "@/services";
import { formatDate } from "@/utils"; import { formatDate } from "@/utils";
import { UsersType } from "@/utils/enum"; import { UsersType } from "@/utils/enum";
import valid from "@/utils/validate"; import valid from "@/utils/validate";
console.log( console.log(ProfileApi,ReceiveApi,ShipmentApi,PictureApi,ReceiveProductApi,DeviceApi,StockCardApi,GoodsApi,SupplierApi,CustomerApi,FinanceApi,formatDate,UsersType, valid)
ProfileApi,
ReceiveApi,
ShipmentApi,
PictureApi,
ReceiveProductApi,
DeviceApi,
StockCardApi,
GoodsApi,
SupplierApi,
CustomerApi,
FinanceApi,
formatDate,
UsersType,
valid
);
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
count: number; count: number,
title: string; title: string
}>(), }>(),
{ {
count: 0, count: 0
} }
); );
@ -72,7 +44,7 @@ const navbarRect = reactive({
msgCount: 10, msgCount: 10,
}); });
onMounted(() => { onMounted(() => {
// #ifdef MP-WEIXIN // #ifdef APP-PLUS || MP-WEIXIN
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
navbarRect.height = menuButtonInfo.height; navbarRect.height = menuButtonInfo.height;
navbarRect.top = menuButtonInfo.top; navbarRect.top = menuButtonInfo.top;

View File

@ -21,7 +21,7 @@ const navbarRect = reactive({
}); });
onMounted(() => { onMounted(() => {
// #ifdef MP-WEIXIN // #ifdef APP-PLUS || MP-WEIXIN
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
navbarRect.height = menuButtonInfo.height; navbarRect.height = menuButtonInfo.height;
navbarRect.top = menuButtonInfo.top; navbarRect.top = menuButtonInfo.top;

View File

@ -86,7 +86,7 @@ watch(
// ,{ deep: true, immediate:true} // ,{ deep: true, immediate:true}
onLoad(() => { onLoad(() => {
// #ifdef APP-PLUS || MP-WEIXIN || H5 // #ifdef APP-PLUS || MP-WEIXIN
getClineHeight(); getClineHeight();
// #endif // #endif
}); });

View File

@ -1,96 +1,85 @@
{ {
"name" : "在生万有", "name": "",
// DCloud ios // DCloud ios
"appid" : "__UNI__898003A", "appid": "",
"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": {
"ignoreVersion": false, "usingComponents": true,
"usingComponents" : true, "nvueStyleCompiler": "uni-app",
"nvueStyleCompiler" : "uni-app", "compilerVersion": 3,
"compilerVersion" : 3, "splashscreen": {
"splashscreen" : { "alwaysShowBeforeRender": true,
"alwaysShowBeforeRender" : true, "waiting": true,
"waiting" : true, "autoclose": true,
"autoclose" : true, "delay": 0
"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"
}
}
}
}, },
/* */ /* */
"quickapp" : {}, "modules": {},
// h5 /* */
"h5" : { "distribute": {
"router" : { /* android */
"base" : "./" "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
}, },
/* */ "usingComponents": true,
"mp-weixin" : { "optimization": {
"appid" : "wx9251d74fe0e87028", "subPackages": true //
"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"
}, },
"mp-alipay" : { "lazyCodeLoading": "requiredComponents"
"usingComponents" : true },
}, "mp-alipay": {
"mp-baidu" : { "usingComponents": true
"usingComponents" : true },
}, "mp-baidu": {
"mp-toutiao" : { "usingComponents": true
"usingComponents" : true },
}, "mp-toutiao": {
"uniStatistics" : { "usingComponents": true
"enable" : false },
}, "uniStatistics": {
"vueVersion" : "3" "enable": false
},
"vueVersion": "3"
} }

View File

@ -241,7 +241,13 @@
"style": { "style": {
"navigationBarTitleText": "客户详情" "navigationBarTitleText": "客户详情"
} }
} },
// {
// "path": "uni_modules/lime-echart",
// "style": {
// "navigationBarTitleText": "组件库"
// }
// }
] ]
}, },
{ {

View File

@ -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: true, name: "手工补单" }, { key: false, name: "补单" },
{ key: false, name: "系统单" }, { key: true, name: "未补单" },
]; ];
const deliveryMethod = ref<any>(null); const deliveryMethod = ref<any>(null);
const deliveryMethodBtnList = [ const deliveryMethodBtnList = [
@ -441,7 +441,7 @@ const getFilter = () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box { .box {
padding: 60rpx 30rpx 150rpx; padding: 60rpx 30rpx;
::v-deep .u-cell__value { ::v-deep .u-cell__value {
font-size: 26rpx; font-size: 26rpx;
} }

View File

@ -32,9 +32,7 @@
:customStyle="{}" :customStyle="{}"
border="none" border="none"
:disabled="item.type === 'select'" :disabled="item.type === 'select'"
:disabledColor=" :disabledColor="['卡号'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
['卡号'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
"
@clear="handleClear(item)" @clear="handleClear(item)"
> >
<template #suffix> <template #suffix>
@ -63,16 +61,6 @@
<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";
@ -80,22 +68,9 @@ 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";
import SmallModal from "@/components/Modal/smallModal.vue"; const handleClear = (item:any) => {
const isShowCancelModal = ref(false); (model1.formData as any)[item.key] = '';
}
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: {},
}); });
@ -141,8 +116,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 = "卡号";
@ -190,47 +165,36 @@ 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(v); startSave();
} }
}); });
}; };
const startSave = () => {
const startSave = (v: boolean) => {
if (model1.formData.id) { if (model1.formData.id) {
CustomerApi.updateCustomUser({ ...model1.formData, delCard: v }).then((res) => { CustomerApi.updateCustomUser(model1.formData).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({ StockCardApi.getStockCardListInfo({ vincolante: StockCardType.Shipment }).then((res) => {
vincolante: StockCardType.Shipment,
}).then((res) => {
if (res.code === 200) { if (res.code === 200) {
contrlModalParams.stockCard.list = (res.data as any).map((item: any) => { contrlModalParams.stockCard.list = (res.data as any).map(
return { ...item, name: item.cardCode }; (item: any) => {
}); return { ...item, name: item.cardCode };
}
);
} }
}); });
}; };

View File

@ -159,7 +159,7 @@ const startSave = () => {
if (model1.formData.id) { if (model1.formData.id) {
GoodsApi.editShipmentCategory({ GoodsApi.editShipmentCategory({
id: model1.formData.id, id: model1.formData.id,
shmCategoryName: model1.formData.shmCategoryName, shmCategoryName: model1.formData.name,
parentId: model1.formData.parentId, parentId: model1.formData.parentId,
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {

View File

@ -3,7 +3,7 @@
<u-form <u-form
labelPosition="left" labelPosition="left"
:model="model1" :model="model1"
:rules="model1.formData.id ? rules1 : rules2" :rules="rules"
ref="form" ref="form"
:labelWidth="100" :labelWidth="100"
:labelStyle="{ padding: '0rpx 10rpx' }" :labelStyle="{ padding: '0rpx 10rpx' }"
@ -33,11 +33,7 @@
border="none" border="none"
@change="(e:any) => {handleInput(e, item)}" @change="(e:any) => {handleInput(e, item)}"
:disabled="item.type === 'select'" :disabled="item.type === 'select'"
:disabledColor=" :disabledColor="['卡号', '供应商分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
['卡号', '供应商分类'].indexOf(item.name) > -1
? '#ffffff'
: '#f5f7fa'
"
@clear="handleClear(item)" @clear="handleClear(item)"
> >
<template #suffix> <template #suffix>
@ -64,19 +60,8 @@
</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";
@ -85,23 +70,11 @@ 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 handleClear = (item:any) => {
const isShowCancelModal = ref(false); (model1.formData as any)[item.key] = '';
}
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) => { 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, ""); const temp = e?.replace(valid.valid_number, "");
setTimeout(() => { setTimeout(() => {
model1.formData[item.key] = temp; model1.formData[item.key] = temp;
@ -111,21 +84,7 @@ const handleInput = (e: any, item: any) => {
const model1 = reactive<any>({ const model1 = reactive<any>({
formData: {}, formData: {},
}); });
const rules1 = ref({ const rules = 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": { "formData.stockCardName": {
type: "string", type: "string",
required: true, required: true,
@ -168,11 +127,11 @@ const formAttrList = reactive<any>([
key: "stockCardName", key: "stockCardName",
type: "select", type: "select",
childKey: "stockCard", childKey: "stockCard",
// 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 = "卡号";
@ -293,44 +252,23 @@ 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(v); startSave();
} }
}); });
}; };
const startSave = (v: boolean) => { const startSave = () => {
if (model1.formData.id) { if (model1.formData.id) {
SupplierApi.updateSupplierUser({ ...model1.formData, delCard: v }).then( SupplierApi.updateSupplierUser(model1.formData).then((res) => {
(res) => { if (res.code === 200) {
if (res.code === 200) { uni.navigateBack()
// uni.navigateBack(); }
uni.navigateBack({ });
delta: 1,
success: (res) => {
uni.$emit("pricingParams", {
name: model1.formData.name
});
},
});
}
}
);
} else { } else {
SupplierApi.addSupplierUser(model1.formData).then((res) => { SupplierApi.addSupplierUser(model1.formData).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.navigateBack(); uni.navigateBack()
} }
}); });
} }
@ -345,17 +283,15 @@ const getSupplierTypeList = () => {
}; };
const getStockCardList = () => { const getStockCardList = () => {
StockCardApi.getStockCardListInfo({ vincolante: StockCardType.Receive }).then( StockCardApi.getStockCardListInfo({ vincolante: StockCardType.Receive }).then((res) => {
(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 }; }
} );
);
}
} }
); });
}; };
onMounted(() => { onMounted(() => {
@ -363,24 +299,12 @@ onMounted(() => {
getStockCardList(); getStockCardList();
}); });
onLoad((option: any) => { onLoad((option) => {
// //
const title = option.title; const title = (option as any).title;
SupplierApi.getSupplierUserList({ id: option.item }).then((res: any) => { model1.formData = JSON.parse((option as any).item);
if (res.code === 200) { if (model1.formData.cardCode) {
if (res.data.length > 0) { model1.formData.stockCardName = model1.formData.cardCode;
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({ uni.setNavigationBarTitle({

View File

@ -3,7 +3,7 @@
<u-form <u-form
labelPosition="left" labelPosition="left"
:model="model1" :model="model1"
:rules="model1.formData.id ? rules2 : rules1" :rules="rules"
ref="form" ref="form"
:labelWidth="100" :labelWidth="100"
:labelStyle="{ padding: '0rpx 10rpx' }" :labelStyle="{ padding: '0rpx 10rpx' }"
@ -13,7 +13,7 @@
:prop="`formData.${item.key}`" :prop="`formData.${item.key}`"
:label="item.name" :label="item.name"
:required="item.required" :required="item.required"
v-for="(item, index) in model1.formData.id ? formAttrList2 : formAttrList1" v-for="(item, index) in formAttrList"
:key="index" :key="index"
@click="item.fn" @click="item.fn"
> >
@ -32,12 +32,10 @@
clearable clearable
:customStyle="{}" :customStyle="{}"
border="none" border="none"
:maxlength="item.key === 'password' ? 8 : -1" :maxlength="item.key === 'password' ? 6 : -1"
@change="(e:any) => {handleInput(e, item)}" @change="(e:any) => {handleInput(e, item)}"
:disabled="item.type === 'select'" :disabled="item.type === 'select'"
:disabledColor=" :disabledColor="['性别', '用户角色'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
['性别', '用户角色'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
"
@clear="handleClear(item)" @clear="handleClear(item)"
> >
<template #suffix> <template #suffix>
@ -51,7 +49,7 @@
</template> </template>
</u-form-item> </u-form-item>
</u-form> </u-form>
<block v-for="(item, index) in model1.formData.id ? formAttrList2 : formAttrList1" :key="index"> <block v-for="(item, index) in formAttrList" :key="index">
<u-action-sheet <u-action-sheet
v-if="item.type === 'select'" v-if="item.type === 'select'"
:actions="contrlModalParams[item.childKey].list" :actions="contrlModalParams[item.childKey].list"
@ -74,9 +72,9 @@ 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";
const handleClear = (item: any) => { const handleClear = (item:any) => {
(model1.formData as any)[item.key] = ""; (model1.formData as any)[item.key] = '';
}; }
const handleInput = (e: any, item: any) => { const handleInput = (e: any, item: any) => {
if (item.key === "phone") { if (item.key === "phone") {
const temp = e?.replace(valid.valid_number, ""); const temp = e?.replace(valid.valid_number, "");
@ -84,23 +82,12 @@ const handleInput = (e: any, item: any) => {
model1.formData[item.key] = temp; model1.formData[item.key] = temp;
}, 10); }, 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>({ const model1 = reactive<any>({
formData: {}, formData: {
});
const rules1 = ref({
"formData.roleName": {
type: "string",
required: true,
message: "请选择用户角色",
trigger: ["blur", "change"],
}, },
});
const rules = ref({
"formData.userName": { "formData.userName": {
type: "string", type: "string",
required: true, required: true,
@ -114,20 +101,6 @@ const rules1 = ref({
trigger: ["blur", "change"], 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>({ const contrlModalParams = reactive<any>({
role: { role: {
isShow: false, isShow: false,
@ -150,7 +123,7 @@ const contrlModalParams = reactive<any>({
}, },
}); });
const formAttrList1 = reactive<any>([ const formAttrList = reactive<any>([
{ {
name: "姓名", name: "姓名",
key: "name", key: "name",
@ -171,7 +144,6 @@ const formAttrList1 = reactive<any>([
key: "roleName", key: "roleName",
type: "select", type: "select",
childKey: "role", childKey: "role",
required: true,
fn: () => { fn: () => {
contrlModalParams.role.isShow = true; contrlModalParams.role.isShow = true;
contrlModalParams.role.title = "选择角色"; contrlModalParams.role.title = "选择角色";
@ -196,46 +168,6 @@ const formAttrList1 = 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) => { const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false; contrlModalParams[key].isShow = false;
if (key === "role") { if (key === "role") {
@ -273,18 +205,6 @@ const save = () => {
return; 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) => { check().then((res) => {
if (res) { if (res) {
startSave(); startSave();
@ -294,22 +214,15 @@ const save = () => {
const startSave = () => { const startSave = () => {
if (model1.formData.id) { if (model1.formData.id) {
ProfileApi.updateUserById({ ProfileApi.updateUserById(model1.formData).then((res) => {
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) { if (res.code === 200) {
uni.navigateBack(); uni.navigateBack()
} }
}); });
} else { } else {
ProfileApi.addUser({ userType: 1, ...model1.formData }).then((res) => { ProfileApi.addUser({ userType: 1, ...model1.formData }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.navigateBack(); uni.navigateBack()
} }
}); });
} }
@ -333,11 +246,11 @@ onMounted(() => {
onLoad((option) => { onLoad((option) => {
// ; // ;
const title = (option as any).title; const title = (option as any).title;
const obj = JSON.parse((option as any).item); const obj = JSON.parse((option as any).item)
model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] }; model1.formData = {...obj, genderName: ['未知','男','女'][obj.gender]};
if (obj.roleVos.length > 0) { if (obj.roleVos.length > 0) {
model1.formData.roleIds = [obj.roleVos[0].id]; model1.formData.roleIds = [obj.roleVos[0].id]
model1.formData.roleName = obj.roleVos[0].roleName; model1.formData.roleName = obj.roleVos[0].roleName
} }
// ; // ;
if (title) { if (title) {

View File

@ -29,7 +29,7 @@
>{{ obj.paymentType === 0 ? "收货" : "出货" }}单号 >{{ obj.paymentType === 0 ? "收货" : "出货" }}单号
<text>{{ obj.orderNumber }}</text></view <text>{{ obj.orderNumber }}</text></view
> >
<up-image :show-loading="true" v-for="(item, index) in state.fileLists" :key="index" :src="item.url" width="80px" height="80px"></up-image> <up-image :show-loading="true" v-for="(item, index) in obj.fileLists" :key="index" :src="item.url" width="80px" height="80px"></up-image>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -37,9 +37,6 @@ import { FinanceApi, PictureApi } from "@/services";
import { ImagesType, OrderType } from "@/utils/enum"; import { ImagesType, OrderType } from "@/utils/enum";
import { onLoad } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
const obj = ref<any>({}); const obj = ref<any>({});
const state = reactive<any>({
fileLists: []
})
const getPayment = (item: any) => { const getPayment = (item: any) => {
return ["供应商付款", "客户付款", "客户(手动)", "供应商(手动)"][ return ["供应商付款", "客户付款", "客户(手动)", "供应商(手动)"][
item.paymentType item.paymentType
@ -61,7 +58,7 @@ onLoad((option: any) => {
imagesType: ImagesType.NORMARL, imagesType: ImagesType.NORMARL,
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
state.fileLists = res.data; obj.value.fileLists = res.data;
} }
}); });
}); });

View File

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

View File

@ -97,7 +97,7 @@ const handleSearch = () => {
const update = (item: any) => { const update = (item: any) => {
GoodsApi.deleteReceiveProduct({ id: item.id }).then((res) => { GoodsApi.EditReceiveProduct({ isDeleted: true, id: item.id }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
resetPageList(); resetPageList();
getList(); getList();

View File

@ -94,7 +94,7 @@ const edit = (item: any) => {
}); });
}; };
const deleteType = (item: any) => { const deleteType = (item: any) => {
GoodsApi.deleteReceiveCategory({ id: item.id }).then((res) => { GoodsApi.editReceiveCategory({ isDeleted: true, id: item.id }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
resetPageList(); resetPageList();
getList(); getList();

View File

@ -91,7 +91,7 @@ const add = () => {
const edit = (item: any) => { const edit = (item: any) => {
uni.navigateTo({ uni.navigateTo({
url: url:
"/pagesApp/components/addRole?title=编辑角色&item=" + "/pagesApp/components/addRole?title=新增角色&item=" +
JSON.stringify(item), // JSON.stringify(item), //
}); });
}; };

View File

@ -56,7 +56,7 @@
<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 : "" }}
{{ cItem.name === '送货方式' ? item[`${cItem.enName}`] === DeliveryMethod.Deliver ? '送货' : '自提' : item[`${cItem.enName}`] }} {{ cItem.num }}
{{ cItem.isBefore ? "" : cItem.unit }} {{ cItem.isBefore ? "" : cItem.unit }}
</text> </text>
</view> </view>
@ -68,7 +68,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ReceiveApi, ShipmentApi } from "@/services"; import { ReceiveApi, ShipmentApi } from "@/services";
import PageView from "@/components/PageView/index.vue"; import PageView from "@/components/PageView/index.vue";
import { DeliveryMethod, ScaleStatus } from "@/utils/enum"; import { ScaleStatus } from "@/utils/enum";
const keyword = ref(""); const keyword = ref("");
const gridList1 = reactive([ const gridList1 = reactive([
@ -156,7 +156,7 @@ const gridList1 = reactive([
}, },
{ {
name: "作废人", name: "作废人",
enName: "updateName", enName: "updateUserName",
unit: "", unit: "",
isBefore: false, isBefore: false,
isCustomStyle: true, isCustomStyle: true,

View File

@ -20,24 +20,10 @@
><u-icon name="arrow-down"></u-icon ><u-icon name="arrow-down"></u-icon
></view> ></view>
<view @click="state.isShowStatus = true" <view @click="state.isShowStatus = true"
><text>{{ ><text>单据状态</text><u-icon name="arrow-down"></u-icon
state.currentScaleStatus === -1
? "单据状态"
: getScaleStatus(state.currentScaleStatus)
}}</text
><u-icon name="arrow-down"></u-icon
></view> ></view>
<view @click="state.isShowSort = true" <view @click="state.isShowSort = true"
><text>{{ ><text>排序</text><u-icon name="arrow-down"></u-icon
state.currentSortName === undefined
? "排序"
: `${
state.currentSortName === "create_time"
? "创建时间"
: "更新时间"
}降序`
}}</text
><u-icon name="arrow-down"></u-icon
></view> ></view>
<view class="btn" @click="handleDialog('showFilter', true)">筛选</view> <view class="btn" @click="handleDialog('showFilter', true)">筛选</view>
</view> </view>
@ -106,14 +92,8 @@
<text v-if="cItem.name">{{ cItem.name }}</text <text v-if="cItem.name">{{ cItem.name }}</text
><text ><text
>{{ cItem.isBefore ? cItem.unit : "" }} >{{ cItem.isBefore ? cItem.unit : "" }}
<text <text v-if="item[cItem.enName as string] === DeliveryMethod.Deliver">送货</text>
v-if="item[cItem.enName as string] === DeliveryMethod.Deliver" <text v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup">自提</text>
>送货</text
>
<text
v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup"
>自提</text
>
{{ cItem.isBefore ? "" : cItem.unit }} {{ cItem.isBefore ? "" : cItem.unit }}
</text> </text>
</block> </block>
@ -203,7 +183,7 @@ const state = reactive({
currentSortName: undefined, currentSortName: undefined,
isShowStatus: false, isShowStatus: false,
statusList: [ statusList: [
{ {
name: "全部", name: "全部",
key: -1, key: -1,
}, },
@ -220,20 +200,16 @@ const state = reactive({
key: 2, key: 2,
}, },
{ {
name: "待结算", name: "已审未付",
key: 3, key: 3,
}, },
{ {
name: "已结算", name: "已审已付",
key: 4, key: 4,
}, },
], ],
isShowSort: false, isShowSort: false,
sortList: [ sortList: [
{
name: "全部",
key: undefined,
},
{ {
name: "按创建时间降序", name: "按创建时间降序",
key: "create_time", key: "create_time",
@ -358,9 +334,9 @@ const getScaleStatus = (type: number) => {
} else if (type === ScaleStatus.ToBeShipmentReview) { } else if (type === ScaleStatus.ToBeShipmentReview) {
return "待审核"; return "待审核";
} else if (type === ScaleStatus.ToBeShipmentPay) { } else if (type === ScaleStatus.ToBeShipmentPay) {
return "待结算"; return "待支付";
} else if (type === ScaleStatus.ShipmentPaid) { } else if (type === ScaleStatus.ShipmentPaid) {
return "已结算"; return "已支付";
} }
}; };

View File

@ -109,7 +109,7 @@ const update = (item: any) => {
const edit = (item: any) => { const edit = (item: any) => {
uni.navigateTo({ uni.navigateTo({
url: url:
"/pagesApp/components/addShipmentProduct?title=编辑货产品&item=" + "/pagesApp/components/addShipmentProduct?title=编辑货产品&item=" +
JSON.stringify(item), // JSON.stringify(item), //
}); });
}; };

View File

@ -541,14 +541,6 @@ const save = () => {
return; return;
} }
} }
if (parseFloat(model1.order.tare) > parseFloat(model1.order.grossWeight)) {
uni.showToast({
title: `毛重需大于皮重`,
icon: "none",
});
return;
}
check().then((res) => { check().then((res) => {
if (res) { if (res) {
startSave(); startSave();

View File

@ -30,7 +30,7 @@
<view <view
>{{ >{{
item.type === StockCardType.Shipment ? "客户" : "供应商" item.type === StockCardType.Shipment ? "客户" : "供应商"
}}{{ item.customUserName }}</view }}{{ item.name }}</view
> >
<view>卡号{{ item.cardCode }}</view> <view>卡号{{ item.cardCode }}</view>
<view <view

View File

@ -118,11 +118,10 @@ const update = (item: any) => {
}; };
const edit = (item: any) => { const edit = (item: any) => {
console.log(JSON.stringify(item))
uni.navigateTo({ uni.navigateTo({
url: url:
"/pagesApp/components/addSupplier?title=编辑供应商&item=" + "/pagesApp/components/addSupplier?title=编辑供应商&item=" +
item.id, // JSON.stringify(item), //
}); });
}; };
const getList = (v?: boolean) => { const getList = (v?: boolean) => {

View File

@ -165,9 +165,7 @@ import {
import TabBar from "@/components/TabBar/index.vue"; import TabBar from "@/components/TabBar/index.vue";
import { formatMoney } from "@/utils"; import { formatMoney } from "@/utils";
import { onBackPress, onShow } from "@dcloudio/uni-app"; import { onBackPress, onShow } from "@dcloudio/uni-app";
import pinia from "@/store"; const store = useMemberStore();
const store = useMemberStore(pinia);
const navbarRect = reactive({ const navbarRect = reactive({
height: 32, height: 32,
top: 28, top: 28,
@ -552,17 +550,12 @@ const init = () => {
}); });
}; };
onMounted(() => { onMounted(() => {
// #ifdef MP-WEIXIN // #ifdef APP-PLUS || MP-WEIXIN
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
navbarRect.height = menuButtonInfo.height; navbarRect.height = menuButtonInfo.height;
navbarRect.top = menuButtonInfo.top; navbarRect.top = menuButtonInfo.top;
getSafeHeight(); getSafeHeight();
// #endif // #endif
// #ifndef MP-WEIXIN
const systemInfo = uni.getSystemInfoSync();
navbarRect.safeHeight = (systemInfo.safeArea as any).height;
getSafeHeight();
// #endif
}); });
onShow(() => { onShow(() => {
init(); init();

View File

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

View File

@ -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/logo2.png`" ></image> <image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/logo.png`" height="60rpx"></image>
</view> </view>
<!-- form表单 --> <!-- form表单 -->
<view class="login-form"> <view class="login-form">
@ -16,15 +16,13 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.c-login-container { .c-login-container {
height: 85vh; height: 80vh;
margin-top: 15vh; margin-top: 20vh;
.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 {

View File

@ -85,7 +85,7 @@
:customStyle="{ :customStyle="{
'border-radius': '43rpx', 'border-radius': '43rpx',
}" }"
>保存</u-button >保存并登录</u-button
> >
</view> </view>
</template> </template>

View File

@ -116,15 +116,13 @@ import { ProfileApi } from "@/services/index";
import LoginLayout from "./components/loginLayout.vue"; import LoginLayout from "./components/loginLayout.vue";
import { useMemberStore } from "@/store/index"; import { useMemberStore } from "@/store/index";
import valid from "@/utils/validate"; import valid from "@/utils/validate";
import pinia from '@/store'
const handleClear = (item: any) => { const handleClear = (item: any) => {
setTimeout(() => { setTimeout(() => {
(model1.userInfo as any)[item.key] = ""; (model1.userInfo as any)[item.key] = "";
}, 100); }, 100);
}; };
const store = useMemberStore(pinia); const store = useMemberStore();
const loginForm = ref(null); const loginForm = ref(null);
const model1 = reactive({ const model1 = reactive({
userInfo: { userInfo: {

View File

@ -1,16 +1,14 @@
<template> <template>
<view class="baseinfo"> <view class="baseinfo">
<view class="box"> <view class="box">
<view> {{ profile.userName }} </view> <view> 用户 {{ profile.userName }} </view>
<view> 手机号码 {{ profile.phone }} </view> <view> 手机号码 {{ profile.phone }} </view>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useMemberStore } from '@/store/index' import { useMemberStore } from '@/store/index'
import pinia from '@/store' const store = useMemberStore()
const store = useMemberStore(pinia)
const profile = store.profile.userInfo const profile = store.profile.userInfo
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -67,8 +67,6 @@ import { useMemberStore } from "@/store/index";
import TabBar from "@/components/TabBar/index.vue"; import TabBar from "@/components/TabBar/index.vue";
import SmallModal from "@/components/Modal/smallModal.vue"; import SmallModal from "@/components/Modal/smallModal.vue";
import Box from "@/components/Box/index.vue"; import Box from "@/components/Box/index.vue";
import pinia from '@/store'
const isShowCancelModal = ref(false); const isShowCancelModal = ref(false);
@ -84,7 +82,7 @@ const handleOk = () => {
} }
}); });
}; };
const store = useMemberStore(pinia); const store = useMemberStore();
const profile = store.profile.userInfo; const profile = store.profile.userInfo;
const list = reactive([ const list = reactive([
{ {
@ -115,7 +113,7 @@ const hanldeClick = (item: any) => {
.bg { .bg {
width: 100%; width: 100%;
position: absolute; position: absolute;
top: 0rpx; top: -60rpx;
z-index: -1; z-index: -1;
} }
.baseinfo { .baseinfo {

View File

@ -60,14 +60,10 @@
v-model="model1.order.fileLists" v-model="model1.order.fileLists"
@delete="handleDelete" @delete="handleDelete"
></uni-file-picker> ></uni-file-picker>
<!-- 当定价后编辑入库单 不能更改称重方式 -->
<u-radio-group <u-radio-group
v-if="item.type === 'radio'" v-if="item.type === 'radio'"
v-model="(model1.order as any)[item.key]" v-model="(model1.order as any)[item.key]"
placement="row" placement="row"
:disabled="
model1.order.scaleStatus === 1 && item.key === 'weighingMethod'
"
> >
<u-radio <u-radio
v-for="(c, index) in item.child" v-for="(c, index) in item.child"
@ -130,15 +126,15 @@ import {
SupplierApi, SupplierApi,
} from "@/services/index"; } from "@/services/index";
import _ from "underscore"; import _ from "underscore";
import { onLoad, onShow } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
import { ImagesType, OrderType } from "@/utils/enum"; import { ImagesType, OrderType } from "@/utils/enum";
import SupplierDialog from "../components/SupplierDialog.vue"; import SupplierDialog from "../components/SupplierDialog.vue";
import ProductDialog from "../components/ProductDialog.vue"; import ProductDialog from "../components/ProductDialog.vue";
import valid from "@/utils/validate"; import valid from "@/utils/validate";
import { countDots } from "@/utils"; import { countDots } from "@/utils";
const handleClear = (item: any) => { const handleClear = (item:any) => {
(model1.order as any)[item.key] = ""; (model1.order as any)[item.key] = '';
}; }
// //
const showDialog = < const showDialog = <
{ {
@ -224,7 +220,6 @@ const model1 = reactive<{ order: Order }>({
fileLists: [], fileLists: [],
scaleStatus: 1, scaleStatus: 1,
netWeight: 0, netWeight: 0,
balanceTotalPrice: 0,
}, },
}); });
@ -292,12 +287,7 @@ const formAttrList = reactive<ComType>([
childKey: "userSelect", childKey: "userSelect",
required: true, required: true,
fn: () => { fn: () => {
uni.navigateTo({ // handleDialog("showSupplier", true);
url:
"/pagesApp/components/addSupplier?title=编辑供应商&item=" +
model1.order.userId, //
});
uni.hideKeyboard(); uni.hideKeyboard();
}, },
}, },
@ -531,14 +521,9 @@ watch(
实际收入实际结算金额-运费-杂费 实际收入实际结算金额-运费-杂费
*/ */
if (model1.order.scaleStatus === 0) { if (model1.order.scaleStatus === 0) {
return; return
} }
model1.order.netWeight = parseFloat( model1.order.netWeight = parseFloat(((parseFloat(grossWeightNew as any) || 0) - (parseFloat(tareNew as any) || 0)).toFixed(2));
(
(parseFloat(grossWeightNew as any) || 0) -
(parseFloat(tareNew as any) || 0)
).toFixed(2)
);
if (model1.order.buttonType === 0) { if (model1.order.buttonType === 0) {
if (model1.order.subtractNum) { if (model1.order.subtractNum) {
model1.order.netWeight = model1.order.netWeight =
@ -552,16 +537,16 @@ watch(
} }
model1.order.totalPrice = model1.order.totalPrice =
(model1.order.price || 0) * (model1.order.netWeight || 0); (model1.order.price || 0) * (model1.order.netWeight || 0);
// = // =
model1.order.balanceTotalPrice = model1.order.totalPrice; model1.order.balanceTotalPrice = model1.order.totalPrice;
} }
); );
// SupplierApi.getSupplierUserList({}).then((res) => { SupplierApi.getSupplierUserList({}).then((res) => {
// if (res.code === 200) { if (res.code === 200) {
// contrlModalParams.userSelect.list = res.data; contrlModalParams.userSelect.list = res.data;
// } }
// }); });
ReceiveProductApi.getAllReProducts().then((res) => { ReceiveProductApi.getAllReProducts().then((res) => {
if (res.code === 200) { if (res.code === 200) {
contrlModalParams.productSelect.list = _.map( contrlModalParams.productSelect.list = _.map(
@ -661,8 +646,7 @@ const save = () => {
} }
if ( if (
model1.order.price && 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({ uni.showToast({
title: "请输入正确的单价", title: "请输入正确的单价",
@ -775,7 +759,6 @@ onLoad((option) => {
title: "编辑信息", title: "编辑信息",
}); });
} }
if (model1.order.id) { if (model1.order.id) {
ReceiveApi.getDetailById({ id: model1.order.id }).then((res) => { ReceiveApi.getDetailById({ id: model1.order.id }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
@ -810,16 +793,6 @@ onLoad((option) => {
} }
}); });
} }
uni.$on("pricingParams", (data) => {
model1.order.userName = data.name
});
});
onShow(() => {});
onUnmounted(() => {
uni.$off("pricingParams", () => {});
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -74,9 +74,7 @@
> >
</view> </view>
<view class="flex-box"> <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> </view>
<view> <view>

View File

@ -17,7 +17,9 @@
<text class="address">{{ item.deviceName || "-" }}</text> <text class="address">{{ item.deviceName || "-" }}</text>
</view> </view>
<view> <view>
<text class="number">收货单号{{ item.receiptNumber }}</text> <text class="number"
>收货单号{{ item.receiptNumber }}</text
>
</view> </view>
<view> <view>
<text class="name">{{ item.userName }}</text> <text class="name">{{ item.userName }}</text>
@ -40,11 +42,7 @@
</view> </view>
<view class="flex-box"> <view class="flex-box">
<text>毛重{{ item.grossWeight }}kg</text> <text>毛重{{ item.grossWeight }}kg</text>
<text <text>单价{{ state.scaleStatus === 0 ? '未定价' : item.price + '元/KG'}}</text>
>单价{{
state.scaleStatus === 0 ? "未定价" : item.price + "元/KG"
}}</text
>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<u-button <u-button
@ -87,16 +85,9 @@ const pageList: PageResult<Order> = reactive({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}); });
const resetPageList = () => {
pageList.noMoreData = false;
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
};
const state = reactive({ const state = reactive({
scaleStatus: 0, scaleStatus: 0
}); })
const isShowCancelModal = ref(false); const isShowCancelModal = ref(false);
const deleteId = ref(0); const deleteId = ref(0);
const handleModal = (v: boolean, id: number) => { const handleModal = (v: boolean, id: number) => {
@ -109,19 +100,8 @@ const handleScenePhoto = (imagesId: number) => {
}); });
}; };
const pricingDetail = (id: number) => { const pricingDetail = (id: number) => {
// uni.redirectTo({
ReceiveApi.getDetailById({ id: id }).then((res: any) => { url: "/pagesReceive/form/pricingForm?id=" + id, //
if (res.code === 200) {
if (res.data.scaleStatus > 1) {
uni.showToast({title : '当前订单已处理'});
resetPageList();
getList();
} else {
uni.redirectTo({
url: "/pagesReceive/form/pricingForm?id=" + id, //
});
}
}
}); });
}; };
@ -163,14 +143,14 @@ onMounted(() => {
onLoad((option) => { onLoad((option) => {
// //
state.scaleStatus = parseInt((option as any).scaleStatus); state.scaleStatus = parseInt((option as any).scaleStatus);
// //
if (state.scaleStatus === ScaleStatus.ToBePriced) { if (state.scaleStatus === ScaleStatus.ToBePriced) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "待定价", title: '待定价',
}); });
} else if (state.scaleStatus === ScaleStatus.ToBeTare) { } else if (state.scaleStatus === ScaleStatus.ToBeTare) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "待过皮重", title: '待过皮重',
}); });
} }
}); });

View File

@ -97,10 +97,7 @@
<view @click="handleReviewNoPay"> 审核暂不支付 </view> <view @click="handleReviewNoPay"> 审核暂不支付 </view>
<view class="active" @click="handleReviewPay"> 审核立即支付 </view> <view class="active" @click="handleReviewPay"> 审核立即支付 </view>
</view> </view>
<!-- 零皮重不需要重新过皮 --> <view v-if="state.order.scaleStatus === 2">
<view
v-if="state.order.scaleStatus === 2 && state.order.weighingMethod === 0"
>
<u-button <u-button
text="重新过皮" text="重新过皮"
plain plain
@ -125,7 +122,6 @@
text="打印" text="打印"
type="primary" type="primary"
:customStyle="{ 'border-radius': '43rpx' }" :customStyle="{ 'border-radius': '43rpx' }"
@click="handlePrint"
></u-button> ></u-button>
</view> </view>
</view> </view>
@ -167,10 +163,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { DeviceApi, ReceiveApi } from "@/services/index"; import { ReceiveApi } from "@/services/index";
import { onLoad } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
import SmallModal from "@/components/Modal/smallModal.vue"; import SmallModal from "@/components/Modal/smallModal.vue";
import { OrderType, ScaleStatus } from "@/utils/enum"; import { ScaleStatus } from "@/utils/enum";
const keyword = ref(""); const keyword = ref("");
const contrlModalParams = reactive<{ [attrName: string]: any }>({ const contrlModalParams = reactive<{ [attrName: string]: any }>({
paySelect: { paySelect: {
@ -225,7 +221,6 @@ const state = reactive<{
}>({ }>({
order: { order: {
carNumber: "", carNumber: "",
balanceTotalPrice: 0,
}, },
sheetList: [ sheetList: [
{ {
@ -322,7 +317,6 @@ const handleConfirm = () => {
], ],
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
state.order.balanceTotalPrice = amount.value || 0;
uni.showToast({ title: "修改成功" }); uni.showToast({ title: "修改成功" });
gridList1[gridList1.length - 1].num = amount.value || ""; gridList1[gridList1.length - 1].num = amount.value || "";
isInput.value = false; isInput.value = false;
@ -390,20 +384,6 @@ 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) => { onLoad((option) => {
state.order.id = parseInt((option as any).id); state.order.id = parseInt((option as any).id);
state.scaleStatus = parseInt((option as any).scaleStatus); state.scaleStatus = parseInt((option as any).scaleStatus);

View File

@ -108,9 +108,9 @@ import {
} from "@/utils/enum"; } 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";
const handleClear = (item: any) => { const handleClear = (item:any) => {
(model1.order as any)[item.key] = ""; (model1.order as any)[item.key] = '';
}; }
const isShowFormItem = (item: any) => { const isShowFormItem = (item: any) => {
if (model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay) { if (model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay) {
return true; return true;
@ -175,8 +175,6 @@ const model1 = reactive<{
unitPrice: 0, unitPrice: 0,
estimatePrice: 0, estimatePrice: 0,
subtractNum: 0, subtractNum: 0,
grossWeight: 0, //
tare: 0, //
}, },
}); });
const rules = reactive({ const rules = reactive({
@ -464,9 +462,9 @@ watch(
(model1.order.unitPrice || 0) * (model1.order.settlementWeight || 0) (model1.order.unitPrice || 0) * (model1.order.settlementWeight || 0)
).toFixed(2) ).toFixed(2)
); );
// if (!model1.order.totalPrice) { if (!model1.order.totalPrice) {
// model1.order.totalPrice = model1.order.estimatePrice; model1.order.totalPrice = model1.order.estimatePrice;
// } }
model1.order.realIncome = model1.order.realIncome =
(model1.order.totalPrice || 0) - (model1.order.totalPrice || 0) -
@ -564,27 +562,6 @@ const save = () => {
check().then((res) => { check().then((res) => {
if (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(); startSave();
} }
}); });

View File

@ -13,13 +13,13 @@
</view> </view>
</view> </view>
<view> <view>
<text class="btn" @click="handleScenePhoto(item.imagesId as number)" <text class="btn" @click="handleScenePhoto((item.imagesId as number))"
>现场照片</text >现场照片</text
> >
</view> </view>
</view> </view>
<view> <view>
<text class="desc">过磅时间{{ item.grossTime || "-" }}</text> <text class="desc">过磅时间{{ item.grossTime || '-' }}</text>
</view> </view>
<view class="flex-box"> <view class="flex-box">
<text>皮重{{ item.tare }}kg</text> <text>皮重{{ item.tare }}kg</text>
@ -29,12 +29,12 @@
text="点击作废" text="点击作废"
color="#E8E8E8" color="#E8E8E8"
:customStyle="{ color: '#999' }" :customStyle="{ color: '#999' }"
@click="handleModal(true, item.id as any)" @click="handleModal(true, (item.id as any))"
></u-button> ></u-button>
<u-button <u-button
type="primary" type="primary"
text="点击编辑" text="点击编辑"
@click="pricingDetail(item.id as any)" @click="pricingDetail((item.id as any))"
></u-button> ></u-button>
</view> </view>
</view> </view>
@ -53,20 +53,18 @@
import { ShipmentApi } from "@/services/index"; import { ShipmentApi } from "@/services/index";
import SmallModal from "@/components/Modal/smallModal.vue"; import SmallModal from "@/components/Modal/smallModal.vue";
const pageList: PageResult<Order> = reactive({ interface PageResult<T> {
noMoreData: false, total: number;
list: T[];
pageNum: number;
pageSize: number;
}
const pageList: PageResult<Shipment> = reactive({
total: 0, total: 0,
list: [], list: [],
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}); });
const resetPageList = () => {
pageList.noMoreData = false;
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
};
const isShowCancelModal = ref(false); const isShowCancelModal = ref(false);
const deleteId = ref(0); const deleteId = ref(0);
const handleModal = (v: boolean, id: number) => { const handleModal = (v: boolean, id: number) => {
@ -79,57 +77,28 @@ const handleScenePhoto = (imagesId: number) => {
}); });
}; };
const pricingDetail = (id: string) => { const pricingDetail = (id: string) => {
// uni.navigateTo({
debugger url: "/pagesShipment/form/shipmentForm?id=" + id, //
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 = () => {
const getList = (v?: boolean) => { ShipmentApi.getOrderPage({ pageNumber: 1, pageSize: 10, scaleStatus: 1 }).then((res) => {
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) { if (res.code === 200) {
pageList.isLoading = false; (pageList as any).list = res.data.list;
(pageList as any).list = pageList.list.concat(res.data.list);
pageList.total = (res.data as any).total;
} }
}); });
}; };
const handleOk = () => { const handleOk = () => {
console.log(deleteId.value); console.log(deleteId.value);
ShipmentApi.deleteOrder({ ids: [deleteId.value] }).then((res) => { ShipmentApi.deleteOrder({ids:[deleteId.value]}).then((res) => {
if (res.code === 200) { if (res.code === 200) {
getList(); getOrderList();
} }
}); });
}; };
onMounted(() => { onMounted(() => {
getList(); getOrderList();
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -20,7 +20,7 @@
></view> ></view>
<view <view
><u-tag ><u-tag
text="货单作废" text="货单作废"
plain plain
shape="circle" shape="circle"
:borderColor="'rgba(255, 147, 68, 1) !important'" :borderColor="'rgba(255, 147, 68, 1) !important'"
@ -155,7 +155,6 @@
" "
> >
<u-button <u-button
v-if="!state.order.repairFlag"
text="重新过毛" text="重新过毛"
plain plain
:customStyle="{ :customStyle="{
@ -180,7 +179,6 @@
text="打印" text="打印"
type="primary" type="primary"
:customStyle="{ 'border-radius': '43rpx' }" :customStyle="{ 'border-radius': '43rpx' }"
@click="handlePrint"
></u-button> ></u-button>
</view> </view>
</view> </view>
@ -208,8 +206,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { DeviceApi, ShipmentApi } from "@/services/index"; import { ShipmentApi } from "@/services/index";
import { OrderType, ScaleStatusBtnType } from "@/utils/enum"; import { ScaleStatusBtnType } from "@/utils/enum";
import { onLoad, onShow } from "@dcloudio/uni-app"; import { onLoad, onShow } from "@dcloudio/uni-app";
import SmallModal from "@/components/Modal/smallModal.vue"; import SmallModal from "@/components/Modal/smallModal.vue";
const payMethodMap: any = { const payMethodMap: any = {
@ -476,7 +474,7 @@ const handleSettlement = () => {
}; };
const handleScenePhoto = (id: string) => { const handleScenePhoto = (id: string) => {
uni.navigateTo({ uni.navigateTo({
url: "/pagesScenePhoto/index?orderType=2&imagesType=1&id=" + id, // url: "/pagesScenePhoto/index?orderType=1&imagesType=1&id=" + id, //
}); });
}; };
// // 3 // // 3
@ -586,22 +584,9 @@ 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(() => { onShow(() => {
init(); init()
}); });
onLoad((option) => { onLoad((option) => {
state.order.id = (option as any).id; state.order.id = (option as any).id;
@ -611,7 +596,7 @@ onLoad((option) => {
console.log(data); console.log(data);
state.order.id = data.id; state.order.id = data.id;
state.scaleStatusBtnType = data.scaleStatusBtnType; state.scaleStatusBtnType = data.scaleStatusBtnType;
init(); init()
}); });
}); });
onUnmounted(() => { onUnmounted(() => {

View File

@ -123,7 +123,6 @@
import { ShipmentApi } from "@/services/index"; import { ShipmentApi } from "@/services/index";
import { ScaleStatus, ScaleStatusBtnType } from "@/utils/enum"; import { ScaleStatus, ScaleStatusBtnType } from "@/utils/enum";
import { onLoad } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
import { onShow } from "@dcloudio/uni-app";
import PageView from "@/components/PageView/index.vue"; import PageView from "@/components/PageView/index.vue";
// scaleStatus // scaleStatus
const pageList: PageResult<Shipment> = reactive({ const pageList: PageResult<Shipment> = reactive({
@ -252,8 +251,7 @@ const getList = (v?: boolean) => {
} }
}); });
}; };
onShow(() => { onMounted(() => {
resetPageList()
getList(); getList();
}); });
onLoad((option) => { onLoad((option) => {

View File

@ -102,21 +102,9 @@ const handleScenePhoto = (id: any) => {
}); });
}; };
const pricingDetail = (id: string) => { const pricingDetail = (id: string) => {
ShipmentApi.getDetailById({ id: id }).then((res: any) => { console.log(state.scaleStatus)
if (res.code === 200) { uni.navigateTo({
if (res.data.scaleStatus > 1) { url: "/pagesShipment/form/shipmentForm?id=" + id + `&scaleStatus=${state.scaleStatus}`, //
uni.showToast({ title: "当前订单已处理" });
resetPageList();
getList();
} else {
uni.navigateTo({
url:
"/pagesShipment/form/shipmentForm?id=" +
id +
`&scaleStatus=${state.scaleStatus}`, //
});
}
}
}); });
}; };
const getList = (v?: boolean) => { const getList = (v?: boolean) => {
@ -136,8 +124,10 @@ const getList = (v?: boolean) => {
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
pageList.isLoading = false; pageList.isLoading = false;
(pageList as any).list = (pageList as any).list.concat(res.data.list); (pageList as any).list = (
pageList.total = (res.data as any).total; pageList as any
).list.concat(res.data.list);
pageList.total = (res.data as any).total;
} }
}); });
}; };
@ -156,19 +146,19 @@ onShow(() => {
}); });
const state = reactive({ const state = reactive({
scaleStatus: 0, scaleStatus: 0
}); })
onLoad((option) => { onLoad((option) => {
// //
state.scaleStatus = parseInt((option as any).scaleStatus); state.scaleStatus = parseInt((option as any).scaleStatus);
// //
if (state.scaleStatus === ScaleStatus.ToBeShipment) { if (state.scaleStatus === ScaleStatus.ToBeShipment) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "待出货", title: '待出货',
}); });
} else if (state.scaleStatus === ScaleStatus.ToBeGrossWeight) { } else if (state.scaleStatus === ScaleStatus.ToBeGrossWeight) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "待过毛重", title: '待过毛重',
}); });
} }
}); });

View File

@ -1,54 +1,46 @@
import { http } from "@/utils/http"; import { http } from '@/utils/http'
// 设备信息新增 // 设备信息新增
export const addDevice = (data: any) => { export const addDevice = (data: any) => {
return http({ return http({
method: "POST", method: 'POST',
url: "/api/device/addDevice", url: '/api/device/addDevice',
data, data,
}); })
}; }
// 设备信息修改 // 设备信息修改
export const editDevice = (data: any) => { export const editDevice = (data: any) => {
return http({ return http({
method: "POST", method: 'POST',
url: "/api/device/edit", url: '/api/device/edit',
data, data,
}); })
}; }
// 设备信息逻辑删除 // 设备信息逻辑删除
export const deleteDevice = (data: any) => { export const deleteDevice = (data: any) => {
return http({ return http({
method: "POST", method: 'POST',
url: "/api/device/deleteDevice", url: '/api/device/deleteDevice',
data, data,
}); })
}; }
// 设备信息根据id查询 // 设备信息根据id查询
export const selectDeviceId = (data: any) => { export const selectDeviceId = (data: any) => {
return http({ return http({
method: "POST", method: 'POST',
url: "/api/device/selectDeviceId", url: '/api/device/selectDeviceId',
data, data,
}); })
}; }
// 设备信息根据id查询 // 设备信息根据id查询
export const getDeviceList = (data: any) => { export const getDeviceList = (data: any) => {
return http({ return http({
method: "POST", method: 'POST',
url: "/api/device/getDeviceList", url: '/api/device/getDeviceList',
data, data,
}); })
}; }
// 打印
export const print = (data: any) => {
return http({
method: "POST",
url: "/api/machine/print",
data,
});
};

11
src/types/order.d.ts vendored
View File

@ -113,9 +113,9 @@ interface Shipment {
carNumber?: string; //车牌号 carNumber?: string; //车牌号
scaleStatus?: number; //出库单状态 scaleStatus?: number; //出库单状态
orderNumber?: string; //订单编号 orderNumber?: string; //订单编号
grossWeight: number; //毛重 grossWeight?: number; //毛重
grossTime?: string; //过毛时间 grossTime?: string; //过毛时间
tare: number; //皮重 tare?: number; //皮重
tareTime?: string; //过皮时间 tareTime?: string; //过皮时间
netWeight?: number; //净重 netWeight?: number; //净重
number?: number; //数量 number?: number; //数量
@ -144,8 +144,8 @@ interface Shipment {
updateTime?: string; //undefined updateTime?: string; //undefined
isDeleted?: string; //删除标识true删除false未删除 isDeleted?: string; //删除标识true删除false未删除
settlementWeight?: number; // 结算重量 settlementWeight?: number; // 结算重量
settlementGross: number; // 结算毛重 settlementGross?: number; // 结算毛重
settlementTare: number; // 结算皮重 settlementTare?: number; // 结算皮重
settlementNet?: number; // 结算净重 settlementNet?: number; // 结算净重
signTime?: string; // 签收时间 signTime?: string; // 签收时间
paymentMethod?: string; //支付方式0:未支付,1:现金支付2银行卡支付3线上支付微信4支付宝 paymentMethod?: string; //支付方式0:未支付,1:现金支付2银行卡支付3线上支付微信4支付宝
@ -211,6 +211,5 @@ interface StockCard {
cardCode?: string, cardCode?: string,
type?: number, // 库存卡类型1=出库2=入库 type?: number, // 库存卡类型1=出库2=入库
cardCode?: string, cardCode?: string,
name?: string, name?: string
customUserName?:string
} }

View File

@ -1,6 +1,5 @@
import { useMemberStore } from "@/store/modules/member"; import { useMemberStore } from "@/store/modules/member";
import ENV_CONFIG from "../config/env"; import ENV_CONFIG from "../config/env";
import pinia from '@/store'
// 基础地址 // 基础地址
let baseUrl = ""; let baseUrl = "";
@ -11,7 +10,7 @@ let baseUrl = "";
baseUrl = (process.env as any).config[(process.env as any).NODE_ENV] baseUrl = (process.env as any).config[(process.env as any).NODE_ENV]
.VITE_APP_BASE_URL; .VITE_APP_BASE_URL;
const store = useMemberStore(pinia); const store = useMemberStore();
const obj = { const obj = {
// 拦截前触发 // 拦截前触发

View File

@ -4,10 +4,9 @@ import AutoImport from "unplugin-auto-import/vite";
import path from "path"; // 引入pnpm install @types/node --save-dev import path from "path"; // 引入pnpm install @types/node --save-dev
import ENV_CONFIG from "./src/config/env"; import ENV_CONFIG from "./src/config/env";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
// process.env.NODE_ENV === "development"
export default defineConfig({ export default defineConfig({
build: { build: {
sourcemap: false, sourcemap: process.env.NODE_ENV === "development",
}, },
define: { define: {
"process.env.config": ENV_CONFIG, "process.env.config": ENV_CONFIG,