提交 4680ed98 authored 作者: 刘旭's avatar 刘旭

优化

上级 a35e615f
......@@ -149,18 +149,17 @@ export default {
that.controlsArray[s].show = false;
}
that.controlsArray[index].show = true;
// that.sheetShow = true;
that.sheetIndex = index;
uni.showActionSheet({
itemList: ['修改规格', '复制', '删除'],
success: function(res) {
that.sheetChange(res.tapIndex);
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
},
fail: function(res) {
console.log(res.errMsg);
},
});
// that.sheetShow = true;
},
// 点击选择操作
sheetChange(index) {
......@@ -194,11 +193,6 @@ export default {
// 记录位置
this.recordPosition = { x: pageX, y: pageY };
// 判断当前移动的位置是否需要进行排序
// console.log(
// this.curretnControlsIndex,
// this.recordPosition
// );
if (
this.controlsPositionArray[this.curretnControlsIndex].top >=
this.recordInitControlsPoisitonList[this.recordInitControlsPoisitonList.length - 1]
......@@ -304,9 +298,11 @@ $sheet-heigth: var(--window-bottom);
}
}
.action-sheet {
position: fixed;
bottom: 100px;
z-index: 999;
}
// .action-sheet {
// position: fixed;
// bottom: 50px;
// z-index: 99;
// overflow-y: scroll;
// -webkit-overflow-scrolling: touch;
// }
</style>
<template>
<u-popup v-model="showTitle" mode="center" height="22%" width="80%">
<view style="padding: 30rpx; height: 100%; margin-top: 0%;">
<u-popup v-model="showTitle" mode="center" height="380rpx" width="80%">
<view style="padding: 30rpx 30rpx 0 30rpx; height: 100%;">
<view style="font-size: 34rpx; width: 100%; text-align: center; margin-bottom: 20rpx;">
设置产品线名称
</view>
......@@ -15,7 +15,7 @@
/>
</u-form-item>
</u-form>
<u-button :maxlength="11" type="error" style="margin-top: 8%;" @tap="saveTitle">
<u-button :maxlength="11" type="error" style="margin-top: 40rpx;" @tap="saveTitle">
保存
</u-button>
</view>
......@@ -51,7 +51,7 @@ let saveTitle = () => {
defineExpose({
showTitle,
title
title,
});
</script>
......
......@@ -13,7 +13,7 @@
</u-navbar>
<view class="u-wrap">
<view class="u-menu-wrap">
<view style="position: fixed; left: 8rpx; top: 5%;">
<view style="position: fixed; left: 8rpx; top: 6%;">
<drag-and-drop-sort
ref="dragRef"
style="display: flex; justify-content: center;"
......@@ -28,8 +28,8 @@
v-if="lineList[scope.index]?.status === 1"
:title="scope.row.name"
:right="false"
:show-line="scope.row.show"
:line-color="scope.row.show ? '#0000f0' : ''"
:show-line="scope.row?.show"
:line-color="scope.row?.show ? '#0000f0' : ''"
style="margin-left: 20rpx;"
></u-section>
<view v-else class="add">
......@@ -441,7 +441,7 @@ $nav-heigth: var(--window-bottom);
margin-top: 20rpx;
}
.left-cates {
width: 360rpx;
width: 368rpx;
}
.right-cates {
flex: 1;
......@@ -473,8 +473,11 @@ $nav-heigth: var(--window-bottom);
}
.goods-nav {
width: 100%;
position: fixed;
bottom: $nav-heigth;
z-index: 0;
// position: fixed;
// bottom: $nav-heigth;
position: absolute;
bottom: 0;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
</style>
......@@ -3,11 +3,23 @@
<view class="top">
<view class="item">
<view class="left">收货人</view>
<u-select v-model="showSelect" :list="selectList" @confirm="onConfirm"></u-select>
<input
type="text"
v-model="addressData.name"
placeholder-class="line"
placeholder="请填写收货人姓名"
@blur="onblur"
@focus="onfocus"
/>
</view>
<view class="item">
<view class="left">联系人</view>
<input
type="text"
v-model="addressData.contactName"
placeholder-class="line"
placeholder="请填写收货人姓名"
/>
</view>
<view class="item">
......@@ -72,11 +84,13 @@
import { ref, computed } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { deleteAddress, saveAddress } from '@/api/index';
import { consigneeList } from '@/api/profile';
let show = ref(false);
let showModel = ref(false);
let showSelect = ref(false);
let content = ref('确认删除地址?');
let selectList = ref([] as any)
let addressData = ref({
addressDetail: '',
areaCode: '',
......@@ -85,6 +99,8 @@ let addressData = ref({
county: '',
isDefault: false,
name: '',
contactName: '',
customerCode: '',
postalCode: '',
province: '',
tel: '',
......@@ -102,6 +118,16 @@ onLoad((options?: any) => {
// 判断是否显示删除
editId.value = addressData.value?.id
}
consigneeList().then((res: any) => {
if(res.data.code === 200) {
res.data.data.map((item: any) => {
selectList.value.push({
label: item.customerName,
value: item.customerCode
})
})
}
})
});
// 打开地区选择
......@@ -109,6 +135,17 @@ let showRegionPicker = () => {
show.value = true;
};
let onblur = () => {
showSelect.value = false
}
let onfocus = () => {
showSelect.value = true
}
let onConfirm = (data: any) => {
addressData.value.name = data[0].label
addressData.value.customerCode = data[0].value
}
// 设置地区
let confirm = (data: any) => {
addressData.value.areaCode = data.area.code;
......
......@@ -7,7 +7,7 @@
:name="item.name"
:brief="item.brief"
:retailPrice="item.retailPrice"
@tap="hotGoods(item)"
@tap="toGoods(item.valueId)"
style="margin-top: 6rpx;"
/>
<view style="padding: 20rpx;"><u-loadmore :status="status" icon-type="flower" /></view>
......@@ -66,6 +66,10 @@ let change = (index: number) => {
init();
};
let toGoods = (id: number) => {
uni.navigateTo({ url: '/pages/goods/index?id=' + id });
};
let init = () => {
status.value = 'loading';
getCollectList(collectQuery.value).then((res: any) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论