Browse Source

挂单

master
tianyi@bogon 3 years ago
parent
commit
d6f02f045d
  1. 170
      pages/index/addHangOrder.vue

170
pages/index/addHangOrder.vue

@ -29,19 +29,19 @@
<view class="order-collapse-item" v-if="isCollapse"> <view class="order-collapse-item" v-if="isCollapse">
<view class="collapse-1"> <view class="collapse-1">
<view class="order-notes"> <view class="order-notes">
备注:张三13895968700北京丰台总部基地给张三9折折扣张三13895968700北京丰台总部基地给张三9折折扣张三13895968700北京丰台总部基地给张三9折折扣 <text style="color: red;">备注:</text>张三13895968700北京丰台总部基地给张三9折折扣张三13895968700北京丰台总部基地给张三9折折扣张三13895968700北京丰台总部基地给张三9折折扣
</view> </view>
<view class="shop-list"> <view class="shop-list">
<view> <view class="order-name">
女士连衣裙(HD738206579) 女士连衣裙(HD738206579)
<img src="/static/images/datu.png" @tap="largeImg" alt=""> <img src="/static/images/datu.png" @tap="largeImg" alt="">
</view> </view>
<view>颜色:黑色,尺码:s码 * 2</view> <view class="specs-name">颜色:黑色,尺码:s码 * 2</view>
<view>颜色:黑色,尺码:s码 * 2</view> <view class="specs-name">颜色:黑色,尺码:s码 * 2</view>
<view><uni-icons color="red" type="minus" size="26"></uni-icons></view> <view class="del-icon" @tap="delGoodsPrecs"><uni-icons color="red" type="trash" size="26"></uni-icons></view>
</view> </view>
</view> </view>
</view> </view>
<!-- 语音识别弹出层 --> <!-- 语音识别弹出层 -->
<view> <view>
@ -126,12 +126,12 @@
<uni-popup ref="inputDialog" type="dialog"> <uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="挂单名称" placeholder="请输入挂单名称" <uni-popup-dialog ref="inputClose" mode="input" title="挂单名称" placeholder="请输入挂单名称"
@confirm="addReg"></uni-popup-dialog> @confirm="addReg"></uni-popup-dialog>
</uni-popup> </uni-popup>
<!-- 查看大图弹出层 --> <!-- 查看大图弹出层 -->
<uni-popup ref="imgPopup" background-color="#fff" @change="change"> <uni-popup ref="imgPopup" background-color="#fff" @change="change">
<view class="img-popup-content"> <view class="img-popup-content">
<img src="/static/images/logo.png" alt="" style="width: 100%;height: 100%;"> <img src="/static/images/logo.png" alt="" style="width: 100%;height: 100%;">
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
@ -145,31 +145,32 @@
isCollapse: false, isCollapse: false,
voiceText: '', voiceText: '',
recordState: false, recordState: false,
pageNumber: 1
} }
}, },
onLoad() { onLoad() {
this.getRegList(); this.getRegList();
this.initRecord(); this.initRecord();
}, },
methods: { methods: {
//挂单列表 //挂单列表
getRegList(){ getRegList() {
let obj = { let obj = {
status:"7", status: "7",
pageVo:{ pageVo: {
pageNumber:1, pageNumber: this.pageNumber,
pageSize:10, pageSize: 10
} }
} }
this.tui.request("/app/sale/listPages", "POST", obj, false, false).then((res) => { this.tui.request("/app/sale/listPages", "POST", obj, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.regList = res.result; this.regList = res.result;
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }
}).catch((res) => { }).catch((res) => {
this.tui.toast(res) this.tui.toast(res)
}) })
}, },
//点击切换折叠状态 //点击切换折叠状态
clickCollapse() { clickCollapse() {
@ -271,26 +272,31 @@
this.tui.toast(res.message) this.tui.toast(res.message)
} }
}).catch((res) => {}) }).catch((res) => {})
},
//查看大图
largeImg() {
this.$refs.imgPopup.open()
},
//新增挂单
addReg(e) {
console.log(e)
this.tui.request("/app/sale/saveOrder", "POST", {
saleName: e
}, false, true).then((res) => {
if (res.code == 200) {
this.tui.toast("新增成功")
this.getRegList();
} else {
this.tui.toast(res.message)
}
}).catch((res) => {
this.tui.toast(res)
})
}, },
//查看大图 //删除商品规格确认弹窗
largeImg(){ delGoodsPrecs(){
this.$refs.imgPopup.open() this.msgType = type
}, this.$refs.alertDialog.open()
//新增挂单
addReg(e){
console.log(e)
this.tui.request("/app/sale/saveOrder", "POST", {
saleName: e
}, false, true).then((res) => {
if (res.code == 200) {
this.tui.toast("新增成功")
this.getRegList();
} else {
this.tui.toast(res.message)
}
}).catch((res) => {
this.tui.toast(res)
})
} }
} }
} }
@ -328,11 +334,25 @@
.name { .name {
width: 53%; width: 53%;
float: left; 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;
} }
.name-date { .name-date {
font-size: 28rpx; font-size: 28rpx;
} }
.bj-btn { .bj-btn {
width: auto; width: auto;
/* height: 60rpx; */ /* height: 60rpx; */
@ -344,15 +364,17 @@
color: blue; color: blue;
text-decoration: underline; text-decoration: underline;
} }
.save-btn{
width: 95%; .save-btn {
height: 80rpx; width: 95%;
text-align: center; height: 80rpx;
line-height: 80rpx; text-align: center;
margin: 0 auto; line-height: 80rpx;
background: #088FEB; margin: 0 auto;
color: #fff; background: #088FEB;
color: #fff;
} }
.order-collapse-item { .order-collapse-item {
background: #eee; background: #eee;
height: auto; height: auto;
@ -361,10 +383,24 @@
margin: 0 auto; margin: 0 auto;
padding: 20rpx; padding: 20rpx;
} }
.img-popup-content{ .specs-name{
width: 500rpx; padding-bottom: 20rpx;
height: 500rpx;
} }
.order-name {
height: 80rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 80rpx;
img{
height: 32rpx;
width: 32rpx;
}
}
.img-popup-content {
width: 500rpx;
height: 500rpx;
}
.order-notes { .order-notes {
height: 100rpx; height: 100rpx;
line-height: 50rpx; line-height: 50rpx;

Loading…
Cancel
Save