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"
},
"dependencies": {
"@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-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-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.20.2",
"esbuild": "0.17.19",
"luch-request": "^3.1.1",
"pinia": "2.0.33",
"pinia-plugin-persistedstate": "^3.2.1",
@ -68,26 +65,26 @@
"underscore": "^1.13.6",
"unplugin-auto-import": "^0.17.3",
"uview-plus": "^3.2.14",
"vue": "^3.4.27",
"vue-i18n": "^9.13.1"
"vue": "^3.2.45",
"vue-i18n": "^9.1.9"
},
"devDependencies": {
"@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",
"@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",
"@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.4.27",
"@vue/runtime-core": "^3.2.45",
"@vue/tsconfig": "^0.1.3",
"sass": "^1.69.7",
"sass-loader": "10",
"typescript": "^4.9.4",
"vite": "5.2.8",
"vite": "4.1.4",
"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">
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");
@ -24,9 +12,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>

View File

@ -56,9 +56,8 @@ 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(pinia);
const store = useMemberStore();
const list = reactive([
{
title: "收货",

View File

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

View File

@ -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,17 +39,12 @@ const getSafeHeight = () => {
// #endif
};
onMounted(() => {
// #ifdef MP-WEIXIN
// #ifdef APP-PLUS || 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">

View File

@ -30,14 +30,12 @@ const props = withDefaults(
show: false
}
);
const emit = defineEmits(["handleModal", "handleOk", "handleCancel"]);
const emit = defineEmits(["handleModal", "handleOk"]);
const handleClose = (v: string) => {
emit("handleModal", false);
if (v === 'ok') {
//
emit("handleOk");
} else {
emit("handleCancel")
}
};
</script>

View File

@ -22,47 +22,19 @@
</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
}
);
@ -72,7 +44,7 @@ const navbarRect = reactive({
msgCount: 10,
});
onMounted(() => {
// #ifdef MP-WEIXIN
// #ifdef APP-PLUS || MP-WEIXIN
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
navbarRect.height = menuButtonInfo.height;
navbarRect.top = menuButtonInfo.top;

View File

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

View File

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

View File

@ -1,96 +1,85 @@
{
"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"
}
}
}
"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
},
/* */
"quickapp" : {},
// h5
"h5" : {
"router" : {
"base" : "./"
}
/* */
"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
},
/* */
"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"
"usingComponents": true,
"optimization": {
"subPackages": true //
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3"
"lazyCodeLoading": "requiredComponents"
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "3"
}

View File

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

View File

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

View File

@ -32,9 +32,7 @@
: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>
@ -63,16 +61,6 @@
<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";
@ -80,22 +68,9 @@ import { formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
import { onLoad } from "@dcloudio/uni-app";
import _ from "underscore";
import SmallModal from "@/components/Modal/smallModal.vue";
const isShowCancelModal = ref(false);
const handleModal = (v: boolean) => {
isShowCancelModal.value = v;
};
const handleOk = () => {
handleCheck(true);
};
const handleCancel = () => {
handleCheck(false);
};
const handleClear = (item: any) => {
(model1.formData as any)[item.key] = "";
};
const handleClear = (item:any) => {
(model1.formData as any)[item.key] = '';
}
const model1 = reactive<any>({
formData: {},
});
@ -141,8 +116,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 = "卡号";
@ -190,47 +165,36 @@ 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(v);
startSave();
}
});
};
const startSave = (v: boolean) => {
const startSave = () => {
if (model1.formData.id) {
CustomerApi.updateCustomUser({ ...model1.formData, delCard: v }).then((res) => {
CustomerApi.updateCustomUser(model1.formData).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 };
}
);
}
});
};

View File

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

View File

