Compare commits
10 Commits
b6838f3f8d
...
88a7428ed6
Author | SHA1 | Date |
---|---|---|
![]() |
88a7428ed6 | |
![]() |
b23ad4b28a | |
![]() |
58e2cb435b | |
![]() |
37e2c5a641 | |
![]() |
07097b173d | |
![]() |
1e6937966b | |
![]() |
98c4ab41ba | |
![]() |
a3a260341b | |
![]() |
36faef2150 | |
![]() |
a0c55d0be1 |
|
@ -2,12 +2,12 @@
|
|||
<up-row customStyle="flex-wrap: wrap" :gutter="8">
|
||||
<up-col span="6" v-for="(item, index) in list" :key="index">
|
||||
<view class="grid-item">
|
||||
<up-image
|
||||
:src="item.url"
|
||||
<image
|
||||
:src="item.url || `${url}/static/110/error.jpg`"
|
||||
:mode="'widthFix'"
|
||||
:width="'100%'"
|
||||
@click="showImage(index)"
|
||||
></up-image>
|
||||
></image>
|
||||
</view>
|
||||
</up-col>
|
||||
</up-row>
|
||||
|
@ -20,13 +20,14 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { PictureApi } from "@/services";
|
||||
import { url } from "@/utils/data";
|
||||
const props = defineProps<{
|
||||
params: Object;
|
||||
}>();
|
||||
let list: any = ref([]);
|
||||
const showImage = (index: number) => {
|
||||
uni.previewImage({
|
||||
urls: list.value.map((item: any) => item.url), // 图片列表
|
||||
urls: list.value.map((item: any) => item.url || `${url}/static/110/error.jpg`), // 图片列表
|
||||
current: index, // 当前显示图片的索引
|
||||
indicator: "default", // 图片指示器样式,默认为圆点
|
||||
loop: true,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
v-else
|
||||
:placeholder="`请输入${name}`"
|
||||
v-model="keyword"
|
||||
:focus="true"
|
||||
|
||||
bgColor="#fff"
|
||||
clearable
|
||||
:showAction="false"
|
||||
|
|
|
@ -76,12 +76,12 @@ const state = reactive({
|
|||
// path: "/pagesConfig/index",
|
||||
path: "/pagesHome/config",
|
||||
},
|
||||
{
|
||||
text: "配置旧",
|
||||
icon: "config.png",
|
||||
activeIcon: "config_active.png",
|
||||
path: "/pagesHome/index1",
|
||||
},
|
||||
// {
|
||||
// text: "配置旧",
|
||||
// icon: "config.png",
|
||||
// activeIcon: "config_active.png",
|
||||
// path: "/pagesHome/index1",
|
||||
// },
|
||||
{
|
||||
text: "我的",
|
||||
icon: "profile.png",
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
{
|
||||
"path": "profile/baseinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "基础信息",
|
||||
"navigationBarTitleText": "个人信息",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,16 +210,6 @@ 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(() => {
|
||||
(state as any)[item.key] = temp;
|
||||
}, 10);
|
||||
|
@ -424,13 +414,6 @@ const resetState = () => {
|
|||
};
|
||||
|
||||
const getFilter = () => {
|
||||
if (state.minPrice && state.maxPrice && state.minPrice > state.maxPrice) {
|
||||
uni.showToast({
|
||||
title: `最大值应小于最小值`,
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
emit("handleOk", {
|
||||
...state,
|
||||
repairFlag: currentSpl.value,
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
:customStyle="{}"
|
||||
border="none"
|
||||
:disabled="item.type === 'select'"
|
||||
:disabledColor="['收货分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||
:disabledColor="
|
||||
['收货分类'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
|
||||
"
|
||||
@change="(e:any) => {handleInput(e, item)}"
|
||||
@clear="handleClear(item)"
|
||||
>
|
||||
|
@ -66,47 +68,27 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { GoodsApi } from "@/services";
|
||||
import { countDots } from "@/utils";
|
||||
import { countDots, isTwoDecimalPlaces } from "@/utils";
|
||||
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 (["minPrice", "maxPrice", "commonPrice"].indexOf(item.key) > -1) {
|
||||
const temp = e?.replace(valid.valid_decimal.pattern, "");
|
||||
if (countDots(temp).length > 1) {
|
||||
if (countDots(temp) > 1) {
|
||||
uni.showToast({
|
||||
title: "请输入正确的" + item.name,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
const minPrice = parseFloat(model1.formData.minPrice)
|
||||
const maxPrice = parseFloat(model1.formData.maxPrice)
|
||||
if (item.key === "maxPrice") {
|
||||
if (minPrice > maxPrice) {
|
||||
} else if(countDots(temp) === 1 && (isTwoDecimalPlaces(temp))) {
|
||||
uni.showToast({
|
||||
title: `${item.name}应小于${model1.formData.maxPrice}`,
|
||||
title: item.name + "最多只能输入2位小数",
|
||||
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(() => {
|
||||
|
@ -151,24 +133,6 @@ const rules = ref({
|
|||
// message: "请输入所属分站",
|
||||
// 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>({
|
||||
reCategory: {
|
||||
|
@ -198,32 +162,25 @@ const formAttrList = reactive<any>([
|
|||
contrlModalParams.reCategory.title = "收货分类";
|
||||
},
|
||||
},
|
||||
// {
|
||||
// name: "所属分站",
|
||||
// key: "substationName",
|
||||
// type: "input",
|
||||
// required: true,
|
||||
// unit: "",
|
||||
// },
|
||||
{
|
||||
name: "最低价",
|
||||
key: "minPrice",
|
||||
type: "input",
|
||||
required: true,
|
||||
required: false,
|
||||
unit: "",
|
||||
},
|
||||
{
|
||||
name: "最高价",
|
||||
key: "maxPrice",
|
||||
type: "input",
|
||||
required: true,
|
||||
required: false,
|
||||
unit: "",
|
||||
},
|
||||
{
|
||||
name: "常用价格",
|
||||
key: "commonPrice",
|
||||
type: "input",
|
||||
required: true,
|
||||
required: false,
|
||||
unit: "",
|
||||
},
|
||||
]);
|
||||
|
@ -255,27 +212,7 @@ const check = () => {
|
|||
};
|
||||
|
||||
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) => {
|
||||
if (res) {
|
||||
startSave();
|
||||
|
@ -286,13 +223,13 @@ const startSave = () => {
|
|||
if (model1.formData.id) {
|
||||
GoodsApi.EditReceiveProduct(model1.formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
GoodsApi.addReProducts(model1.formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -324,7 +261,7 @@ onLoad((option) => {
|
|||
|
||||
// 设置页面标题
|
||||
uni.setNavigationBarTitle({
|
||||
title: title || '新增收货产品',
|
||||
title: title || "新增收货产品",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -350,7 +287,7 @@ onLoad((option) => {
|
|||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||
padding: 25rpx 50rpx;
|
||||
position: fixed;
|
||||
width: calc(100vw - 100rpx);
|
||||
width: calc(100vw - 100rpx);
|
||||
bottom: 0rpx;
|
||||
z-index: 999;
|
||||
::v-deep button {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<u-form
|
||||
labelPosition="left"
|
||||
:model="model1"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
border="none"
|
||||
:maxlength="item.key === 'password' ? 8 : -1"
|
||||
@change="(e:any) => {handleInput(e, item)}"
|
||||
:disabled="item.type === 'select'"
|
||||
:disabled="item.type === 'select' || isEditPhone(item)"
|
||||
:disabledColor="
|
||||
['性别', '用户角色'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
|
||||
"
|
||||
|
@ -100,6 +100,12 @@ const handleInput = (e: any, item: any) => {
|
|||
}, 10);
|
||||
}
|
||||
};
|
||||
|
||||
const isEditPhone = (item:any) => {
|
||||
if (model1.formData.id && item.key === 'phone') {
|
||||
return true
|
||||
}
|
||||
}
|
||||
const model1 = reactive<any>({
|
||||
formData: {
|
||||
gender: 1
|
||||
|
@ -272,7 +278,6 @@ onLoad((option: any) => {
|
|||
if (option.item) {
|
||||
const obj = JSON.parse(option.item);
|
||||
model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] };
|
||||
debugger
|
||||
if (obj.roleVos.length > 0) {
|
||||
model1.formData.roleIds = [obj.roleVos[0].id];
|
||||
model1.formData.roleName = obj.roleVos[0].roleName;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="search">
|
||||
<u-search
|
||||
placeholder="请输入客户名称"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="search">
|
||||
<u-search
|
||||
placeholder="请输入收货产品名称"
|
||||
|
@ -28,7 +28,6 @@
|
|||
<view>
|
||||
<view>
|
||||
<view>{{ item.reProductsName }}</view>
|
||||
<view>{{ item.minPrice }} ~ {{ item.maxPrice }} 元</view>
|
||||
</view>
|
||||
<view class="op-box">
|
||||
<view class="btn" @click="edit(item)"> 编辑 </view>
|
||||
|
|
|
@ -183,17 +183,6 @@ const handleInput = (e: any, item: any) => {
|
|||
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 (
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="search">
|
||||
<u-search
|
||||
placeholder="请输入收货分类"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="search">
|
||||
<u-search
|
||||
placeholder="请输入出货产品名称"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="collapse-box box">
|
||||
<view v-for="(item, index) in pageList.list" :key="index">
|
||||
<view class="item">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="search">
|
||||
<u-search
|
||||
placeholder="请输入库存卡号"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="search">
|
||||
<view class="type" @click="state.isShowType = true"
|
||||
>全部分类<u-icon name="arrow-down"></u-icon>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="search">
|
||||
<u-search
|
||||
placeholder="请输入供应商分类"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<view class="search">
|
||||
<u-search
|
||||
placeholder="请输入人员名称"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<up-icon
|
||||
name="minus"
|
||||
@click="decrease"
|
||||
:size="14"
|
||||
:size="22"
|
||||
color="rgba(0,0,0,0.25)"
|
||||
></up-icon>
|
||||
<input
|
||||
|
@ -17,7 +17,7 @@
|
|||
<up-icon
|
||||
name="plus"
|
||||
@click="increase"
|
||||
:size="14"
|
||||
:size="22"
|
||||
color="rgba(0,0,0,0.25)"
|
||||
></up-icon>
|
||||
</view>
|
||||
|
@ -31,7 +31,7 @@ const props = defineProps<{
|
|||
}>();
|
||||
const emit = defineEmits(["changeValue"]);
|
||||
const num = ref(props.value);
|
||||
const handleInput = (event) => {
|
||||
const handleInput = (event:any) => {
|
||||
const value = parseInt(event.target.value);
|
||||
if (!isNaN(value) && value >= 1) {
|
||||
num.value = value;
|
||||
|
@ -59,7 +59,7 @@ const decrease = () => {
|
|||
align-items: center;
|
||||
justify-items: center;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
padding: 0rpx 8rpx;
|
||||
padding: 4px;
|
||||
border-radius: 5px;
|
||||
margin: 0rpx 16rpx;
|
||||
.uni-input {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<block v-if="Object.keys(state.formData).length > 0">
|
||||
<view v-if="Object.keys(state.formData).length > 0" class="app-container">
|
||||
<view class="title">终端机自动打单配置</view>
|
||||
<view class="box">
|
||||
<view
|
||||
|
@ -40,7 +40,7 @@
|
|||
<view
|
||||
>收货-待审核联单打印<AvatarInput
|
||||
:min="1"
|
||||
:max="7"
|
||||
:max="5"
|
||||
:value="state.formData.manualPrintAudit"
|
||||
@changeValue="
|
||||
(v) => {
|
||||
|
@ -53,7 +53,7 @@
|
|||
<view
|
||||
>收货-已审核联单打印<AvatarInput
|
||||
:min="1"
|
||||
:max="7"
|
||||
:max="5"
|
||||
:value="state.formData.manualPrintAudited"
|
||||
@changeValue="
|
||||
(v) => {
|
||||
|
@ -66,7 +66,7 @@
|
|||
<view
|
||||
>出货-待结算联单打印<AvatarInput
|
||||
:min="1"
|
||||
:max="7"
|
||||
:max="5"
|
||||
:value="state.formData.manualPrintToBeSettled"
|
||||
@changeValue="
|
||||
(v) => {
|
||||
|
@ -79,7 +79,7 @@
|
|||
<view
|
||||
>出货-已结算联单打印<AvatarInput
|
||||
:min="1"
|
||||
:max="7"
|
||||
:max="5"
|
||||
:value="state.formData.manualPrintSettled"
|
||||
@changeValue="
|
||||
(v) => {
|
||||
|
@ -112,6 +112,7 @@
|
|||
></view>
|
||||
<view
|
||||
v-for="item in state.formData.devices"
|
||||
v-if="state.formData.autoSettlement"
|
||||
:key="item.id"
|
||||
style="padding: 8rpx 44rpx"
|
||||
>{{ item.deviceName }}
|
||||
|
@ -128,7 +129,7 @@
|
|||
天后自动结算</view
|
||||
>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="btn-box-fix-btn">
|
||||
<u-button
|
||||
|
@ -198,6 +199,7 @@ const handleSave = () => {
|
|||
uni.showToast({
|
||||
title: "设置更新成功",
|
||||
});
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -206,7 +208,7 @@ const showSelect = () => {
|
|||
state.show = true;
|
||||
};
|
||||
|
||||
const selectClick = (v:any) => {
|
||||
const selectClick = (v: any) => {
|
||||
state.formData.settlementConfig = v.id;
|
||||
state.show = false;
|
||||
};
|
||||
|
|
|
@ -8,13 +8,22 @@
|
|||
:checked="item.templateDeleted"
|
||||
:activeColor="'#00D2E3'"
|
||||
:usedAlone="true"
|
||||
@change="(v) => {item.templateDeleted = v}"
|
||||
@change="
|
||||
(v:any) => {
|
||||
item.templateDeleted = v;
|
||||
}
|
||||
"
|
||||
>
|
||||
</up-checkbox>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box-fix-btn">
|
||||
<u-button type="primary" text="保存" shape="circle" @click="handleSave"></u-button>
|
||||
<u-button
|
||||
type="primary"
|
||||
text="保存"
|
||||
shape="circle"
|
||||
@click="handleSave"
|
||||
></u-button>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
@ -22,17 +31,20 @@ import { onLoad } from "@dcloudio/uni-app";
|
|||
import { OtherConfigApi } from "@/services/index";
|
||||
|
||||
const title = ref("");
|
||||
const list = ref([]);
|
||||
const list: any = ref([]);
|
||||
|
||||
const handleSave = () => {
|
||||
OtherConfigApi.updatePrintTemplate({printTemplatePos: list.value}).then(res => {
|
||||
if(res.code === 200) {
|
||||
OtherConfigApi.updatePrintTemplate({ printTemplatePos: list.value }).then(
|
||||
(res) => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: "设置更新成功",
|
||||
});
|
||||
uni.navigateBack();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
onLoad((option: any) => {
|
||||
// 设置页面标题
|
||||
if (option.key) {
|
||||
|
|
|
@ -140,7 +140,7 @@ const getCode = () => {
|
|||
(res: any) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data.length > 0) {
|
||||
store.setMechanismCode(res.data[0].mechanismCode);
|
||||
store.setMechanism({mechanismCode: res.data[0].mechanismCode, mechanismName: res.data[0].mechanismName});
|
||||
sendMsg();
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="baseinfo">
|
||||
<view class="box">
|
||||
<view> 姓名: {{ profile.userName }} </view>
|
||||
<view> 姓名: {{ profile.name }} </view>
|
||||
<view> 性别: {{ profile.gender ? (profile.gender === 1 ? '男' : '女') :'未知' }} </view>
|
||||
<view> 手机号码: {{ profile.phone }} </view>
|
||||
</view>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="c-card">
|
||||
<view class="c-card app-container">
|
||||
<u-form
|
||||
labelPosition="left"
|
||||
:model="model1"
|
||||
|
@ -111,7 +111,11 @@
|
|||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="暂不定价" @click="handleBack()"></u-button>
|
||||
<u-button type="primary" text="保存" @click="save()"></u-button>
|
||||
<u-button
|
||||
type="primary"
|
||||
:text="title === '定价详情' ? '定价' : '保存'"
|
||||
@click="save()"
|
||||
></u-button>
|
||||
</view>
|
||||
|
||||
<!-- 收货产品弹框 -->
|
||||
|
@ -188,17 +192,6 @@ const handleInput = (e: any, item: any) => {
|
|||
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(() => {
|
||||
model1.order[item.key] = temp;
|
||||
|
@ -674,18 +667,6 @@ const save = () => {
|
|||
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 (
|
||||
model1.order.grossWeight?.toString() &&
|
||||
model1.order.grossWeight?.toString()[
|
||||
|
@ -766,22 +747,28 @@ const updateOrder = () => {
|
|||
});
|
||||
} else {
|
||||
// 0:有皮重 1:零皮重
|
||||
uni.redirectTo({
|
||||
url: "/pagesHome/index", // 要跳转到的页面路径
|
||||
});
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const prePage = ref("");
|
||||
onLoad((option) => {
|
||||
model1.order.id = parseInt((option as any).id);
|
||||
prePage.value = (option as any).prePage;
|
||||
const title = ref("")
|
||||
onLoad((option: any) => {
|
||||
model1.order.id = parseInt(option.id);
|
||||
prePage.value = option.prePage;
|
||||
title.value = option.title
|
||||
|
||||
if (prePage.value) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: "编辑信息",
|
||||
});
|
||||
}
|
||||
if (option.title) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: option.title,
|
||||
});
|
||||
}
|
||||
|
||||
if (model1.order.id) {
|
||||
ReceiveApi.getDetailById({ id: model1.order.id }).then((res) => {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<u-search
|
||||
placeholder="请输入供应商名称"
|
||||
v-model="keyword"
|
||||
:focus="true"
|
||||
|
||||
bgColor="#fff"
|
||||
clearable
|
||||
:showAction="false"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<u-search
|
||||
placeholder="请输入供应商名称"
|
||||
v-model="keyword"
|
||||
:focus="true"
|
||||
|
||||
bgColor="#fff"
|
||||
clearable
|
||||
:showAction="false"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</view>
|
||||
<view>
|
||||
<text class="name"
|
||||
>{{ item.userName }} / {{ item.cardNumber }}</text
|
||||
>{{ item.userName }} <text v-if="item.cardNumber"> / {{ item.cardNumber }}</text></text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -111,6 +111,7 @@ import PageView from "@/components/PageView/index.vue";
|
|||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { DeviceType, ScaleStatus } from "@/utils/enum";
|
||||
import _ from "underscore";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
|
||||
const stateNew = reactive<any>({
|
||||
keywoard: "",
|
||||
|
@ -183,8 +184,8 @@ const pricingDetail = (id: number) => {
|
|||
resetPageList();
|
||||
getList();
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: "/pagesReceive/form/pricingForm?id=" + id, // 要跳转到的页面路径
|
||||
uni.navigateTo({
|
||||
url: `/pagesReceive/form/pricingForm?id=${id}&title=${state.scaleStatus === 0 ? '定价' : '编辑'}详情`, // 要跳转到的页面路径
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -227,9 +228,10 @@ const handleOk = () => {
|
|||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
onShow(() => {
|
||||
resetPageList();
|
||||
getList();
|
||||
});
|
||||
})
|
||||
|
||||
onLoad((option) => {
|
||||
// 接收传递的标题参数
|
||||
|
|
|
@ -13,11 +13,8 @@
|
|||
>
|
||||
<view class="time">{{ item.createTime }}</view>
|
||||
<text class="tip">{{ getType(item.imagesType) }}过磅</text>
|
||||
<image
|
||||
:src="item.url"
|
||||
:mode="'widthFix'"
|
||||
@click="showImage(index)"
|
||||
/>
|
||||
<image :src="item.url || `${url}/static/110/error.jpg`" :mode="'widthFix'" @click="showImage(index)">
|
||||
</image>
|
||||
</view>
|
||||
</up-col>
|
||||
</up-row>
|
||||
|
@ -31,6 +28,7 @@
|
|||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { PictureApi } from "@/services/index";
|
||||
import { ImagesType } from "@/utils/enum";
|
||||
import { url } from "@/utils/data";
|
||||
let list: any = ref([]);
|
||||
const getType = (v: number) => {
|
||||
if (v === ImagesType.Tare) {
|
||||
|
@ -42,12 +40,12 @@ const getType = (v: number) => {
|
|||
}
|
||||
};
|
||||
|
||||
const showImage = ( index:number) => {
|
||||
const showImage = (index: number) => {
|
||||
uni.previewImage({
|
||||
urls: list.value.map((item:any) => item.url), // 图片列表
|
||||
urls: list.value.map((item: any) => item.url || `${url}/static/110/error.jpg`), // 图片列表
|
||||
current: index, // 当前显示图片的索引
|
||||
indicator: "default", // 图片指示器样式,默认为圆点
|
||||
loop:true,
|
||||
loop: true,
|
||||
});
|
||||
};
|
||||
onLoad((option: any) => {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<u-search
|
||||
placeholder="请输入客户名称"
|
||||
v-model="keyword"
|
||||
:focus="true"
|
||||
|
||||
bgColor="#fff"
|
||||
clearable
|
||||
:showAction="false"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<u-search
|
||||
placeholder="请输入客户名称"
|
||||
v-model="keyword"
|
||||
:focus="true"
|
||||
|
||||
bgColor="#fff"
|
||||
clearable
|
||||
:showAction="false"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<u-search
|
||||
placeholder="请输入客户名称"
|
||||
v-model="keyword"
|
||||
:focus="true"
|
||||
|
||||
bgColor="#fff"
|
||||
clearable
|
||||
:showAction="false"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</view>
|
||||
<view>
|
||||
<text class="name"
|
||||
>{{ item.userName }} / {{ item.cardNumber }}</text
|
||||
>{{ item.userName }} <text v-if="item.cardNumber"> / {{ item.cardNumber }}</text></text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -38,7 +38,11 @@ body {
|
|||
max-height: 600rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
height: calc(100vh - 70px);
|
||||
overflow: scroll;
|
||||
position: relative;
|
||||
}
|
||||
.btn-box-fix-btn {
|
||||
margin-top: 60rpx;
|
||||
display: flex;
|
||||
|
|
|
@ -24,7 +24,6 @@ export const useMemberStore = defineStore(
|
|||
profile.value.menusNameList = _.pluck(val.menusList, "name");
|
||||
};
|
||||
|
||||
|
||||
const setErr = (v: any) => {
|
||||
profile.value.err = v;
|
||||
};
|
||||
|
@ -42,9 +41,12 @@ export const useMemberStore = defineStore(
|
|||
};
|
||||
};
|
||||
|
||||
const mechanismCode = ref<string>();
|
||||
const setMechanismCode = (v:string) => {
|
||||
mechanismCode.value = v
|
||||
const mechanism = ref<any>({
|
||||
mechanismCode: "",
|
||||
mechanismName: "",
|
||||
});
|
||||
const setMechanism = (v: { mechanismCode: ""; mechanismName: "" }) => {
|
||||
mechanism.value = v;
|
||||
};
|
||||
|
||||
// 记得 return
|
||||
|
@ -53,8 +55,8 @@ export const useMemberStore = defineStore(
|
|||
setProfile,
|
||||
setErr,
|
||||
clearProfile,
|
||||
mechanismCode,
|
||||
setMechanismCode
|
||||
mechanism,
|
||||
setMechanism,
|
||||
};
|
||||
},
|
||||
{
|
||||
|
|
|
@ -30,7 +30,8 @@ const obj = {
|
|||
options.header["x-userToken"] = token;
|
||||
}
|
||||
if (options.url.indexOf("/api/db/getCommonDbPhone") === -1) {
|
||||
options.header["mechanismCode"] = store.mechanismCode;
|
||||
options.header["mechanismCode"] = store.mechanism.mechanismCode;
|
||||
options.header["mechanismName"] = store.mechanism.mechanismName;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -67,7 +68,7 @@ export const http = <T>(options: UniApp.RequestOptions) => {
|
|||
// #endif
|
||||
},
|
||||
timeout: 1800000,
|
||||
url: baseUrl + '/test/sh0001' + options.url, //仅为示例,非真实的接口地址
|
||||
url: options.url, //仅为示例,非真实的接口地址
|
||||
fileType: "image",
|
||||
// #ifdef H5
|
||||
files: (options as any).data.files,
|
||||
|
|
|
@ -269,7 +269,15 @@ export function formatMoney(
|
|||
export function countDots(str: any) {
|
||||
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) {
|
||||
const regex = new RegExp(regexValue);
|
||||
return regex.test(value);
|
||||
|
|
|
@ -26,6 +26,10 @@ const valid = {
|
|||
pattern: /[^0-9.]/g,
|
||||
message: "请输入正确的数字",
|
||||
},
|
||||
valid_decimal2: {
|
||||
pattern: /([1-9]+[\d]*(\.[0-9]{0,2})?)/,
|
||||
message: "请输入正确的数字",
|
||||
},
|
||||
valid_id_card: {
|
||||
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]$/,
|
||||
|
|
Loading…
Reference in New Issue