|
|
|
@ -2,19 +2,17 @@ |
|
|
|
<template> |
|
|
|
<view class=""> |
|
|
|
<view> |
|
|
|
<button size="default" type="default" @tap="inputDialogToggle('attrAdd',categoryId)" |
|
|
|
<button size="default" type="default" @tap="inputDialogToggle('add',categoryId)" |
|
|
|
hover-class="is-hover">新增挂单</button> |
|
|
|
</view> |
|
|
|
<view class="order-list"> |
|
|
|
<view class="order-list" v-for="(item, index) in regList" :key="index" @tap="clickCollapse"> |
|
|
|
<ul> |
|
|
|
<!-- <li v-for="(item, index) in indexList" :key="index" @tap="clickCollapse"> --> |
|
|
|
<li @tap="clickCollapse"> |
|
|
|
<!-- <view class="name">{{item.categoryName}}</view> --> |
|
|
|
<li> |
|
|
|
<view class="name"> |
|
|
|
<view>张三的订单</view> |
|
|
|
<view>{{item.saleName}}</view> |
|
|
|
<view class="name-date"> |
|
|
|
<text>销售员</text> |
|
|
|
<text>2023-10-10 12:01:23</text> |
|
|
|
<text>{{item.createByName}}</text> |
|
|
|
<text>{{item.createTime}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btn-list"> |
|
|
|
@ -24,24 +22,25 @@ |
|
|
|
</view> |
|
|
|
<uni-icons type="bottom" size="25" style="position: absolute;bottom:0;right:30rpx;"></uni-icons> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</view> |
|
|
|
<view class="order-collapse-item" v-if="isCollapse"> |
|
|
|
<view class="collapse-1"> |
|
|
|
<view class="order-notes"> |
|
|
|
<text style="color: red;">备注:</text>张三13895968700北京丰台总部基地给张三9折折扣张三13895968700北京丰台总部基地给张三9折折扣张三13895968700北京丰台总部基地给张三9折折扣 |
|
|
|
</view> |
|
|
|
<view class="shop-list"> |
|
|
|
<view class="order-name"> |
|
|
|
女士连衣裙(HD738206579) |
|
|
|
<img src="/static/images/datu.png" @tap="largeImg" alt=""> |
|
|
|
</view> |
|
|
|
<view class="specs-name">颜色:黑色,尺码:s码 * 2</view> |
|
|
|
<view class="specs-name">颜色:黑色,尺码:s码 * 2</view> |
|
|
|
<view class="del-icon" @tap="delGoodsPrecs"><uni-icons color="red" type="trash" size="26"></uni-icons></view> |
|
|
|
</view> |
|
|
|
</ul> |
|
|
|
<view class="order-collapse-item" v-if="isCollapse"> |
|
|
|
<view class="collapse-1"> |
|
|
|
<view class="order-notes"> |
|
|
|
<text style="color: red;">备注:</text> |
|
|
|
{{item.remark}} |
|
|
|
</view> |
|
|
|
<view class="shop-list"> |
|
|
|
<view class="order-name"> |
|
|
|
女士连衣裙(HD738206579) |
|
|
|
<img src="/static/images/datu.png" @tap="largeImg" alt=""> |
|
|
|
</view> |
|
|
|
<view class="specs-name">颜色:黑色,尺码:s码 * 2</view> |
|
|
|
<view class="specs-name">颜色:黑色,尺码:s码 * 2</view> |
|
|
|
<view class="del-icon" @tap="delGoodsPrecs"><uni-icons color="red" type="trash" |
|
|
|
size="26"></uni-icons></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<!-- 语音识别弹出层 --> |
|
|
|
<view> |
|
|
|
@ -126,6 +125,11 @@ |
|
|
|
<uni-popup ref="inputDialog" type="dialog"> |
|
|
|
<uni-popup-dialog ref="inputClose" mode="input" title="挂单名称" placeholder="请输入挂单名称" |
|
|
|
@confirm="addReg"></uni-popup-dialog> |
|
|
|
</uni-popup> |
|
|
|
<!-- 编辑挂单 --> |
|
|
|
<uni-popup ref="setDialog" type="dialog"> |
|
|
|
<uni-popup-dialog ref="inputClose" mode="input" title="挂单名称" placeholder="请输入挂单名称" |
|
|
|
@confirm="setDetail"></uni-popup-dialog> |
|
|
|
</uni-popup> |
|
|
|
<!-- 查看大图弹出层 --> |
|
|
|
<uni-popup ref="imgPopup" background-color="#fff" @change="change"> |
|
|
|
@ -145,7 +149,8 @@ |
|
|
|
isCollapse: false, |
|
|
|
voiceText: '', |
|
|
|
recordState: false, |
|
|
|
pageNumber: 1 |
|
|
|
pageNumber: 1, |
|
|
|
regList:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
@ -164,7 +169,7 @@ |
|
|
|
} |
|
|
|
this.tui.request("/app/sale/listPages", "POST", obj, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.regList = res.result; |
|
|
|
this.regList = res.result.records; |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
@ -257,9 +262,13 @@ |
|
|
|
this.$refs.popup.open(type) |
|
|
|
} |
|
|
|
}, |
|
|
|
//临时改价弹窗 |
|
|
|
inputDialogToggle() { |
|
|
|
this.$refs.inputDialog.open() |
|
|
|
//新增挂单弹窗 |
|
|
|
inputDialogToggle(type) { |
|
|
|
if(type="add"){ |
|
|
|
this.$refs.inputDialog.open() |
|
|
|
}else if('edit'){ |
|
|
|
this.$refs.setDialog.open() |
|
|
|
} |
|
|
|
}, |
|
|
|
//通过商品id查询商品详细信息 |
|
|
|
getById(id) { |
|
|
|
@ -282,7 +291,7 @@ |
|
|
|
console.log(e) |
|
|
|
this.tui.request("/app/sale/saveOrder", "POST", { |
|
|
|
saleName: e |
|
|
|
}, false, true).then((res) => { |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("新增成功") |
|
|
|
this.getRegList(); |
|
|
|
@ -292,11 +301,43 @@ |
|
|
|
}).catch((res) => { |
|
|
|
this.tui.toast(res) |
|
|
|
}) |
|
|
|
}, |
|
|
|
//删除商品规格确认弹窗 |
|
|
|
delGoodsPrecs(id) { |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条商品吗?", |
|
|
|
success: function(res) { |
|
|
|
this.tui.request("/app/sale/delById", "POST", { |
|
|
|
id: id |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("删除成功") |
|
|
|
this.getRegList(); |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => { |
|
|
|
this.tui.toast(res) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
//删除商品规格确认弹窗 |
|
|
|
delGoodsPrecs(){ |
|
|
|
this.msgType = type |
|
|
|
this.$refs.alertDialog.open() |
|
|
|
//编辑挂单信息 |
|
|
|
setDetail(){ |
|
|
|
this.tui.request("/app/sale/setSaleDetail", "POST", { |
|
|
|
saleDetailList:'', |
|
|
|
saleId:'' |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("删除成功") |
|
|
|
this.getRegList(); |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => { |
|
|
|
this.tui.toast(res) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -334,21 +375,25 @@ |
|
|
|
.name { |
|
|
|
width: 53%; |
|
|
|
float: left; |
|
|
|
} |
|
|
|
.del-icon{ |
|
|
|
position: absolute; |
|
|
|
top: 10rpx; |
|
|
|
right: 10rpx; |
|
|
|
} |
|
|
|
.shop-list{ |
|
|
|
margin: 10rpx 0; |
|
|
|
border-top: 1px solid #fff; |
|
|
|
border-bottom: 1px solid #fff; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
.shop-list:last-child{ |
|
|
|
border-bottom: none; |
|
|
|
} |
|
|
|
|
|
|
|
.del-icon { |
|
|
|
position: absolute; |
|
|
|
top: 10rpx; |
|
|
|
right: 10rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-list { |
|
|
|
margin: 10rpx 0; |
|
|
|
border-top: 1px solid #fff; |
|
|
|
border-bottom: 1px solid #fff; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-list:last-child { |
|
|
|
border-bottom: none; |
|
|
|
} |
|
|
|
|
|
|
|
.name-date { |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
@ -383,19 +428,23 @@ |
|
|
|
margin: 0 auto; |
|
|
|
padding: 20rpx; |
|
|
|
} |
|
|
|
.specs-name{ |
|
|
|
padding-bottom: 20rpx; |
|
|
|
|
|
|
|
.specs-name { |
|
|
|
padding-bottom: 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.order-name { |
|
|
|
height: 80rpx; |
|
|
|
font-size: 32rpx; |
|
|
|
font-weight: bold; |
|
|
|
line-height: 80rpx; |
|
|
|
img{ |
|
|
|
height: 32rpx; |
|
|
|
width: 32rpx; |
|
|
|
line-height: 80rpx; |
|
|
|
|
|
|
|
img { |
|
|
|
height: 32rpx; |
|
|
|
width: 32rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.img-popup-content { |
|
|
|
width: 500rpx; |
|
|
|
height: 500rpx; |
|
|
|
|