Compare commits

..

No commits in common. "88a7428ed67c164bebcfd947818c10df869e96b1" and "b6838f3f8d578974beda077073af293fe614ffd3" have entirely different histories.

37 changed files with 221 additions and 155 deletions

View File

@ -2,12 +2,12 @@
<up-row customStyle="flex-wrap: wrap" :gutter="8"> <up-row customStyle="flex-wrap: wrap" :gutter="8">
<up-col span="6" v-for="(item, index) in list" :key="index"> <up-col span="6" v-for="(item, index) in list" :key="index">
<view class="grid-item"> <view class="grid-item">
<image <up-image
:src="item.url || `${url}/static/110/error.jpg`" :src="item.url"
:mode="'widthFix'" :mode="'widthFix'"
:width="'100%'" :width="'100%'"
@click="showImage(index)" @click="showImage(index)"
></image> ></up-image>
</view> </view>
</up-col> </up-col>
</up-row> </up-row>
@ -20,14 +20,13 @@
<script setup lang="ts"> <script setup lang="ts">
import { PictureApi } from "@/services"; import { PictureApi } from "@/services";
import { url } from "@/utils/data";
const props = defineProps<{ const props = defineProps<{
params: Object; params: Object;
}>(); }>();
let list: any = ref([]); let list: any = ref([]);
const showImage = (index: number) => { const showImage = (index: number) => {
uni.previewImage({ uni.previewImage({
urls: list.value.map((item: any) => item.url || `${url}/static/110/error.jpg`), // urls: list.value.map((item: any) => item.url), //
current: index, // current: index, //
indicator: "default", // indicator: "default", //
loop: true, loop: true,

View File

@ -8,7 +8,7 @@
v-else v-else
:placeholder="`请输入${name}`" :placeholder="`请输入${name}`"
v-model="keyword" v-model="keyword"
:focus="true"
bgColor="#fff" bgColor="#fff"
clearable clearable
:showAction="false" :showAction="false"

View File

@ -76,12 +76,12 @@ const state = reactive({
// path: "/pagesConfig/index", // path: "/pagesConfig/index",
path: "/pagesHome/config", path: "/pagesHome/config",
}, },
// { {
// text: "", text: "配置旧",
// icon: "config.png", icon: "config.png",
// activeIcon: "config_active.png", activeIcon: "config_active.png",
// path: "/pagesHome/index1", path: "/pagesHome/index1",
// }, },
{ {
text: "我的", text: "我的",
icon: "profile.png", icon: "profile.png",

View File

@ -87,7 +87,7 @@
{ {
"path": "profile/baseinfo", "path": "profile/baseinfo",
"style": { "style": {
"navigationBarTitleText": "个人信息", "navigationBarTitleText": "基础信息",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
} }

View File

@ -210,6 +210,16 @@ const handleInput = (e: any, item: any) => {
}); });
} }
if (item.key === "maxPrice" || item.key === "minPrice") {
if (state.minPrice && state.maxPrice && state.minPrice > state.maxPrice) {
uni.showToast({
title: `最大值应小于最小值`,
icon: "none",
});
return;
}
}
setTimeout(() => { setTimeout(() => {
(state as any)[item.key] = temp; (state as any)[item.key] = temp;
}, 10); }, 10);
@ -414,6 +424,13 @@ const resetState = () => {
}; };
const getFilter = () => { const getFilter = () => {
if (state.minPrice && state.maxPrice && state.minPrice > state.maxPrice) {
uni.showToast({
title: `最大值应小于最小值`,
icon: "none",
});
return;
}
emit("handleOk", { emit("handleOk", {
...state, ...state,
repairFlag: currentSpl.value, repairFlag: currentSpl.value,

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'
"
@change="(e:any) => {handleInput(e, item)}" @change="(e:any) => {handleInput(e, item)}"
@clear="handleClear(item)" @clear="handleClear(item)"
> >
@ -68,27 +66,47 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { GoodsApi } from "@/services"; import { GoodsApi } from "@/services";
import { countDots, isTwoDecimalPlaces } from "@/utils"; import { countDots } from "@/utils";
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 (["minPrice", "maxPrice", "commonPrice"].indexOf(item.key) > -1) { if (["minPrice", "maxPrice", "commonPrice"].indexOf(item.key) > -1) {
const temp = e?.replace(valid.valid_decimal.pattern, ""); const temp = e?.replace(valid.valid_decimal.pattern, "");
if (countDots(temp) > 1) { if (countDots(temp).length > 1) {
uni.showToast({ uni.showToast({
title: "请输入正确的" + item.name, title: "请输入正确的" + item.name,
icon: "none", icon: "none",
}); });
} else if(countDots(temp) === 1 && (isTwoDecimalPlaces(temp))) { }
const minPrice = parseFloat(model1.formData.minPrice)
const maxPrice = parseFloat(model1.formData.maxPrice)
if (item.key === "maxPrice") {
if (minPrice > maxPrice) {
uni.showToast({ uni.showToast({
title: item.name + "最多只能输入2位小数", title: `${item.name}应小于${model1.formData.maxPrice}`,
icon: "none", icon: "none",
}); });
return;
}
}
if (item.key === "commonPrice") {
if (minPrice > -1 && maxPrice > -1) {
if (
!(temp >= minPrice &&
temp <= maxPrice)
) {
uni.showToast({
title: `${item.name}应在${model1.formData.minPrice}-${model1.formData.maxPrice}之间`,
icon: "none",
});
return;
}
}
} }
setTimeout(() => { setTimeout(() => {
@ -133,6 +151,24 @@ const rules = ref({
// message: "", // message: "",
// trigger: ["blur", "change"], // trigger: ["blur", "change"],
// }, // },
"formData.minPrice": {
type: "number",
required: true,
message: "最低价为空或输入错误",
trigger: ["blur", "change"],
},
"formData.maxPrice": {
type: "number",
required: true,
message: "最高价为空或输入错误",
trigger: ["blur", "change"],
},
"formData.commonPrice": {
type: "number",
required: true,
message: "常用价格为空或输入错误",
trigger: ["blur", "change"],
},
}); });
const contrlModalParams = reactive<any>({ const contrlModalParams = reactive<any>({
reCategory: { reCategory: {
@ -162,25 +198,32 @@ const formAttrList = reactive<any>([
contrlModalParams.reCategory.title = "收货分类"; contrlModalParams.reCategory.title = "收货分类";
}, },
}, },
// {
// name: "",
// key: "substationName",
// type: "input",
// required: true,
// unit: "",
// },
{ {
name: "最低价", name: "最低价",
key: "minPrice", key: "minPrice",
type: "input", type: "input",
required: false, required: true,
unit: "", unit: "",
}, },
{ {
name: "最高价", name: "最高价",
key: "maxPrice", key: "maxPrice",
type: "input", type: "input",
required: false, required: true,
unit: "", unit: "",
}, },
{ {
name: "常用价格", name: "常用价格",
key: "commonPrice", key: "commonPrice",
type: "input", type: "input",
required: false, required: true,
unit: "", unit: "",
}, },
]); ]);
@ -212,7 +255,27 @@ const check = () => {
}; };
const save = () => { const save = () => {
const minPrice = parseFloat(model1.formData.minPrice)
const maxPrice = parseFloat(model1.formData.maxPrice)
if (minPrice > maxPrice) {
uni.showToast({
title: `最低价应小于${model1.formData.maxPrice}`,
icon: "none",
});
return;
}
if (minPrice > -1 &&maxPrice > -1) {
const temp = model1.formData.commonPrice;
if (!(temp >= minPrice && temp <= maxPrice)) {
uni.showToast({
title: `常用价格应在${model1.formData.minPrice}-${model1.formData.maxPrice}之间`,
icon: "none",
});
return;
}
}
check().then((res) => { check().then((res) => {
if (res) { if (res) {
startSave(); startSave();
@ -223,13 +286,13 @@ const startSave = () => {
if (model1.formData.id) { if (model1.formData.id) {
GoodsApi.EditReceiveProduct(model1.formData).then((res) => { GoodsApi.EditReceiveProduct(model1.formData).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.navigateBack(); uni.navigateBack()
} }
}); });
} else { } else {
GoodsApi.addReProducts(model1.formData).then((res) => { GoodsApi.addReProducts(model1.formData).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.navigateBack(); uni.navigateBack()
} }
}); });
} }
@ -261,7 +324,7 @@ onLoad((option) => {
// //
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: title || "新增收货产品", title: title || '新增收货产品',
}); });
}); });
</script> </script>

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<u-form <u-form
labelPosition="left" labelPosition="left"
:model="model1" :model="model1"

View File

@ -49,7 +49,7 @@
border="none" border="none"
:maxlength="item.key === 'password' ? 8 : -1" :maxlength="item.key === 'password' ? 8 : -1"
@change="(e:any) => {handleInput(e, item)}" @change="(e:any) => {handleInput(e, item)}"
:disabled="item.type === 'select' || isEditPhone(item)" :disabled="item.type === 'select'"
:disabledColor=" :disabledColor="
['性别', '用户角色'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa' ['性别', '用户角色'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
" "
@ -100,12 +100,6 @@ const handleInput = (e: any, item: any) => {
}, 10); }, 10);
} }
}; };
const isEditPhone = (item:any) => {
if (model1.formData.id && item.key === 'phone') {
return true
}
}
const model1 = reactive<any>({ const model1 = reactive<any>({
formData: { formData: {
gender: 1 gender: 1
@ -278,6 +272,7 @@ onLoad((option: any) => {
if (option.item) { if (option.item) {
const obj = JSON.parse(option.item); const obj = JSON.parse(option.item);
model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] }; model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] };
debugger
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;

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="search"> <view class="search">
<u-search <u-search
placeholder="请输入客户名称" placeholder="请输入客户名称"

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="search"> <view class="search">
<u-search <u-search
placeholder="请输入收货产品名称" placeholder="请输入收货产品名称"
@ -28,6 +28,7 @@
<view> <view>
<view> <view>
<view>{{ item.reProductsName }}</view> <view>{{ item.reProductsName }}</view>
<view>{{ item.minPrice }} ~ {{ item.maxPrice }} </view>
</view> </view>
<view class="op-box"> <view class="op-box">
<view class="btn" @click="edit(item)"> 编辑 </view> <view class="btn" @click="edit(item)"> 编辑 </view>

View File

@ -183,6 +183,17 @@ const handleInput = (e: any, item: any) => {
icon: "none", icon: "none",
}); });
} }
if (item.key === "price") {
if (model1.order.minPrice && model1.order.maxPrice) {
if (temp < model1.order.minPrice || temp > model1.order.maxPrice) {
uni.showToast({
title: `${item.name}应在${model1.order.minPrice}-${model1.order.maxPrice}之间`,
icon: "none",
});
return;
}
}
}
if (item.key === "tare") { if (item.key === "tare") {
if ( if (

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="search"> <view class="search">
<u-search <u-search
placeholder="请输入收货分类" placeholder="请输入收货分类"

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="search"> <view class="search">
<u-search <u-search
placeholder="请输入出货产品名称" placeholder="请输入出货产品名称"

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="collapse-box box"> <view class="collapse-box box">
<view v-for="(item, index) in pageList.list" :key="index"> <view v-for="(item, index) in pageList.list" :key="index">
<view class="item"> <view class="item">

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="search"> <view class="search">
<u-search <u-search
placeholder="请输入库存卡号" placeholder="请输入库存卡号"

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="search"> <view class="search">
<view class="type" @click="state.isShowType = true" <view class="type" @click="state.isShowType = true"
>全部分类<u-icon name="arrow-down"></u-icon> >全部分类<u-icon name="arrow-down"></u-icon>

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="search"> <view class="search">
<u-search <u-search
placeholder="请输入供应商分类" placeholder="请输入供应商分类"

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<view class="search"> <view class="search">
<u-search <u-search
placeholder="请输入人员名称" placeholder="请输入人员名称"

View File

@ -3,7 +3,7 @@
<up-icon <up-icon
name="minus" name="minus"
@click="decrease" @click="decrease"
:size="22" :size="14"
color="rgba(0,0,0,0.25)" color="rgba(0,0,0,0.25)"
></up-icon> ></up-icon>
<input <input
@ -17,7 +17,7 @@
<up-icon <up-icon
name="plus" name="plus"
@click="increase" @click="increase"
:size="22" :size="14"
color="rgba(0,0,0,0.25)" color="rgba(0,0,0,0.25)"
></up-icon> ></up-icon>
</view> </view>
@ -31,7 +31,7 @@ const props = defineProps<{
}>(); }>();
const emit = defineEmits(["changeValue"]); const emit = defineEmits(["changeValue"]);
const num = ref(props.value); const num = ref(props.value);
const handleInput = (event:any) => { const handleInput = (event) => {
const value = parseInt(event.target.value); const value = parseInt(event.target.value);
if (!isNaN(value) && value >= 1) { if (!isNaN(value) && value >= 1) {
num.value = value; num.value = value;
@ -59,7 +59,7 @@ const decrease = () => {
align-items: center; align-items: center;
justify-items: center; justify-items: center;
border: 1px solid rgba(0, 0, 0, 0.15); border: 1px solid rgba(0, 0, 0, 0.15);
padding: 4px; padding: 0rpx 8rpx;
border-radius: 5px; border-radius: 5px;
margin: 0rpx 16rpx; margin: 0rpx 16rpx;
.uni-input { .uni-input {

View File

@ -1,5 +1,5 @@
<template> <template>
<view v-if="Object.keys(state.formData).length > 0" class="app-container"> <block v-if="Object.keys(state.formData).length > 0">
<view class="title">终端机自动打单配置</view> <view class="title">终端机自动打单配置</view>
<view class="box"> <view class="box">
<view <view
@ -40,7 +40,7 @@
<view <view
>收货-待审核联单打印<AvatarInput >收货-待审核联单打印<AvatarInput
:min="1" :min="1"
:max="5" :max="7"
:value="state.formData.manualPrintAudit" :value="state.formData.manualPrintAudit"
@changeValue=" @changeValue="
(v) => { (v) => {
@ -53,7 +53,7 @@
<view <view
>收货-已审核联单打印<AvatarInput >收货-已审核联单打印<AvatarInput
:min="1" :min="1"
:max="5" :max="7"
:value="state.formData.manualPrintAudited" :value="state.formData.manualPrintAudited"
@changeValue=" @changeValue="
(v) => { (v) => {
@ -66,7 +66,7 @@
<view <view
>出货-待结算联单打印<AvatarInput >出货-待结算联单打印<AvatarInput
:min="1" :min="1"
:max="5" :max="7"
:value="state.formData.manualPrintToBeSettled" :value="state.formData.manualPrintToBeSettled"
@changeValue=" @changeValue="
(v) => { (v) => {
@ -79,7 +79,7 @@
<view <view
>出货-已结算联单打印<AvatarInput >出货-已结算联单打印<AvatarInput
:min="1" :min="1"
:max="5" :max="7"
:value="state.formData.manualPrintSettled" :value="state.formData.manualPrintSettled"
@changeValue=" @changeValue="
(v) => { (v) => {
@ -112,7 +112,6 @@
></view> ></view>
<view <view
v-for="item in state.formData.devices" v-for="item in state.formData.devices"
v-if="state.formData.autoSettlement"
:key="item.id" :key="item.id"
style="padding: 8rpx 44rpx" style="padding: 8rpx 44rpx"
>{{ item.deviceName }} >{{ item.deviceName }}
@ -129,7 +128,7 @@
天后自动结算</view 天后自动结算</view
> >
</view> </view>
</view> </block>
<view class="btn-box-fix-btn"> <view class="btn-box-fix-btn">
<u-button <u-button
@ -199,7 +198,6 @@ const handleSave = () => {
uni.showToast({ uni.showToast({
title: "设置更新成功", title: "设置更新成功",
}); });
uni.navigateBack();
} }
}); });
}; };

View File

@ -8,22 +8,13 @@
:checked="item.templateDeleted" :checked="item.templateDeleted"
:activeColor="'#00D2E3'" :activeColor="'#00D2E3'"
:usedAlone="true" :usedAlone="true"
@change=" @change="(v) => {item.templateDeleted = v}"
(v:any) => {
item.templateDeleted = v;
}
"
> >
</up-checkbox> </up-checkbox>
</view> </view>
</view> </view>
<view class="btn-box-fix-btn"> <view class="btn-box-fix-btn">
<u-button <u-button type="primary" text="保存" shape="circle" @click="handleSave"></u-button>
type="primary"
text="保存"
shape="circle"
@click="handleSave"
></u-button>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -31,20 +22,17 @@ import { onLoad } from "@dcloudio/uni-app";
import { OtherConfigApi } from "@/services/index"; import { OtherConfigApi } from "@/services/index";
const title = ref(""); const title = ref("");
const list: any = ref([]); const list = ref([]);
const handleSave = () => { const handleSave = () => {
OtherConfigApi.updatePrintTemplate({ printTemplatePos: list.value }).then( OtherConfigApi.updatePrintTemplate({printTemplatePos: list.value}).then(res => {
(res) => {
if(res.code === 200) { if(res.code === 200) {
uni.showToast({ uni.showToast({
title: "设置更新成功", title: "设置更新成功",
}); });
uni.navigateBack();
} }
})
} }
);
};
onLoad((option: any) => { onLoad((option: any) => {
// //
if (option.key) { if (option.key) {

View File

@ -140,7 +140,7 @@ const getCode = () => {
(res: any) => { (res: any) => {
if (res.code === 200) { if (res.code === 200) {
if (res.data.length > 0) { if (res.data.length > 0) {
store.setMechanism({mechanismCode: res.data[0].mechanismCode, mechanismName: res.data[0].mechanismName}); store.setMechanismCode(res.data[0].mechanismCode);
sendMsg(); sendMsg();
} else { } else {
uni.showToast({ uni.showToast({

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="baseinfo"> <view class="baseinfo">
<view class="box"> <view class="box">
<view> 姓名 {{ profile.name }} </view> <view> 姓名 {{ profile.userName }} </view>
<view> 性别 {{ profile.gender ? (profile.gender === 1 ? '男' : '女') :'未知' }} </view> <view> 性别 {{ profile.gender ? (profile.gender === 1 ? '男' : '女') :'未知' }} </view>
<view> 手机号码 {{ profile.phone }} </view> <view> 手机号码 {{ profile.phone }} </view>
</view> </view>

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="c-card app-container"> <view class="c-card">
<u-form <u-form
labelPosition="left" labelPosition="left"
:model="model1" :model="model1"
@ -111,11 +111,7 @@
</view> </view>
<view class="btn-box"> <view class="btn-box">
<u-button text="暂不定价" @click="handleBack()"></u-button> <u-button text="暂不定价" @click="handleBack()"></u-button>
<u-button <u-button type="primary" text="保存" @click="save()"></u-button>
type="primary"
:text="title === '定价详情' ? '定价' : '保存'"
@click="save()"
></u-button>
</view> </view>
<!-- 收货产品弹框 --> <!-- 收货产品弹框 -->
@ -192,6 +188,17 @@ const handleInput = (e: any, item: any) => {
icon: "none", icon: "none",
}); });
} }
if (item.key === "price") {
if (model1.order.minPrice && model1.order.maxPrice) {
if (temp < model1.order.minPrice || temp > model1.order.maxPrice) {
uni.showToast({
title: `${item.name}应在${model1.order.minPrice}-${model1.order.maxPrice}之间`,
icon: "none",
});
return;
}
}
}
setTimeout(() => { setTimeout(() => {
model1.order[item.key] = temp; model1.order[item.key] = temp;
@ -667,6 +674,18 @@ const save = () => {
return; return;
} }
if (model1.order.minPrice && model1.order.maxPrice) {
if (
parseFloat(model1.order.price + "") < parseFloat(model1.order.minPrice) ||
parseFloat(model1.order.price + "") > parseFloat(model1.order.maxPrice)
) {
uni.showToast({
title: `单价应在${model1.order.minPrice}-${model1.order.maxPrice}之间`,
icon: "none",
});
return;
}
}
if ( if (
model1.order.grossWeight?.toString() && model1.order.grossWeight?.toString() &&
model1.order.grossWeight?.toString()[ model1.order.grossWeight?.toString()[
@ -747,28 +766,22 @@ const updateOrder = () => {
}); });
} else { } else {
// 0 1 // 0 1
uni.navigateBack(); uni.redirectTo({
url: "/pagesHome/index", //
});
} }
} }
}); });
}; };
const prePage = ref(""); const prePage = ref("");
const title = ref("") onLoad((option) => {
onLoad((option: any) => { model1.order.id = parseInt((option as any).id);
model1.order.id = parseInt(option.id); prePage.value = (option as any).prePage;
prePage.value = option.prePage;
title.value = option.title
if (prePage.value) { if (prePage.value) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "编辑信息", title: "编辑信息",
}); });
} }
if (option.title) {
uni.setNavigationBarTitle({
title: option.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) => {

View File

@ -4,7 +4,7 @@
<u-search <u-search
placeholder="请输入供应商名称" placeholder="请输入供应商名称"
v-model="keyword" v-model="keyword"
:focus="true"
bgColor="#fff" bgColor="#fff"
clearable clearable
:showAction="false" :showAction="false"

View File

@ -4,7 +4,7 @@
<u-search <u-search
placeholder="请输入供应商名称" placeholder="请输入供应商名称"
v-model="keyword" v-model="keyword"
:focus="true"
bgColor="#fff" bgColor="#fff"
clearable clearable
:showAction="false" :showAction="false"

View File

@ -40,7 +40,7 @@
</view> </view>
<view> <view>
<text class="name" <text class="name"
>{{ item.userName }} <text v-if="item.cardNumber"> / {{ item.cardNumber }}</text></text >{{ item.userName }} / {{ item.cardNumber }}</text
> >
</view> </view>
</view> </view>
@ -111,7 +111,6 @@ import PageView from "@/components/PageView/index.vue";
import { onLoad } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
import { DeviceType, ScaleStatus } from "@/utils/enum"; import { DeviceType, ScaleStatus } from "@/utils/enum";
import _ from "underscore"; import _ from "underscore";
import { onShow } from "@dcloudio/uni-app";
const stateNew = reactive<any>({ const stateNew = reactive<any>({
keywoard: "", keywoard: "",
@ -184,8 +183,8 @@ const pricingDetail = (id: number) => {
resetPageList(); resetPageList();
getList(); getList();
} else { } else {
uni.navigateTo({ uni.redirectTo({
url: `/pagesReceive/form/pricingForm?id=${id}&title=${state.scaleStatus === 0 ? '定价' : '编辑'}详情`, // url: "/pagesReceive/form/pricingForm?id=" + id, //
}); });
} }
} }
@ -228,10 +227,9 @@ const handleOk = () => {
}); });
}; };
onShow(() => { onMounted(() => {
resetPageList();
getList(); getList();
}) });
onLoad((option) => { onLoad((option) => {
// //

View File

@ -13,8 +13,11 @@
> >
<view class="time">{{ item.createTime }}</view> <view class="time">{{ item.createTime }}</view>
<text class="tip">{{ getType(item.imagesType) }}过磅</text> <text class="tip">{{ getType(item.imagesType) }}过磅</text>
<image :src="item.url || `${url}/static/110/error.jpg`" :mode="'widthFix'" @click="showImage(index)"> <image
</image> :src="item.url"
:mode="'widthFix'"
@click="showImage(index)"
/>
</view> </view>
</up-col> </up-col>
</up-row> </up-row>
@ -28,7 +31,6 @@
import { onLoad } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
import { PictureApi } from "@/services/index"; import { PictureApi } from "@/services/index";
import { ImagesType } from "@/utils/enum"; import { ImagesType } from "@/utils/enum";
import { url } from "@/utils/data";
let list: any = ref([]); let list: any = ref([]);
const getType = (v: number) => { const getType = (v: number) => {
if (v === ImagesType.Tare) { if (v === ImagesType.Tare) {
@ -42,7 +44,7 @@ const getType = (v: number) => {
const showImage = ( index:number) => { const showImage = ( index:number) => {
uni.previewImage({ uni.previewImage({
urls: list.value.map((item: any) => item.url || `${url}/static/110/error.jpg`), // urls: list.value.map((item:any) => item.url), //
current: index, // current: index, //
indicator: "default", // indicator: "default", //
loop:true, loop:true,

View File

@ -4,7 +4,7 @@
<u-search <u-search
placeholder="请输入客户名称" placeholder="请输入客户名称"
v-model="keyword" v-model="keyword"
:focus="true"
bgColor="#fff" bgColor="#fff"
clearable clearable
:showAction="false" :showAction="false"

View File

@ -4,7 +4,7 @@
<u-search <u-search
placeholder="请输入客户名称" placeholder="请输入客户名称"
v-model="keyword" v-model="keyword"
:focus="true"
bgColor="#fff" bgColor="#fff"
clearable clearable
:showAction="false" :showAction="false"

View File

@ -4,7 +4,7 @@
<u-search <u-search
placeholder="请输入客户名称" placeholder="请输入客户名称"
v-model="keyword" v-model="keyword"
:focus="true"
bgColor="#fff" bgColor="#fff"
clearable clearable
:showAction="false" :showAction="false"

View File

@ -40,7 +40,7 @@
</view> </view>
<view> <view>
<text class="name" <text class="name"
>{{ item.userName }} <text v-if="item.cardNumber"> / {{ item.cardNumber }}</text></text >{{ item.userName }} / {{ item.cardNumber }}</text
> >
</view> </view>
</view> </view>

View File

@ -38,11 +38,7 @@ body {
max-height: 600rpx; max-height: 600rpx;
overflow-y: auto; overflow-y: auto;
} }
.app-container {
height: calc(100vh - 70px);
overflow: scroll;
position: relative;
}
.btn-box-fix-btn { .btn-box-fix-btn {
margin-top: 60rpx; margin-top: 60rpx;
display: flex; display: flex;

View File

@ -24,6 +24,7 @@ export const useMemberStore = defineStore(
profile.value.menusNameList = _.pluck(val.menusList, "name"); profile.value.menusNameList = _.pluck(val.menusList, "name");
}; };
const setErr = (v: any) => { const setErr = (v: any) => {
profile.value.err = v; profile.value.err = v;
}; };
@ -41,12 +42,9 @@ export const useMemberStore = defineStore(
}; };
}; };
const mechanism = ref<any>({ const mechanismCode = ref<string>();
mechanismCode: "", const setMechanismCode = (v:string) => {
mechanismName: "", mechanismCode.value = v
});
const setMechanism = (v: { mechanismCode: ""; mechanismName: "" }) => {
mechanism.value = v;
}; };
// 记得 return // 记得 return
@ -55,8 +53,8 @@ export const useMemberStore = defineStore(
setProfile, setProfile,
setErr, setErr,
clearProfile, clearProfile,
mechanism, mechanismCode,
setMechanism, setMechanismCode
}; };
}, },
{ {

View File

@ -30,8 +30,7 @@ const obj = {
options.header["x-userToken"] = token; options.header["x-userToken"] = token;
} }
if (options.url.indexOf("/api/db/getCommonDbPhone") === -1) { if (options.url.indexOf("/api/db/getCommonDbPhone") === -1) {
options.header["mechanismCode"] = store.mechanism.mechanismCode; options.header["mechanismCode"] = store.mechanismCode;
options.header["mechanismName"] = store.mechanism.mechanismName;
} }
}, },
}; };
@ -68,7 +67,7 @@ export const http = <T>(options: UniApp.RequestOptions) => {
// #endif // #endif
}, },
timeout: 1800000, timeout: 1800000,
url: options.url, //仅为示例,非真实的接口地址 url: baseUrl + '/test/sh0001' + options.url, //仅为示例,非真实的接口地址
fileType: "image", fileType: "image",
// #ifdef H5 // #ifdef H5
files: (options as any).data.files, files: (options as any).data.files,

View File

@ -269,15 +269,7 @@ export function formatMoney(
export function countDots(str: any) { export function countDots(str: any) {
return (str.match(/\./g) || []).length; return (str.match(/\./g) || []).length;
} }
export function isTwoDecimalPlaces(num:any) {
// 转换为字符串并移除可能的符号
const str = num.toString().replace(/[-]+/g, '');
// 分割整数部分和小数部分
const parts = str.split('.');
console.log(parts)
// 如果小数点后有两位数字返回true
return parts.length === 2 && parts[1].length > 2;
}
export function validateRegex(regexValue: string, value: string) { export function validateRegex(regexValue: string, value: string) {
const regex = new RegExp(regexValue); const regex = new RegExp(regexValue);
return regex.test(value); return regex.test(value);

View File

@ -26,10 +26,6 @@ const valid = {
pattern: /[^0-9.]/g, pattern: /[^0-9.]/g,
message: "请输入正确的数字", message: "请输入正确的数字",
}, },
valid_decimal2: {
pattern: /([1-9]+[\d]*(\.[0-9]{0,2})?)/,
message: "请输入正确的数字",
},
valid_id_card: { valid_id_card: {
pattern: pattern:
/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,