Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yongxinda-h5
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
yongxinda-h5
Commits
7020866b
提交
7020866b
authored
12月 13, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加新增客户功能
上级
73041e46
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
122 行增加
和
29 行删除
+122
-29
profile.ts
src/api/profile.ts
+3
-0
vk-data-goods-sku-popup.vue
...nents/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
+5
-2
pages.json
src/pages.json
+1
-1
goodsSku.vue
src/pages/goods/goodsSku.vue
+14
-22
index.vue
src/pages/goods/index.vue
+2
-1
consignee.vue
src/pages/profile/consignee.vue
+97
-3
没有找到文件。
src/api/profile.ts
浏览文件 @
7020866b
...
@@ -29,3 +29,6 @@ export const resetWorkAddr = (data: any) => request('/wx/auth/reset_work_addr',
...
@@ -29,3 +29,6 @@ export const resetWorkAddr = (data: any) => request('/wx/auth/reset_work_addr',
// 更新手机号
// 更新手机号
export
const
resetMobile
=
(
data
:
any
)
=>
request
(
'/wx/auth/reset_mobile'
,
'POST'
,
data
);
export
const
resetMobile
=
(
data
:
any
)
=>
request
(
'/wx/auth/reset_mobile'
,
'POST'
,
data
);
// 添加客户名称
export
const
addConsignee
=
(
data
:
any
)
=>
request
(
'/wx/address/consignee'
,
'POST'
,
data
);
src/components/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
浏览文件 @
7020866b
...
@@ -793,6 +793,9 @@ export default {
...
@@ -793,6 +793,9 @@ export default {
},
},
// sku按钮的点击事件
// sku按钮的点击事件
skuClick
(
value
,
index1
,
index2
)
{
skuClick
(
value
,
index1
,
index2
)
{
console
.
log
(
value
,
index1
,
index2
);
console
.
log
(
this
.
selectArr
);
console
.
log
(
this
.
goodsInfo
);
let
that
=
this
;
let
that
=
this
;
if
(
value
.
ishow
)
{
if
(
value
.
ishow
)
{
if
(
that
.
selectArr
[
index1
]
!=
value
.
name
)
{
if
(
that
.
selectArr
[
index1
]
!=
value
.
name
)
{
...
@@ -1442,12 +1445,12 @@ export default {
...
@@ -1442,12 +1445,12 @@ export default {
.item-content
{
.item-content
{
display
:
inline-block
;
display
:
inline-block
;
padding
:
10rpx
35
rpx
;
padding
:
10rpx
12
rpx
;
font-size
:
24rpx
;
font-size
:
24rpx
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
color
:
#333333
;
color
:
#333333
;
margin-right
:
20
rpx
;
margin-right
:
16
rpx
;
margin-bottom
:
16rpx
;
margin-bottom
:
16rpx
;
border
:
1px
solid
#f4f4f4
;
border
:
1px
solid
#f4f4f4
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
...
src/pages.json
浏览文件 @
7020866b
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
},
{
},
{
"path"
:
"pages/profile/consignee"
,
"path"
:
"pages/profile/consignee"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
收货人
"
,
"navigationBarTitleText"
:
"
客户
"
,
"navigationBarBackgroundColor"
:
"#fff"
"navigationBarBackgroundColor"
:
"#fff"
}
}
},
{
},
{
...
...
src/pages/goods/goodsSku.vue
浏览文件 @
7020866b
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<
template
>
<
template
>
<view
class=
"app"
>
<view
class=
"app"
>
<vk-data-goods-sku-popup
<vk-data-goods-sku-popup
v-if=
"flag"
ref=
"skuPopupRef"
ref=
"skuPopupRef"
v-model=
"skuKey"
v-model=
"skuKey"
border-radius=
"20"
border-radius=
"20"
:localdata=
"goodsInfo"
:localdata=
"goodsInfo"
:mode=
"skuMode"
:mode=
"skuMode"
:partsData=
"partsData"
@
open=
"onOpenSkuPopup"
@
open=
"onOpenSkuPopup"
@
close=
"SkuPopup"
@
close=
"SkuPopup"
@
add-cart=
"addCarts"
@
add-cart=
"addCarts"
...
@@ -45,6 +45,7 @@ let props = defineProps({
...
@@ -45,6 +45,7 @@ let props = defineProps({
type
:
Number
type
:
Number
}
}
})
})
let
flag
=
ref
(
true
)
watch
([
selectedGoodsItem
,
selectedGoodsSum
],(
newVal
)
=>
{
watch
([
selectedGoodsItem
,
selectedGoodsSum
],(
newVal
)
=>
{
if
(
newVal
)
{
if
(
newVal
)
{
...
@@ -79,27 +80,18 @@ let onConfirm = (val: string, index: number) => {
...
@@ -79,27 +80,18 @@ let onConfirm = (val: string, index: number) => {
// 弹出sku后给规格赋值
// 弹出sku后给规格赋值
let
resultSku
=
(
data
?:
any
)
=>
{
let
resultSku
=
(
data
?:
any
)
=>
{
if
(
detailData
.
value
.
productList
.
length
===
1
)
{
if
(
detailData
.
value
.
productList
.
length
===
1
)
{
skuPopupRef
.
value
.
selectShop
=
{
skuPopupRef
.
value
.
selectArr
=
{...
detailData
.
value
.
productList
[
0
].
specifications
}
buy_num
:
1
,
// skuPopupRef.value.selectShop = {
goods_id
:
detailData
.
value
.
productList
[
0
].
goodsId
,
// buy_num: 1,
goods_name
:
detailData
.
value
.
info
.
name
,
// goods_id: detailData.value.productList[0].goodsId,
image
:
detailData
.
value
.
info
.
picUrl
,
// goods_name: detailData.value.info.name,
price
:
0
,
// image: detailData.value.info.picUrl,
sku_name_arr
:
{
...
detailData
.
value
.
productList
[
0
].
specifications
},
// price: 0,
stock
:
1000
,
// sku_name_arr: { ...detailData.value.productList[0].specifications },
_id
:
detailData
.
value
.
productList
[
0
].
id
,
// stock: 1000,
}
// _id: detailData.value.productList[0].id,
// }
}
}
console
.
log
(
detailData
.
value
,
'detailData.value'
);
console
.
log
(
skuPopupRef
.
value
.
selectShop
);
// buy_num:1
// goods_id:28
// goods_name:"测试商品"
// image:"/wx/storage/fetch/ctjaj7utdmmv9c6r3osm.png"
// price:0
// sku_name_arr:['双平台移动', '上掀式','1860']
// stock:1000
// _id:177
}
}
// 选择配件
// 选择配件
...
@@ -153,7 +145,7 @@ let init = (data: any, id: number, partsData?: any) => {
...
@@ -153,7 +145,7 @@ let init = (data: any, id: number, partsData?: any) => {
// console.log(goodsInfo.value, 'goodsInfo.value');
// console.log(goodsInfo.value, 'goodsInfo.value');
productList
=
[]
productList
=
[]
specificationList
=
[]
specificationList
=
[]
//
resultSku()
resultSku
()
};
};
// sku组件 开始-----------------------------------------------------------
// sku组件 开始-----------------------------------------------------------
let
onOpenSkuPopup
=
()
=>
{};
let
onOpenSkuPopup
=
()
=>
{};
...
...
src/pages/goods/index.vue
浏览文件 @
7020866b
...
@@ -562,6 +562,7 @@ const initParts = (goodsId: number, productId: number) => {
...
@@ -562,6 +562,7 @@ const initParts = (goodsId: number, productId: number) => {
.left
{
.left
{
padding
:
20rpx
0
;
padding
:
20rpx
0
;
font-size
:
24rpx
;
// overflow: hidden;
// overflow: hidden;
// text-overflow: ellipsis; /* 超出部分省略号 */
// text-overflow: ellipsis; /* 超出部分省略号 */
// word-break: break-all; /* break-all(允许在单词内换行。) */
// word-break: break-all; /* break-all(允许在单词内换行。) */
...
@@ -573,7 +574,7 @@ const initParts = (goodsId: number, productId: number) => {
...
@@ -573,7 +574,7 @@ const initParts = (goodsId: number, productId: number) => {
.right
{
.right
{
padding
:
20rpx
0
;
padding
:
20rpx
0
;
font-
weight
:
600
;
font-
size
:
24rpx
;
// overflow: hidden;
// overflow: hidden;
// text-overflow: ellipsis; /* 超出部分省略号 */
// text-overflow: ellipsis; /* 超出部分省略号 */
// word-break: break-all; /* break-all(允许在单词内换行。) */
// word-break: break-all; /* break-all(允许在单词内换行。) */
...
...
src/pages/profile/consignee.vue
浏览文件 @
7020866b
...
@@ -5,26 +5,120 @@
...
@@ -5,26 +5,120 @@
<u-tr
v-for=
"(item, index) in consigneeData"
:key=
"item.id"
>
<u-tr
v-for=
"(item, index) in consigneeData"
:key=
"item.id"
>
<u-td>
{{
item
.
customerName
}}
</u-td>
<u-td>
{{
item
.
customerName
}}
</u-td>
</u-tr>
</u-tr>
<u-tr>
<u-td
style=
"padding: 0;"
>
<u-button
size=
"mini"
:hair-line=
"false"
style=
"width: 100%; border: 0; font-size: 40rpx;"
@
tap=
"showAdd"
>
+
</u-button>
</u-td>
</u-tr>
</u-table>
</u-table>
<u-empty
v-else
text=
"数据为空"
mode=
"list"
></u-empty>
<u-empty
v-else
text=
"数据为空"
mode=
"list"
></u-empty>
</view>
</view>
<!-- 添加客户名称 -->
<u-popup
v-model=
"show"
mode=
"center"
length=
"90%"
>
<view
style=
"padding: 40rpx;"
>
<h4
style=
"width: 100%; text-align: center; font-size: 30rpx;"
>
添加客户
</h4>
<u-form
:model=
"form"
ref=
"uForm"
label-width=
"145"
>
<u-form-item
label=
"名称"
>
<u-input
v-model=
"form.customerName"
placeholder=
"请输入名称"
/>
</u-form-item>
<u-form-item
label=
"编码"
>
<u-input
v-model=
"form.customerCode"
placeholder=
"请输入编码"
/>
</u-form-item>
<u-form-item
label=
"邮箱"
>
<u-input
v-model=
"form.contactsEmail"
placeholder=
"请输入邮箱"
/>
</u-form-item>
<u-form-item
label=
"选择地址"
>
<u-input
v-model=
"form.registerAddress"
:disabled=
"true"
placeholder=
"请选择"
@
tap=
"selectRegion"
/>
</u-form-item>
<u-form-item
label=
"详细地址"
:border-bottom=
"false"
>
<u-input
type=
"textarea"
v-model=
"form.detailedAddress"
placeholder=
"请输入详细地址"
/>
</u-form-item>
</u-form>
<u-button
type=
"error"
@
tap=
"saveConsignee"
>
保存
</u-button>
</view>
</u-popup>
<u-picker
mode=
"region"
ref=
"uPicker"
v-model=
"showRegion"
@
confirm=
"confirm"
/>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
consigneeList
}
from
'@/api/profile'
;
import
{
consigneeList
,
addConsignee
}
from
'@/api/profile'
;
import
{
onReady
}
from
'@dcloudio/uni-app'
;
let
consigneeData
=
ref
();
let
consigneeData
=
ref
();
let
show
=
ref
(
false
);
let
showRegion
=
ref
(
false
);
let
form
=
ref
({
customerName
:
''
,
// 客户名称
customerCode
:
''
,
// 客户编码
contactsEmail
:
''
,
// 客户邮箱
registerAddress
:
''
,
// 注册地址(省市区)
detailedAddress
:
''
,
// 详细地址
});
let
selectRegion
=
()
=>
{
showRegion
.
value
=
true
;
};
// 设置地区
let
confirm
=
(
data
:
any
)
=>
{
form
.
value
.
registerAddress
=
data
.
province
.
name
+
data
.
city
.
name
+
data
.
area
.
name
;
};
let
showAdd
=
()
=>
{
show
.
value
=
true
;
form
.
value
=
{
customerName
:
''
,
// 客户名称
customerCode
:
''
,
// 客户编码
contactsEmail
:
''
,
// 客户邮箱
registerAddress
:
''
,
// 注册地址(省市区)
detailedAddress
:
''
,
// 详细地址
};
};
let
saveConsignee
=
()
=>
{
addConsignee
(
form
.
value
).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
});
show
.
value
=
false
;
init
();
}
});
};
let
init
=
()
=>
{
let
init
=
()
=>
{
consigneeList
().
then
((
res
:
any
)
=>
{
consigneeList
().
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
if
(
res
.
data
.
code
===
200
)
{
consigneeData
.
value
=
res
.
data
.
data
;
consigneeData
.
value
=
res
.
data
.
data
;
console
.
log
(
res
);
}
}
});
});
};
};
init
();
init
();
onReady
(()
=>
{});
</
script
>
</
script
>
<
style
></
style
>
<
style
scoped
lang=
"scss"
></
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论