update: 真机input clear失效
This commit is contained in:
parent
efd1325723
commit
11ae6ea0aa
|
@ -1,19 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="layout-box">
|
<view class="layout-box">
|
||||||
<view class="filter">
|
<view class="filter">
|
||||||
<u-input
|
<up-input
|
||||||
v-model="state.startTime"
|
v-model="state.startTime"
|
||||||
disabled
|
disabled
|
||||||
disabledColor=""
|
disabledColor=""
|
||||||
placeholder="请选择开始时间"
|
placeholder="请选择开始时间"
|
||||||
></u-input>
|
></up-input>
|
||||||
<text>-</text>
|
<text>-</text>
|
||||||
<u-input
|
<up-input
|
||||||
v-model="state.endTime"
|
v-model="state.endTime"
|
||||||
disabled
|
disabled
|
||||||
disabledColor=""
|
disabledColor=""
|
||||||
placeholder="请选择结束时间"
|
placeholder="请选择结束时间"
|
||||||
></u-input>
|
></up-input>
|
||||||
<u-icon
|
<u-icon
|
||||||
name="arrow-down"
|
name="arrow-down"
|
||||||
@click="handleDialog('showTime', true)"
|
@click="handleDialog('showTime', true)"
|
||||||
|
@ -192,7 +192,7 @@ onMounted(() => {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
::v-deep .u-input {
|
::v-deep .up-input {
|
||||||
padding: 0rpx 16rpx !important;
|
padding: 0rpx 16rpx !important;
|
||||||
input {
|
input {
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="layout-box">
|
<view class="layout-box">
|
||||||
<view class="filter">
|
<view class="filter">
|
||||||
<u-input
|
<up-input
|
||||||
v-model="state.startTime"
|
v-model="state.startTime"
|
||||||
disabled
|
disabled
|
||||||
disabledColor=""
|
disabledColor=""
|
||||||
placeholder="请选择开始时间"
|
placeholder="请选择开始时间"
|
||||||
></u-input>
|
></up-input>
|
||||||
<text>-</text>
|
<text>-</text>
|
||||||
<u-input
|
<up-input
|
||||||
v-model="state.endTime"
|
v-model="state.endTime"
|
||||||
disabled
|
disabled
|
||||||
disabledColor=""
|
disabledColor=""
|
||||||
placeholder="请选择结束时间"
|
placeholder="请选择结束时间"
|
||||||
></u-input>
|
></up-input>
|
||||||
<u-icon
|
<u-icon
|
||||||
name="arrow-down"
|
name="arrow-down"
|
||||||
@click="handleDialog('showTime', true)"
|
@click="handleDialog('showTime', true)"
|
||||||
|
@ -269,7 +269,7 @@ onMounted(() => {
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
::v-deep .u-input {
|
::v-deep .up-input {
|
||||||
padding: 0rpx 16.03rpx !important;
|
padding: 0rpx 16.03rpx !important;
|
||||||
input {
|
input {
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="layout-box">
|
<view class="layout-box">
|
||||||
<view class="filter">
|
<view class="filter">
|
||||||
<u-input
|
<up-input
|
||||||
v-model="state.startTime"
|
v-model="state.startTime"
|
||||||
disabled
|
disabled
|
||||||
disabledColor=""
|
disabledColor=""
|
||||||
placeholder="请选择开始时间"
|
placeholder="请选择开始时间"
|
||||||
></u-input>
|
></up-input>
|
||||||
<text>-</text>
|
<text>-</text>
|
||||||
<u-input
|
<up-input
|
||||||
v-model="state.endTime"
|
v-model="state.endTime"
|
||||||
disabled
|
disabled
|
||||||
disabledColor=""
|
disabledColor=""
|
||||||
placeholder="请选择结束时间"
|
placeholder="请选择结束时间"
|
||||||
></u-input>
|
></up-input>
|
||||||
<u-icon
|
<u-icon
|
||||||
name="arrow-down"
|
name="arrow-down"
|
||||||
@click="handleDialog('showTime', true)"
|
@click="handleDialog('showTime', true)"
|
||||||
|
@ -266,7 +266,7 @@ onMounted(() => {
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
::v-deep .u-input {
|
::v-deep .up-input {
|
||||||
padding: 0rpx 16.03rpx !important;
|
padding: 0rpx 16.03rpx !important;
|
||||||
input {
|
input {
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="layout-box">
|
<view class="layout-box">
|
||||||
<view class="filter">
|
<view class="filter">
|
||||||
<u-input
|
<up-input
|
||||||
v-model="state.startTime"
|
v-model="state.startTime"
|
||||||
disabled
|
disabled
|
||||||
disabledColor=""
|
disabledColor=""
|
||||||
placeholder="请选择开始时间"
|
placeholder="请选择开始时间"
|
||||||
></u-input>
|
></up-input>
|
||||||
<text>-</text>
|
<text>-</text>
|
||||||
<u-input
|
<up-input
|
||||||
v-model="state.endTime"
|
v-model="state.endTime"
|
||||||
disabled
|
disabled
|
||||||
disabledColor=""
|
disabledColor=""
|
||||||
placeholder="请选择结束时间"
|
placeholder="请选择结束时间"
|
||||||
></u-input>
|
></up-input>
|
||||||
<u-icon
|
<u-icon
|
||||||
name="arrow-down"
|
name="arrow-down"
|
||||||
@click="handleDialog('showTime', true)"
|
@click="handleDialog('showTime', true)"
|
||||||
|
@ -190,7 +190,7 @@ onMounted(() => {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
::v-deep .u-input {
|
::v-deep .up-input {
|
||||||
padding: 0rpx 16.03rpx !important;
|
padding: 0rpx 16.03rpx !important;
|
||||||
input {
|
input {
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
:focus="true"
|
:focus="true"
|
||||||
bgColor="#fff"
|
bgColor="#fff"
|
||||||
:clearabled="true"
|
clearable
|
||||||
:showAction="false"
|
:showAction="false"
|
||||||
placeholderColor="#C1C1C1"
|
placeholderColor="#C1C1C1"
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<view class="title">收货单价区间</view>
|
<view class="title">收货单价区间</view>
|
||||||
<view class="range">
|
<view class="range">
|
||||||
<view>
|
<view>
|
||||||
<u-input
|
<up-input
|
||||||
shape="circle"
|
shape="circle"
|
||||||
:fontSize="12"
|
:fontSize="12"
|
||||||
:placeholderStyle="{ fontSize: '12px' }"
|
:placeholderStyle="{ fontSize: '12px' }"
|
||||||
|
@ -53,11 +53,11 @@
|
||||||
size="small"
|
size="small"
|
||||||
v-model="state.minPrice"
|
v-model="state.minPrice"
|
||||||
@change="(e:any) => {handleInput(e, {key: 'minPrice', name: '最低价'})}"
|
@change="(e:any) => {handleInput(e, {key: 'minPrice', name: '最低价'})}"
|
||||||
></u-input
|
></up-input
|
||||||
></view>
|
></view>
|
||||||
-
|
-
|
||||||
<view>
|
<view>
|
||||||
<u-input
|
<up-input
|
||||||
shape="circle"
|
shape="circle"
|
||||||
:fontSize="12"
|
:fontSize="12"
|
||||||
:placeholderStyle="{ fontSize: '12px' }"
|
:placeholderStyle="{ fontSize: '12px' }"
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
size="small"
|
size="small"
|
||||||
v-model="state.maxPrice"
|
v-model="state.maxPrice"
|
||||||
@change="(e:any) => {handleInput(e, {key: 'maxPrice', name: '最高价'})}"
|
@change="(e:any) => {handleInput(e, {key: 'maxPrice', name: '最高价'})}"
|
||||||
></u-input
|
></up-input
|
||||||
></view>
|
></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -222,7 +222,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(state as any)[item.key] = temp;
|
(state as any)[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,24 +22,25 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.type === 'select'"
|
:disabled="item.type === 'select'"
|
||||||
:disabledColor="['卡号'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['卡号'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select'">
|
<template #right v-if="item.type === 'select'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -67,7 +68,11 @@ import { formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,25 +22,26 @@
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="['客户','结算时间', '结算方式'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['客户','结算时间', '结算方式'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<!-- @afterRead="afterRead"
|
<!-- @afterRead="afterRead"
|
||||||
@delete="deletePic" -->
|
@delete="deletePic" -->
|
||||||
<uni-file-picker
|
<uni-file-picker
|
||||||
|
@ -107,6 +108,11 @@ import { ImagesType, OrderType } from "@/utils/enum";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
import SupplierDialog from "./SupplierDialog.vue";
|
import SupplierDialog from "./SupplierDialog.vue";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.order as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
// 供应商选择
|
// 供应商选择
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
|
@ -141,7 +147,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,25 +24,26 @@
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="['供应商','客户','结算时间', '结算方式'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['供应商','客户','结算时间', '结算方式'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<!-- @afterRead="afterRead"
|
<!-- @afterRead="afterRead"
|
||||||
@delete="deletePic" -->
|
@delete="deletePic" -->
|
||||||
<uni-file-picker
|
<uni-file-picker
|
||||||
|
@ -115,6 +116,11 @@ import { ImagesType, OrderType } from "@/utils/enum";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
import SupplierDialog from "./SupplierDialog.vue";
|
import SupplierDialog from "./SupplierDialog.vue";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.order as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
// 供应商选择
|
// 供应商选择
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
|
@ -149,7 +155,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,25 +22,26 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.type === 'select'"
|
:disabled="item.type === 'select'"
|
||||||
:disabledColor="['收货分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['收货分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select'">
|
<template #right v-if="item.type === 'select'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -69,6 +70,11 @@ 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) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
// 最低价 最高价 常用价格
|
// 最低价 最高价 常用价格
|
||||||
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) {
|
||||||
|
@ -105,7 +111,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.formData[item.key] = temp;
|
model1.formData[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
if (item.key === "subtractNum") {
|
if (item.key === "subtractNum") {
|
||||||
const temp = e?.replace(valid.valid_decimal.pattern, "");
|
const temp = e?.replace(valid.valid_decimal.pattern, "");
|
||||||
|
@ -120,7 +126,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
|
|
|
@ -22,22 +22,23 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select'">
|
<template #right v-if="item.type === 'select'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -65,7 +66,11 @@ import { formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,23 +22,24 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
:password="item.name === 'password'"
|
:password="item.name === 'password'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select'">
|
<template #right v-if="item.type === 'select'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -92,7 +93,11 @@ import { deleteBaseKey, formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="
|
v-if="
|
||||||
item.type === 'select' ||
|
item.type === 'select' ||
|
||||||
item.type === 'input' ||
|
item.type === 'input' ||
|
||||||
|
@ -32,18 +32,19 @@
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.type === 'cascader'"
|
:disabled="item.type === 'cascader'"
|
||||||
:disabledColor="['出货分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['出货分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template
|
<template
|
||||||
#right
|
#right
|
||||||
v-if="item.type === 'select' || item.type === 'cascader'"
|
v-if="item.type === 'select' || item.type === 'cascader'"
|
||||||
|
@ -84,6 +85,11 @@ import { formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const { proxy }: any = getCurrentInstance();
|
const { proxy }: any = getCurrentInstance();
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
|
|
|
@ -22,24 +22,25 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.type === 'select'"
|
:disabled="item.type === 'select'"
|
||||||
:disabledColor="['上级菜单'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['上级菜单'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select'">
|
<template #right v-if="item.type === 'select'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -65,7 +66,11 @@
|
||||||
import { GoodsApi } from "@/services";
|
import { GoodsApi } from "@/services";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,24 +22,25 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input' || item.type === 'selectCustom'"
|
v-if="item.type === 'select' || item.type === 'input' || item.type === 'selectCustom'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type.indexOf('select') > -1 ? '选择' : '输入'}${
|
:placeholder="`请${item.type.indexOf('select') > -1 ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.type === 'selectCustom'"
|
:disabled="item.type === 'selectCustom'"
|
||||||
:disabledColor="['类型'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['类型'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select' || item.type === 'selectCustom'">
|
<template #right v-if="item.type === 'select' || item.type === 'selectCustom'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -67,7 +68,11 @@ import { deleteBaseKey, formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,25 +22,26 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
:disabled="item.type === 'select'"
|
:disabled="item.type === 'select'"
|
||||||
:disabledColor="['卡号', '供应商分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['卡号', '供应商分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select'">
|
<template #right v-if="item.type === 'select'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -69,12 +70,17 @@ import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const handleInput = (e: any, item: any) => {
|
const handleInput = (e: any, item: any) => {
|
||||||
if (item.key === "phone" || item.key === 'bankNumber') {
|
if (item.key === "phone" || item.key === 'bankNumber') {
|
||||||
const temp = e?.replace(valid.valid_number, "");
|
const temp = e?.replace(valid.valid_number, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.formData[item.key] = temp;
|
model1.formData[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
|
|
|
@ -22,22 +22,23 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select'">
|
<template #right v-if="item.type === 'select'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -63,7 +64,11 @@
|
||||||
import { SupplierApi } from "@/services";
|
import { SupplierApi } from "@/services";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,27 +22,28 @@
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
:password="item.key === 'password'"
|
:password="item.key === 'password'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:maxlength="item.key === 'password' ? 6 : -1"
|
:maxlength="item.key === 'password' ? 6 : -1"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
:disabled="item.type === 'select'"
|
:disabled="item.type === 'select'"
|
||||||
:disabledColor="['性别', '用户角色'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['性别', '用户角色'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text>
|
<text>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<template #right v-if="item.type === 'select'">
|
<template #right v-if="item.type === 'select'">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -71,12 +72,17 @@ import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.formData as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const handleInput = (e: any, item: any) => {
|
const handleInput = (e: any, item: any) => {
|
||||||
if (item.key === "phone") {
|
if (item.key === "phone") {
|
||||||
const temp = e?.replace(valid.valid_number, "");
|
const temp = e?.replace(valid.valid_number, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.formData[item.key] = temp;
|
model1.formData[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
|
@ -87,7 +93,7 @@ const rules = ref({
|
||||||
"formData.userName": {
|
"formData.userName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入用户名",
|
message: "请输入账号",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"formData.password": {
|
"formData.password": {
|
||||||
|
@ -146,7 +152,7 @@ const formAttrList = reactive<any>([
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "用户名",
|
name: "账号",
|
||||||
key: "userName",
|
key: "userName",
|
||||||
type: "input",
|
type: "input",
|
||||||
required: true,
|
required: true,
|
||||||
|
|
|
@ -22,18 +22,19 @@
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="['补单时间','站点磅秤','供应商','收货产品'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['补单时间','站点磅秤','供应商','收货产品'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text v-if="item.key === 'subtractNum'">
|
<text v-if="item.key === 'subtractNum'">
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<!-- @afterRead="afterRead"
|
<!-- @afterRead="afterRead"
|
||||||
@delete="deletePic" -->
|
@delete="deletePic" -->
|
||||||
<uni-file-picker
|
<uni-file-picker
|
||||||
|
@ -129,6 +130,12 @@ import _ from "underscore";
|
||||||
import SupplierDialog from "./components/SupplierDialog.vue";
|
import SupplierDialog from "./components/SupplierDialog.vue";
|
||||||
import ProductDialog from "./components/ProductDialog.vue";
|
import ProductDialog from "./components/ProductDialog.vue";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
|
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.order as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
// 供应商选择
|
// 供应商选择
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
|
@ -195,7 +202,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
if (item.key === "subtractNum") {
|
if (item.key === "subtractNum") {
|
||||||
const temp = e?.replace(valid.valid_decimal.pattern, "");
|
const temp = e?.replace(valid.valid_decimal.pattern, "");
|
||||||
|
@ -210,7 +217,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,18 +22,19 @@
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="['补单时间','过磅设备','客户','出货产品'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="['补单时间','过磅设备','客户','出货产品'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text v-if="item.key === 'subtractNum'">
|
<text v-if="item.key === 'subtractNum'">
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<!-- @afterRead="afterRead"
|
<!-- @afterRead="afterRead"
|
||||||
@delete="deletePic" -->
|
@delete="deletePic" -->
|
||||||
<uni-file-picker
|
<uni-file-picker
|
||||||
|
@ -128,6 +129,11 @@ import _ from "underscore";
|
||||||
import SupplierDialog from "./components/SupplierDialog.vue";
|
import SupplierDialog from "./components/SupplierDialog.vue";
|
||||||
import ProductDialog from "./components/ProductDialog.vue";
|
import ProductDialog from "./components/ProductDialog.vue";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.order as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
// 供应商选择
|
// 供应商选择
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
|
@ -166,7 +172,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.key === "number" ) {
|
if (item.key === "number" ) {
|
||||||
|
@ -180,7 +186,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
:prop="`userInfo.${item.modelName}`"
|
:prop="`userInfo.${item.modelName}`"
|
||||||
>
|
>
|
||||||
<view v-if="item.type === 'text'">
|
<view v-if="item.type === 'text'">
|
||||||
<u-input
|
<up-input
|
||||||
v-model="model1.userInfo[`${item.modelName}`]"
|
v-model="model1.userInfo[`${item.modelName}`]"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
:shape="'circle'"
|
:shape="'circle'"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
'border-color':
|
'border-color':
|
||||||
currentFocus === item.modelName ? '#00dcee !important' : '',
|
currentFocus === item.modelName ? '#00dcee !important' : '',
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
@focus="handleFocus(item.modelName)"
|
@focus="handleFocus(item.modelName)"
|
||||||
@blur="handleFocus('')"
|
@blur="handleFocus('')"
|
||||||
@change="(e:any) => {handleInput(e, item.modelName)}"
|
@change="(e:any) => {handleInput(e, item.modelName)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text v-if="item.modelName === 'code'" class="code-btn">
|
<text v-if="item.modelName === 'code'" class="code-btn">
|
||||||
|
@ -40,14 +41,14 @@
|
||||||
>
|
>
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.type === 'password'">
|
<view v-if="item.type === 'password'">
|
||||||
<u-input
|
<up-input
|
||||||
v-model="model1.userInfo[`${item.modelName}`]"
|
v-model="model1.userInfo[`${item.modelName}`]"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
:shape="'circle'"
|
:shape="'circle'"
|
||||||
:clearable="true"
|
clearable
|
||||||
:password="!item.isShowPwd"
|
:password="!item.isShowPwd"
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
'border-color':
|
'border-color':
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
@focus="handleFocus(item.modelName)"
|
@focus="handleFocus(item.modelName)"
|
||||||
@blur="handleFocus('')"
|
@blur="handleFocus('')"
|
||||||
@change="(e:any) => {handleInput(e, item.modelName)}"
|
@change="(e:any) => {handleInput(e, item.modelName)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<image
|
<image
|
||||||
|
@ -71,7 +73,7 @@
|
||||||
@click="item.isShowPwd = false"
|
@click="item.isShowPwd = false"
|
||||||
></image>
|
></image>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
</view>
|
</view>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
|
@ -94,7 +96,11 @@
|
||||||
import { ProfileApi } from "@/services/index";
|
import { ProfileApi } from "@/services/index";
|
||||||
import LoginLayout from "./components/loginLayout.vue";
|
import LoginLayout from "./components/loginLayout.vue";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import { validateRegex } from "@/utils";
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.userInfo as any)[item.modelName] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const loginForm = ref(null);
|
const loginForm = ref(null);
|
||||||
const model1 = <any>reactive({
|
const model1 = <any>reactive({
|
||||||
userInfo: {
|
userInfo: {
|
||||||
|
@ -138,21 +144,21 @@ const handleInput = (e: any, key: string) => {
|
||||||
const temp = e?.replace(valid.valid_number, "");
|
const temp = e?.replace(valid.valid_number, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(model1.userInfo as any)[key] = temp;
|
(model1.userInfo as any)[key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key === "code") {
|
if (key === "code") {
|
||||||
const temp = e?.replace(valid.valid_number, "");
|
const temp = e?.replace(valid.valid_number, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(model1.userInfo as any)[key] = temp;
|
(model1.userInfo as any)[key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key === "newPassword" || key === "passwordConfirm") {
|
if (key === "newPassword" || key === "passwordConfirm") {
|
||||||
const temp = e?.replace(valid.valid_no_cn, "");
|
const temp = e?.replace(valid.valid_no_cn, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(model1.userInfo as any)[key] = temp;
|
(model1.userInfo as any)[key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -204,7 +210,7 @@ const rules = ref({
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
message: "请输入新密码"
|
message: "请输入新密码",
|
||||||
},
|
},
|
||||||
"userInfo.passwordConfirm": {
|
"userInfo.passwordConfirm": {
|
||||||
type: "string",
|
type: "string",
|
||||||
|
@ -227,14 +233,8 @@ const submit = () => {
|
||||||
}
|
}
|
||||||
if (model1.userInfo.newPassword || model1.userInfo.passwordConfirm) {
|
if (model1.userInfo.newPassword || model1.userInfo.passwordConfirm) {
|
||||||
if (
|
if (
|
||||||
!validateRegex(
|
!valid.valid_password.pattern.test(model1.userInfo.newPassword) ||
|
||||||
valid.valid_password1.pattern,
|
!valid.valid_password.pattern.test(model1.userInfo.passwordConfirm)
|
||||||
model1.userInfo.newPassword
|
|
||||||
) ||
|
|
||||||
!validateRegex(
|
|
||||||
valid.valid_password1.pattern,
|
|
||||||
model1.userInfo.passwordConfirm
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
|
|
|
@ -9,24 +9,24 @@
|
||||||
:labelWidth="0"
|
:labelWidth="0"
|
||||||
>
|
>
|
||||||
<u-form-item prop="userInfo.userName">
|
<u-form-item prop="userInfo.userName">
|
||||||
<u-input
|
<up-input
|
||||||
v-model="model1.userInfo.userName"
|
v-model="model1.userInfo.userName"
|
||||||
placeholder="请输入手机号"
|
placeholder="请输入手机号"
|
||||||
:shape="'circle'"
|
:shape="'circle'"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
'border-color':
|
'border-color':
|
||||||
currentFocus === 'userName' ? '#00dcee !important' : '',
|
currentFocus === 'userName' ? '#00dcee !important' : '',
|
||||||
}"
|
}"
|
||||||
type="number"
|
type="number"
|
||||||
@focus="handleFocus('userName')"
|
@focus="handleFocus('userName')"
|
||||||
@blur="handleFocus('')"
|
|
||||||
@change="(e:any) => {handleInput(e, 'userName')}"
|
@change="(e:any) => {handleInput(e, 'userName')}"
|
||||||
|
@clear="handleClear({key: 'userName'})"
|
||||||
>
|
>
|
||||||
</u-input>
|
</up-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item prop="userInfo.password">
|
<u-form-item prop="userInfo.password">
|
||||||
<u-input
|
<up-input
|
||||||
v-model="model1.userInfo.password"
|
v-model="model1.userInfo.password"
|
||||||
placeholder="请输入密码"
|
placeholder="请输入密码"
|
||||||
:shape="'circle'"
|
:shape="'circle'"
|
||||||
|
@ -37,9 +37,9 @@
|
||||||
currentFocus === 'password' ? '#00dcee !important' : '',
|
currentFocus === 'password' ? '#00dcee !important' : '',
|
||||||
}"
|
}"
|
||||||
@focus="handleFocus('password')"
|
@focus="handleFocus('password')"
|
||||||
@blur="handleFocus('')"
|
clearable
|
||||||
:clearable="true"
|
|
||||||
@change="(e:any) => {handleInput(e, 'password')}"
|
@change="(e:any) => {handleInput(e, 'password')}"
|
||||||
|
@clear="handleClear({key: 'password'})"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<image
|
<image
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
@click="isShowPwd = false"
|
@click="isShowPwd = false"
|
||||||
></image>
|
></image>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<view class="remember-box">
|
<view class="remember-box">
|
||||||
|
@ -115,7 +115,12 @@ import { ProfileApi } from "@/services/index";
|
||||||
import LoginLayout from "./components/loginLayout.vue";
|
import LoginLayout from "./components/loginLayout.vue";
|
||||||
import { useMemberStore } from "@/store/index";
|
import { useMemberStore } from "@/store/index";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import { validateRegex } from "@/utils";
|
|
||||||
|
const handleClear = (item: any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.userInfo as any)[item.key] = "";
|
||||||
|
}, 100);
|
||||||
|
};
|
||||||
const store = useMemberStore();
|
const store = useMemberStore();
|
||||||
const loginForm = ref(null);
|
const loginForm = ref(null);
|
||||||
const model1 = reactive({
|
const model1 = reactive({
|
||||||
|
@ -154,14 +159,14 @@ const handleInput = (e: any, key: string) => {
|
||||||
const temp = e?.replace(valid.valid_number, "");
|
const temp = e?.replace(valid.valid_number, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(model1.userInfo as any)[key] = temp;
|
(model1.userInfo as any)[key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key === "password") {
|
if (key === "password") {
|
||||||
const temp = e?.replace(valid.valid_no_cn, "");
|
const temp = e?.replace(valid.valid_no_cn, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(model1.userInfo as any)[key] = temp;
|
(model1.userInfo as any)[key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -177,10 +182,7 @@ const submit = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model1.userInfo.password) {
|
if (model1.userInfo.password) {
|
||||||
if (!validateRegex(
|
if (!valid.valid_password.pattern.test(model1.userInfo.password)) {
|
||||||
valid.valid_password1.pattern,
|
|
||||||
model1.userInfo.password
|
|
||||||
)) {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: valid.valid_password.message,
|
title: valid.valid_password.message,
|
||||||
|
|
|
@ -19,12 +19,13 @@
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
:border="index === 2 ? 'none' : 'bottom'"
|
:border="index === 2 ? 'none' : 'bottom'"
|
||||||
:value="(model1.userInfo as any)[item.key]"
|
:value="(model1.userInfo as any)[item.key]"
|
||||||
:password="!item.isShowPwd"
|
:password="!item.isShowPwd"
|
||||||
@change="(e:any) => {handleInput(e, item.key)}"
|
@change="(e:any) => {handleInput(e, item.key)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<image
|
<image
|
||||||
|
@ -59,16 +60,21 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ProfileApi } from "@/services";
|
import { ProfileApi } from "@/services";
|
||||||
import { validateRegex } from "@/utils";
|
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
|
|
||||||
const handleInput = (e: any, key: string) => {
|
const handleInput = (e: any, key: string) => {
|
||||||
const temp = e?.replace(valid.valid_no_cn, "");
|
const temp = e?.replace(valid.valid_no_cn, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(model1.userInfo as any)[key] = temp;
|
(model1.userInfo as any)[key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.userInfo as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
// 表单属性清单
|
// 表单属性清单
|
||||||
const formAttrList = ref([
|
const formAttrList = ref([
|
||||||
{
|
{
|
||||||
|
@ -158,14 +164,8 @@ const startSave = () => {
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
if (model1.userInfo.newPassword || model1.userInfo.passwordConfirm) {
|
if (model1.userInfo.newPassword || model1.userInfo.passwordConfirm) {
|
||||||
if (
|
if (
|
||||||
!validateRegex(
|
!valid.valid_password.pattern.test(model1.userInfo.newPassword) ||
|
||||||
valid.valid_password1.pattern,
|
!valid.valid_password.pattern.test(model1.userInfo.passwordConfirm)
|
||||||
model1.userInfo.newPassword
|
|
||||||
) ||
|
|
||||||
!validateRegex(
|
|
||||||
valid.valid_password1.pattern,
|
|
||||||
model1.userInfo.passwordConfirm
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
|
|
|
@ -30,13 +30,14 @@
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:value="(model1.order as any)[item.key]"
|
:value="(model1.order as any)[item.key]"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="item.name === '收货产品' ? '#ffffff' : '#f5f7fa'"
|
:disabledColor="item.name === '收货产品' ? '#ffffff' : '#f5f7fa'"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text v-if="item.key === 'subtractNum'">
|
<text v-if="item.key === 'subtractNum'">
|
||||||
|
@ -131,7 +132,11 @@ import SupplierDialog from "../components/SupplierDialog.vue";
|
||||||
import ProductDialog from "../components/ProductDialog.vue";
|
import ProductDialog from "../components/ProductDialog.vue";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import { countDots } from "@/utils";
|
import { countDots } from "@/utils";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.order as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
// 供应商选择
|
// 供应商选择
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
|
@ -183,7 +188,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
if (item.key === "subtractNum") {
|
if (item.key === "subtractNum") {
|
||||||
const temp = e?.replace(valid.valid_decimal.pattern, "");
|
const temp = e?.replace(valid.valid_decimal.pattern, "");
|
||||||
|
@ -198,7 +203,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
:focus="true"
|
:focus="true"
|
||||||
bgColor="#fff"
|
bgColor="#fff"
|
||||||
:clearabled="true"
|
clearable
|
||||||
:showAction="false"
|
:showAction="false"
|
||||||
placeholderColor="#C1C1C1"
|
placeholderColor="#C1C1C1"
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
|
|
|
@ -24,18 +24,19 @@
|
||||||
v-model="(model1.order as any)[(item.key as any)]"
|
v-model="(model1.order as any)[(item.key as any)]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.order as any)[(item.key as any)]"
|
v-model="(model1.order as any)[(item.key as any)]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="item.name === '结算方式' ? '#ffffff' : '#f5f7fa'"
|
:disabledColor="item.name === '结算方式' ? '#ffffff' : '#f5f7fa'"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text v-if="item.key === 'subtractNum'">
|
<text v-if="item.key === 'subtractNum'">
|
||||||
|
@ -45,7 +46,7 @@
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<uni-file-picker
|
<uni-file-picker
|
||||||
v-if="item.type === 'upload'"
|
v-if="item.type === 'upload'"
|
||||||
v-model="model1.order.fileLists"
|
v-model="model1.order.fileLists"
|
||||||
|
@ -107,6 +108,11 @@ import {
|
||||||
} from "@/utils/enum";
|
} from "@/utils/enum";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.order as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
const isShowFormItem = (item: any) => {
|
const isShowFormItem = (item: any) => {
|
||||||
if (model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay) {
|
if (model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -150,7 +156,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = temp;
|
model1.order[item.key] = temp;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const model1 = reactive<{
|
const model1 = reactive<{
|
||||||
|
|
|
@ -23,23 +23,24 @@
|
||||||
v-model="(model1.order as any)[(item.key as any)]"
|
v-model="(model1.order as any)[(item.key as any)]"
|
||||||
:placeholder="`请输入${item.name}`"
|
:placeholder="`请输入${item.name}`"
|
||||||
></u-textarea>
|
></u-textarea>
|
||||||
<u-input
|
<up-input
|
||||||
v-if="item.type === 'select' || item.type === 'input'"
|
v-if="item.type === 'select' || item.type === 'input'"
|
||||||
v-model="(model1.order as any)[(item.key as any)]"
|
v-model="(model1.order as any)[(item.key as any)]"
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
||||||
item.name
|
item.name
|
||||||
}`"
|
}`"
|
||||||
:clearable="true"
|
clearable
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="item.name === '出货产品'?'#ffffff':'#f5f7fa'"
|
:disabledColor="item.name === '出货产品'?'#ffffff':'#f5f7fa'"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</up-input>
|
||||||
<!-- @afterRead="afterRead"
|
<!-- @afterRead="afterRead"
|
||||||
@delete="deletePic" -->
|
@delete="deletePic" -->
|
||||||
<!-- <u-upload
|
<!-- <u-upload
|
||||||
|
@ -110,6 +111,11 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
import ProductDialog from "../components/ProductDialog.vue";
|
import ProductDialog from "../components/ProductDialog.vue";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
|
const handleClear = (item:any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
(model1.order as any)[item.key] = '';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
// 供应商选择
|
// 供应商选择
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
|
@ -135,7 +141,7 @@ const handleInput = (e: any, item: any) => {
|
||||||
const tempPrice = e?.replace(valid.valid_number, "");
|
const tempPrice = e?.replace(valid.valid_number, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
model1.order[item.key] = tempPrice;
|
model1.order[item.key] = tempPrice;
|
||||||
}, 100);
|
}, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
:focus="true"
|
:focus="true"
|
||||||
bgColor="#fff"
|
bgColor="#fff"
|
||||||
:clearabled="true"
|
clearable
|
||||||
:showAction="false"
|
:showAction="false"
|
||||||
placeholderColor="#C1C1C1"
|
placeholderColor="#C1C1C1"
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
|
@ -157,6 +157,7 @@ const tabList = reactive([
|
||||||
const currentTab = ref(2);
|
const currentTab = ref(2);
|
||||||
const handleTab = (item: any) => {
|
const handleTab = (item: any) => {
|
||||||
currentTab.value = item.key;
|
currentTab.value = item.key;
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
const handleReview = (id: string, scaleStatus: number) => {
|
const handleReview = (id: string, scaleStatus: number) => {
|
||||||
|
@ -237,9 +238,14 @@ const getList = (v?: boolean) => {
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = (res.data.list as any).map((item: any) => {
|
// (pageList as any).list = (res.data.list as any).map((item: any) => {
|
||||||
return { ...item, isChecked: false };
|
// return { ...item, isChecked: false };
|
||||||
});
|
// });
|
||||||
|
(pageList as any).list = (pageList as any).list.concat(
|
||||||
|
(res.data.list as any).map((item: any) => {
|
||||||
|
return { ...item, isChecked: false };
|
||||||
|
})
|
||||||
|
);
|
||||||
pageList.total = (res.data as any).total;
|
pageList.total = (res.data as any).total;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -124,7 +124,7 @@ const getList = (v?: boolean) => {
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = (pageList as any).list = (
|
(pageList as any).list = (
|
||||||
pageList as any
|
pageList as any
|
||||||
).list.concat(res.data.list);
|
).list.concat(res.data.list);
|
||||||
pageList.total = (res.data as any).total;
|
pageList.total = (res.data as any).total;
|
||||||
|
|
|
@ -52,7 +52,7 @@ const valid = {
|
||||||
message: "密码由字母、数字组成,且至少8位",
|
message: "密码由字母、数字组成,且至少8位",
|
||||||
},
|
},
|
||||||
valid_password1: {
|
valid_password1: {
|
||||||
pattern: /^(?=.*[a-z])(?=.*\d)[a-zA-Z\d]{8,}$/,
|
pattern: "^(?=.*[a-z])(?=.*\d)[a-zA-Z\d]{8,}$",
|
||||||
message: "密码必须由字母、数字组成, 且至少8位",
|
message: "密码必须由字母、数字组成, 且至少8位",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue