update: 1. 去掉旧配置 2. 其他配置中按钮点击事件 3.保存后返回上一页
This commit is contained in:
parent
1e6937966b
commit
07097b173d
|
@ -76,12 +76,12 @@ const state = reactive({
|
||||||
// path: "/pagesConfig/index",
|
// path: "/pagesConfig/index",
|
||||||
path: "/pagesHome/config",
|
path: "/pagesHome/config",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
text: "配置旧",
|
// text: "配置旧",
|
||||||
icon: "config.png",
|
// icon: "config.png",
|
||||||
activeIcon: "config_active.png",
|
// activeIcon: "config_active.png",
|
||||||
path: "/pagesHome/index1",
|
// path: "/pagesHome/index1",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
text: "我的",
|
text: "我的",
|
||||||
icon: "profile.png",
|
icon: "profile.png",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<up-icon
|
<up-icon
|
||||||
name="minus"
|
name="minus"
|
||||||
@click="decrease"
|
@click="decrease"
|
||||||
:size="14"
|
:size="22"
|
||||||
color="rgba(0,0,0,0.25)"
|
color="rgba(0,0,0,0.25)"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
<input
|
<input
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<up-icon
|
<up-icon
|
||||||
name="plus"
|
name="plus"
|
||||||
@click="increase"
|
@click="increase"
|
||||||
:size="14"
|
:size="22"
|
||||||
color="rgba(0,0,0,0.25)"
|
color="rgba(0,0,0,0.25)"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
</view>
|
</view>
|
||||||
|
@ -31,7 +31,7 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
const emit = defineEmits(["changeValue"]);
|
const emit = defineEmits(["changeValue"]);
|
||||||
const num = ref(props.value);
|
const num = ref(props.value);
|
||||||
const handleInput = (event) => {
|
const handleInput = (event:any) => {
|
||||||
const value = parseInt(event.target.value);
|
const value = parseInt(event.target.value);
|
||||||
if (!isNaN(value) && value >= 1) {
|
if (!isNaN(value) && value >= 1) {
|
||||||
num.value = value;
|
num.value = value;
|
||||||
|
@ -59,7 +59,7 @@ const decrease = () => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
padding: 0rpx 8rpx;
|
padding: 4px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin: 0rpx 16rpx;
|
margin: 0rpx 16rpx;
|
||||||
.uni-input {
|
.uni-input {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<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="title">终端机自动打单配置</view>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view
|
<view
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<view
|
<view
|
||||||
>收货-待审核联单打印<AvatarInput
|
>收货-待审核联单打印<AvatarInput
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="7"
|
:max="5"
|
||||||
:value="state.formData.manualPrintAudit"
|
:value="state.formData.manualPrintAudit"
|
||||||
@changeValue="
|
@changeValue="
|
||||||
(v) => {
|
(v) => {
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
<view
|
<view
|
||||||
>收货-已审核联单打印<AvatarInput
|
>收货-已审核联单打印<AvatarInput
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="7"
|
:max="5"
|
||||||
:value="state.formData.manualPrintAudited"
|
:value="state.formData.manualPrintAudited"
|
||||||
@changeValue="
|
@changeValue="
|
||||||
(v) => {
|
(v) => {
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<view
|
<view
|
||||||
>出货-待结算联单打印<AvatarInput
|
>出货-待结算联单打印<AvatarInput
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="7"
|
:max="5"
|
||||||
:value="state.formData.manualPrintToBeSettled"
|
:value="state.formData.manualPrintToBeSettled"
|
||||||
@changeValue="
|
@changeValue="
|
||||||
(v) => {
|
(v) => {
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
<view
|
<view
|
||||||
>出货-已结算联单打印<AvatarInput
|
>出货-已结算联单打印<AvatarInput
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="7"
|
:max="5"
|
||||||
:value="state.formData.manualPrintSettled"
|
:value="state.formData.manualPrintSettled"
|
||||||
@changeValue="
|
@changeValue="
|
||||||
(v) => {
|
(v) => {
|
||||||
|
@ -112,6 +112,7 @@
|
||||||
></view>
|
></view>
|
||||||
<view
|
<view
|
||||||
v-for="item in state.formData.devices"
|
v-for="item in state.formData.devices"
|
||||||
|
v-if="state.formData.autoSettlement"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
style="padding: 8rpx 44rpx"
|
style="padding: 8rpx 44rpx"
|
||||||
>{{ item.deviceName }}
|
>{{ item.deviceName }}
|
||||||
|
@ -128,7 +129,7 @@
|
||||||
天后自动结算</view
|
天后自动结算</view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</view>
|
||||||
|
|
||||||
<view class="btn-box-fix-btn">
|
<view class="btn-box-fix-btn">
|
||||||
<u-button
|
<u-button
|
||||||
|
@ -198,6 +199,7 @@ const handleSave = () => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "设置更新成功",
|
title: "设置更新成功",
|
||||||
});
|
});
|
||||||
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -206,7 +208,7 @@ const showSelect = () => {
|
||||||
state.show = true;
|
state.show = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectClick = (v:any) => {
|
const selectClick = (v: any) => {
|
||||||
state.formData.settlementConfig = v.id;
|
state.formData.settlementConfig = v.id;
|
||||||
state.show = false;
|
state.show = false;
|
||||||
};
|
};
|
||||||
|
@ -248,4 +250,9 @@ const selectClick = (v:any) => {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin: 0rpx 16rpx;
|
margin: 0rpx 16rpx;
|
||||||
}
|
}
|
||||||
|
.app-container {
|
||||||
|
height: calc(100vh - 70px);
|
||||||
|
overflow: scroll;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -8,13 +8,22 @@
|
||||||
:checked="item.templateDeleted"
|
:checked="item.templateDeleted"
|
||||||
:activeColor="'#00D2E3'"
|
:activeColor="'#00D2E3'"
|
||||||
:usedAlone="true"
|
:usedAlone="true"
|
||||||
@change="(v) => {item.templateDeleted = v}"
|
@change="
|
||||||
|
(v:any) => {
|
||||||
|
item.templateDeleted = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
>
|
>
|
||||||
</up-checkbox>
|
</up-checkbox>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-box-fix-btn">
|
<view class="btn-box-fix-btn">
|
||||||
<u-button type="primary" text="保存" shape="circle" @click="handleSave"></u-button>
|
<u-button
|
||||||
|
type="primary"
|
||||||
|
text="保存"
|
||||||
|
shape="circle"
|
||||||
|
@click="handleSave"
|
||||||
|
></u-button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
@ -22,17 +31,20 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { OtherConfigApi } from "@/services/index";
|
import { OtherConfigApi } from "@/services/index";
|
||||||
|
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
const list = ref([]);
|
const list: any = ref([]);
|
||||||
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
OtherConfigApi.updatePrintTemplate({printTemplatePos: list.value}).then(res => {
|
OtherConfigApi.updatePrintTemplate({ printTemplatePos: list.value }).then(
|
||||||
if(res.code === 200) {
|
(res) => {
|
||||||
uni.showToast({
|
if (res.code === 200) {
|
||||||
title: "设置更新成功",
|
uni.showToast({
|
||||||
});
|
title: "设置更新成功",
|
||||||
|
});
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
);
|
||||||
}
|
};
|
||||||
onLoad((option: any) => {
|
onLoad((option: any) => {
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
if (option.key) {
|
if (option.key) {
|
||||||
|
|
Loading…
Reference in New Issue