@ -3,7 +3,7 @@
<u-form
labelPosition="left"
:model="model1"
:rules="model1.formData.id ? rules1 : rules2"
:rules="rules"
ref="form"
:labelWidth="100"
:labelStyle="{ padding: '0rpx 10rpx' }"
@ -33,11 +33,7 @@
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>
@ -64,19 +60,8 @@
</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";
@ -85,23 +70,11 @@ import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
import valid from "@/utils/validate";
import { onLoad } from "@dcloudio/uni-app";
import _ from "underscore";
import SmallModal from "@/components/Modal/smallModal.vue";
const isShowCancelModal = ref(false);
const handleModal = (v: boolean) => {
isShowCancelModal.value = v;
};
const handleOk = () => {
handleCheck(true);
};
const handleCancel = () => {
handleCheck(false);
};
const handleClear = (item: any) => {
(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" || item.key === "bankNumber") {
if (item.key === "phone" || item.key === 'bankNumber') {
const temp = e?.replace(valid.valid_number, "");
setTimeout(() => {
model1.formData[item.key] = temp;
@ -111,21 +84,7 @@ const handleInput = (e: any, item: any) => {
const model1 = reactive<any>({
formData: {},
});
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({
const rules = ref({
"formData.stockCardName": {
type: "string",
required: true,
@ -168,11 +127,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 = "卡号";
@ -293,44 +252,23 @@ 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(v);
startSave();
}
});
};
const startSave = (v: boolean) => {
const startSave = () => {
if (model1.formData.id) {
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
});
},
});
}
}
);
SupplierApi.updateSupplierUser(model1.formData).then((res) => {
if (res.code === 200) {
uni.navigateBack()
}
});
} else {
SupplierApi.addSupplierUser(model1.formData).then((res) => {
if (res.code === 200) {
uni.navigateBack();
uni.navigateBack()
}
});
}
@ -345,17 +283,15 @@ 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(() => {
@ -363,24 +299,12 @@ onMounted(() => {
getStockCardList();
});
onLoad((option: any) => {
onLoad((option) => {
//
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;
const title = (option as any).title;
model1.formData = JSON.parse((option as any).item);
if (model1.formData.cardCode) {
model1.formData.stockCardName = model1.formData.cardCode;
}
//
uni.setNavigationBarTitle({

View File

@ -3,7 +3,7 @@
<u-form
labelPosition="left"
:model="model1"
:rules="model1.formData.id ? rules2 : rules1"
:rules="rules"
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 model1.formData.id ? formAttrList2 : formAttrList1"
v-for="(item, index) in formAttrList"
:key="index"
@click="item.fn"
>
@ -32,12 +32,10 @@
clearable
:customStyle="{}"
border="none"
:maxlength="item.key === 'password' ? 8 : -1"
:maxlength="item.key === 'password' ? 6 : -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>
@ -51,7 +49,7 @@
</template>
</u-form-item>
</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
v-if="item.type === 'select'"
:actions="contrlModalParams[item.childKey].list"
@ -74,9 +72,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, "");
@ -84,23 +82,12 @@ 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: {},
});
const rules1 = ref({
"formData.roleName": {
type: "string",
required: true,
message: "请选择用户角色",
trigger: ["blur", "change"],
formData: {
},
});
const rules = ref({
"formData.userName": {
type: "string",
required: true,
@ -114,20 +101,6 @@ const rules1 = 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,
@ -150,7 +123,7 @@ const contrlModalParams = reactive<any>({
},
});
const formAttrList1 = reactive<any>([
const formAttrList = reactive<any>([
{
name: "姓名",
key: "name",
@ -171,7 +144,6 @@ const formAttrList1 = reactive<any>([
key: "roleName",
type: "select",
childKey: "role",
required: true,
fn: () => {
contrlModalParams.role.isShow = true;
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) => {
contrlModalParams[key].isShow = false;
if (key === "role") {
@ -273,18 +205,6 @@ 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();
@ -294,22 +214,15 @@ const save = () => {
const startSave = () => {
if (model1.formData.id) {
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) => {
ProfileApi.updateUserById(model1.formData).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()
}
});
}
@ -333,11 +246,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) {

View File

@ -29,7 +29,7 @@
>{{ obj.paymentType === 0 ? "收货" : "出货" }}单号
<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>
</template>
<script setup lang="ts">
@ -37,9 +37,6 @@ 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
@ -61,7 +58,7 @@ onLoad((option: any) => {
imagesType: ImagesType.NORMARL,
}).then((res) => {
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
></view>
<view @click="state.isShowStatus = true"
><text>{{
state.currentScaleStatus === -1
? "单据状态"
: getScaleStatus(state.currentScaleStatus)
}}</text
><u-icon name="arrow-down"></u-icon>
</view>
><text>单据状态</text><u-icon name="arrow-down"></u-icon
></view>
<view @click="state.isShowSort = true"
><text>{{
state.currentSortName === undefined
? "排序"
: `${
state.currentSortName === "create_time"
? "创建时间"
: "更新时间"
}降序`
}}</text
><u-icon name="arrow-down"></u-icon
><text>排序</text><u-icon name="arrow-down"></u-icon
></view>
<view class="btn" @click="handleDialog('showFilter', true)">筛选</view>
</view>
@ -215,10 +201,6 @@ const state = reactive({
],
isShowSort: false,
sortList: [
{
name: "全部",
key: undefined,
},
{
name: "按创建时间降序",
key: "create_time",

View File

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

View File

@ -94,7 +94,7 @@ const edit = (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) {
resetPageList();
getList();

View File

@ -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), //
});
};

View File

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

View File

@ -20,24 +20,10 @@
><u-icon name="arrow-down"></u-icon
></view>
<view @click="state.isShowStatus = true"
><text>{{
state.currentScaleStatus === -1
? "单据状态"
: getScaleStatus(state.currentScaleStatus)
}}</text
><u-icon name="arrow-down"></u-icon
><text>单据状态</text><u-icon name="arrow-down"></u-icon
></view>
<view @click="state.isShowSort = true"
><text>{{
state.currentSortName === undefined
? "排序"
: `${
state.currentSortName === "create_time"
? "创建时间"
: "更新时间"
}降序`
}}</text
><u-icon name="arrow-down"></u-icon
><text>排序</text><u-icon name="arrow-down"></u-icon
></view>
<view class="btn" @click="handleDialog('showFilter', true)">筛选</view>
</view>
@ -106,14 +92,8 @@
<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>
@ -203,7 +183,7 @@ const state = reactive({
currentSortName: undefined,
isShowStatus: false,
statusList: [
{
{
name: "全部",
key: -1,
},
@ -220,20 +200,16 @@ const state = reactive({
key: 2,
},
{
name: "待结算",
name: "已审未付",
key: 3,
},
{
name: "已结算",
name: "已审已付",
key: 4,
},
],
isShowSort: false,
sortList: [
{
name: "全部",
key: undefined,
},
{
name: "按创建时间降序",
key: "create_time",
@ -358,9 +334,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 "已支付";
}
};

View File

@ -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), //
});
};

View File

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

View File

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

View File

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

View File

@ -165,9 +165,7 @@ import {
import TabBar from "@/components/TabBar/index.vue";
import { formatMoney } from "@/utils";
import { onBackPress, onShow } from "@dcloudio/uni-app";
import pinia from "@/store";
const store = useMemberStore(pinia);
const store = useMemberStore();
const navbarRect = reactive({
height: 32,
top: 28,
@ -552,17 +550,12 @@ const init = () => {
});
};
onMounted(() => {
// #ifdef MP-WEIXIN
// #ifdef APP-PLUS || 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();

View File

@ -10,9 +10,7 @@
>
<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>
@ -24,10 +22,6 @@
</swiper>
</template>
<script setup lang="ts">
import { useMemberStore } from "@/store/index";
const store = useMemberStore();
const profile = store.profile;
const list = [
{
title: "智能回收 智慧未来!",
@ -47,16 +41,9 @@ const list = [
},
];
const start = () => {
// token
if (profile.token) {
uni.navigateTo({
url: "/pagesHome/index", //
});
} else {
uni.navigateTo({
url: "/pagesLogin/login/index", //
});
}
uni.navigateTo({
url: "/pagesLogin/login/index", //
});
};
</script>
<style lang="scss" scoped>

View File

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

View File

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

View File

@ -116,15 +116,13 @@ 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(pinia);
const store = useMemberStore();
const loginForm = ref(null);
const model1 = reactive({
userInfo: {

View File

@ -1,16 +1,14 @@
<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'
import pinia from '@/store'
const store = useMemberStore(pinia)
const store = useMemberStore()
const profile = store.profile.userInfo
</script>
<style lang="scss">

View File

@ -67,8 +67,6 @@ 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);
@ -84,7 +82,7 @@ const handleOk = () => {
}
});
};
const store = useMemberStore(pinia);
const store = useMemberStore();
const profile = store.profile.userInfo;
const list = reactive([
{
@ -115,7 +113,7 @@ const hanldeClick = (item: any) => {
.bg {
width: 100%;
position: absolute;
top: 0rpx;
top: -60rpx;
z-index: -1;
}
.baseinfo {

View File

@ -60,14 +60,10 @@
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"
@ -130,15 +126,15 @@ import {
SupplierApi,
} from "@/services/index";
import _ from "underscore";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { onLoad } 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 = <
{
@ -224,7 +220,6 @@ const model1 = reactive<{ order: Order }>({
fileLists: [],
scaleStatus: 1,
netWeight: 0,
balanceTotalPrice: 0,
},
});
@ -292,12 +287,7 @@ const formAttrList = reactive<ComType>([
childKey: "userSelect",
required: true,
fn: () => {
uni.navigateTo({
url:
"/pagesApp/components/addSupplier?title=编辑供应商&item=" +
model1.order.userId, //
});
// handleDialog("showSupplier", true);
uni.hideKeyboard();
},
},
@ -531,14 +521,9 @@ 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 =
@ -552,16 +537,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(
@ -661,8 +646,7 @@ 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: "请输入正确的单价",
@ -775,7 +759,6 @@ onLoad((option) => {
title: "编辑信息",
});
}
if (model1.order.id) {
ReceiveApi.getDetailById({ id: model1.order.id }).then((res) => {
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>
<style lang="scss" scoped>

View File

@ -74,9 +74,7 @@
>
</view>
<view class="flex-box">
<!-- 若是等待审核显示预估总价 其他显示货款金额 -->
<text v-if="currentTab === 2">预估总价{{ item.totalPrice || 0 }}</text>
<text v-else>货款金额{{ item.balanceTotalPrice || 0 }}</text>
<text>货款金额{{ item.balanceTotalPrice || 0 }}</text>
</view>
</view>
<view>

View File

@ -17,7 +17,9 @@
<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>
@ -40,11 +42,7 @@
</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
@ -87,16 +85,9 @@ 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) => {
@ -109,19 +100,8 @@ const handleScenePhoto = (imagesId: number) => {
});
};
const pricingDetail = (id: number) => {
//
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, //
});
}
}
uni.redirectTo({
url: "/pagesReceive/form/pricingForm?id=" + id, //
});
};
@ -163,14 +143,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: '待过皮重',
});
}
});

View File

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

View File

@ -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,8 +175,6 @@ const model1 = reactive<{
unitPrice: 0,
estimatePrice: 0,
subtractNum: 0,
grossWeight: 0, //
tare: 0, //
},
});
const rules = reactive({
@ -464,9 +462,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) -
@ -564,27 +562,6 @@ 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();
}
});

View File

@ -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,20 +53,18 @@
import { ShipmentApi } from "@/services/index";
import SmallModal from "@/components/Modal/smallModal.vue";
const pageList: PageResult<Order> = reactive({
noMoreData: false,
interface PageResult<T> {
total: number;
list: T[];
pageNum: number;
pageSize: number;
}
const pageList: PageResult<Shipment> = reactive({
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) => {
@ -79,57 +77,28 @@ const handleScenePhoto = (imagesId: number) => {
});
};
const pricingDetail = (id: string) => {
//
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, //
});
}
}
uni.navigateTo({
url: "/pagesShipment/form/shipmentForm?id=" + id, //
});
};
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) => {
const getOrderList = () => {
ShipmentApi.getOrderPage({ pageNumber: 1, pageSize: 10, scaleStatus: 1 }).then((res) => {
if (res.code === 200) {
pageList.isLoading = false;
(pageList as any).list = pageList.list.concat(res.data.list);
pageList.total = (res.data as any).total;
(pageList as any).list = res.data.list;
}
});
};
const handleOk = () => {
console.log(deleteId.value);
ShipmentApi.deleteOrder({ ids: [deleteId.value] }).then((res) => {
ShipmentApi.deleteOrder({ids:[deleteId.value]}).then((res) => {
if (res.code === 200) {
getList();
getOrderList();
}
});
};
onMounted(() => {
getList();
getOrderList();
});
</script>
<style lang="scss" scoped>

View File

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

View File

@ -123,7 +123,6 @@
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({
@ -252,8 +251,7 @@ const getList = (v?: boolean) => {
}
});
};
onShow(() => {
resetPageList()
onMounted(() => {
getList();
});
onLoad((option) => {

View File

@ -102,21 +102,9 @@ const handleScenePhoto = (id: any) => {
});
};
const pricingDetail = (id: string) => {
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}`, //
});
}
}
console.log(state.scaleStatus)
uni.navigateTo({
url: "/pagesShipment/form/shipmentForm?id=" + id + `&scaleStatus=${state.scaleStatus}`, //
});
};
const getList = (v?: boolean) => {
@ -136,8 +124,10 @@ 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;
}
});
};
@ -156,19 +146,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: '待过毛重',
});
}
});

View File

@ -1,54 +1,46 @@
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,
});
};

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

@ -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,6 +211,5 @@ interface StockCard {
cardCode?: string,
type?: number, // 库存卡类型1=出库2=入库
cardCode?: string,
name?: string,
customUserName?:string
name?: string
}

View File

@ -1,6 +1,5 @@
import { useMemberStore } from "@/store/modules/member";
import ENV_CONFIG from "../config/env";
import pinia from '@/store'
// 基础地址
let baseUrl = "";
@ -11,7 +10,7 @@ let baseUrl = "";
baseUrl = (process.env as any).config[(process.env as any).NODE_ENV]
.VITE_APP_BASE_URL;
const store = useMemberStore(pinia);
const store = useMemberStore();
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 ENV_CONFIG from "./src/config/env";
// https://vitejs.dev/config/
// process.env.NODE_ENV === "development"
export default defineConfig({
build: {
sourcemap: false,
sourcemap: process.env.NODE_ENV === "development",
},
define: {
"process.env.config": ENV_CONFIG,