|
|
|
@ -9,11 +9,12 @@ |
|
|
|
<ul> |
|
|
|
<li> |
|
|
|
<view class="name"> |
|
|
|
<view style="flex:1;">{{item.saleName}}</view> |
|
|
|
<view class="sale-name">{{item.saleName}}</view> |
|
|
|
<view class="btn-list"> |
|
|
|
<view class="bj-btn" @tap.stop="inputDialogToggle('edit', item)">编辑</view> |
|
|
|
<view class="bj-btn" @tap.stop="scanCodeAdd(item.id)">扫码开单</view> |
|
|
|
<view class="bj-btn" @tap.stop="toggle('center',item)">语音备注</view> |
|
|
|
<view class="bj-btn" @tap.stop="scanCodeAdd(item)">扫码选货</view> |
|
|
|
<view class="bj-btn" @tap.stop="goSaleGoods()">开单</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="name-date"> |
|
|
|
@ -29,16 +30,20 @@ |
|
|
|
<text style="color: red;">备注:</text> |
|
|
|
{{item.remark}} |
|
|
|
</view> |
|
|
|
<view class="shop-list" v-for="items in item.saleDetailDTOList"> |
|
|
|
<view class="shop-list" v-for="(items,index1) in item.saleDetailDTOList"> |
|
|
|
<view class="order-name"> |
|
|
|
{{items.productName}} {{items.productSn}} |
|
|
|
<img :src="items.purchasePrice" @tap.stop="largeImg" alt=""> |
|
|
|
<img :src="items.productPicture" @tap.stop="largeImg(items.productPicture)" alt=""> |
|
|
|
</view> |
|
|
|
<view class="specs-name" v-for="itemss in items.saleDetailQueryDTO"> |
|
|
|
{{itemss.attributeList}} * {{itemss.productCount}} |
|
|
|
<view class="specs-name" v-for="(itemss,index2) in items.stockLogList1"> |
|
|
|
<view style="margin-right:5%;" @tap="delGoodsPrecs(item,index1,index2)"> |
|
|
|
<uni-icons color="red" type="minus" size="26"></uni-icons> |
|
|
|
</view> |
|
|
|
{{itemss.attributeList | sliceMsg}} * {{itemss.productCount}} |
|
|
|
</view> |
|
|
|
<view class="del-icon" @tap.stop="delGoods(item,items.productId)"> |
|
|
|
<uni-icons color="red" type="trash" size="26"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="del-icon" @tap.stop="delGoodsPrecs"><uni-icons color="red" type="trash" |
|
|
|
size="26"></uni-icons></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -82,7 +87,8 @@ |
|
|
|
<view class="shop-popup-title-right-box" style="color: #088FEB;">{{goodsDetail.productName}} |
|
|
|
</view> |
|
|
|
<view class="shop-popup-title-right-box">{{goodsDetail.productSn}}</view> |
|
|
|
<view class="popup-title-right-box" style="color: darkorange;" @tap="inputDialogToggle('payDialog')"> |
|
|
|
<view class="popup-title-right-box" style="color: darkorange;" |
|
|
|
@tap="inputDialogToggle('payDialog')"> |
|
|
|
<text style="margin-right:20rpx;">修改价格</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -152,7 +158,7 @@ |
|
|
|
<!-- 查看大图弹出层 --> |
|
|
|
<uni-popup ref="imgPopup" background-color="#fff" @change="change"> |
|
|
|
<view class="img-popup-content"> |
|
|
|
<img src="/static/images/logo.png" alt="" style="width: 100%;height: 100%;"> |
|
|
|
<img :src="bigImg" alt="" style="width: 100%;height: 100%;"> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
</view> |
|
|
|
@ -192,7 +198,20 @@ |
|
|
|
zPrice: 0, |
|
|
|
zNum: 0, |
|
|
|
storageType: 0, |
|
|
|
hangId:'' |
|
|
|
hangId: '', |
|
|
|
bigImg: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
sliceMsg(val) { |
|
|
|
var name = '' |
|
|
|
if (typeof(val) == 'string') { |
|
|
|
let newObj = JSON.parse(val) |
|
|
|
for (let as in newObj) { |
|
|
|
name += newObj[as] + '/' |
|
|
|
} |
|
|
|
} |
|
|
|
return name; |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
@ -282,10 +301,15 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
//扫一扫功能 |
|
|
|
scanCodeAdd(id) { |
|
|
|
scanCodeAdd(item) { |
|
|
|
uni.scanCode({ |
|
|
|
success: (res) => { |
|
|
|
this.hangId = id |
|
|
|
this.hangId = item.id |
|
|
|
if (item.saleDetailDTOList) { |
|
|
|
for (let i = 0; i < item.saleDetailDTOList.length; i++) { |
|
|
|
this.carList.push(item.saleDetailDTOList[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
this.toggle('bottom', res.result); |
|
|
|
|
|
|
|
}, |
|
|
|
@ -305,13 +329,12 @@ |
|
|
|
this.goodsDetail.attributeList[index].value[index1].isChecked = true; |
|
|
|
var name = '', |
|
|
|
evalue = [], |
|
|
|
obj = {}, |
|
|
|
specsList = [] |
|
|
|
obj = {} |
|
|
|
for (var i = 0; i < this.goodsDetail.attributeList.length; i++) { |
|
|
|
for (var m = 0, Ien = this.goodsDetail.attributeList[i].value; m < Ien.length; m++) { |
|
|
|
if (Ien[m].isChecked == true) { |
|
|
|
evalue.push(Ien[m].value) |
|
|
|
name += Ien[m].value |
|
|
|
name += Ien[m].value + '/' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -325,13 +348,19 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.goodsDetail.attributeList.length == jishuqi) { |
|
|
|
let data = {} |
|
|
|
this.attributeList = { |
|
|
|
attributeList: JSON.stringify(obj), |
|
|
|
productCount: this.temporaryNum, |
|
|
|
name: name, |
|
|
|
price: this.purchasePrice |
|
|
|
} |
|
|
|
|
|
|
|
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) { |
|
|
|
this.goodsDetail.attributeList[i].isChecked = false; |
|
|
|
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) { |
|
|
|
this.goodsDetail.attributeList[i].value[m].isChecked = false |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.temporaryList.length == 0) { |
|
|
|
this.temporaryList.push(this.attributeList); |
|
|
|
} else { |
|
|
|
@ -348,6 +377,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
@ -376,14 +406,10 @@ |
|
|
|
productSn: this.goodsDetail.productSn, |
|
|
|
productPicture: this.goodsDetail.productPicture, |
|
|
|
supplierName: this.goodsDetail.supplierName, |
|
|
|
saleDetailQueryDTO:this.temporaryList |
|
|
|
stockLogList1: this.temporaryList |
|
|
|
} |
|
|
|
// if(){ |
|
|
|
|
|
|
|
// } |
|
|
|
this.carList.push(data) |
|
|
|
console.log(this.carList); |
|
|
|
this.temporaryList = [] |
|
|
|
// this.temporaryList = [] |
|
|
|
this.purchasePrice = '' |
|
|
|
this.zPrice = '' |
|
|
|
this.zNum = '' |
|
|
|
@ -399,7 +425,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
//保存扫码选择的商品 |
|
|
|
//保存扫码选择的商品、删除整条商品数据都用这个方法 |
|
|
|
setSaleDetail() { |
|
|
|
this.tui.request("/app/sale/setSaleDetail", "post", { |
|
|
|
saleDetailList: this.carList, |
|
|
|
@ -477,7 +503,8 @@ |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
//查看大图 |
|
|
|
largeImg() { |
|
|
|
largeImg(img) { |
|
|
|
this.bigImg = img |
|
|
|
this.$refs.imgPopup.open() |
|
|
|
}, |
|
|
|
//新增挂单 |
|
|
|
@ -495,27 +522,63 @@ |
|
|
|
this.tui.toast(res) |
|
|
|
}) |
|
|
|
}, |
|
|
|
//删除商品规格确认弹窗 |
|
|
|
delGoodsPrecs(id) { |
|
|
|
//删除整条挂单 |
|
|
|
delHangOrder() { |
|
|
|
let that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条商品吗?", |
|
|
|
content: "确定删除此条挂单记录吗?", |
|
|
|
success: function(res) { |
|
|
|
this.tui.request("/app/sale/delById", "POST", { |
|
|
|
that.tui.request("/app/sale/delById", "POST", { |
|
|
|
id: id |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("删除成功") |
|
|
|
this.getRegList(); |
|
|
|
that.tui.toast("删除成功") |
|
|
|
that.getRegList(); |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
that.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => { |
|
|
|
this.tui.toast(res) |
|
|
|
that.tui.toast(res) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
//删除整条商品 |
|
|
|
delGoods(item, productId) { |
|
|
|
let that = this; |
|
|
|
this.hangId = item.id; |
|
|
|
console.log(item.saleDetailDTOList) |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条商品吗?", |
|
|
|
success: function(res) { |
|
|
|
for (let i = 0; i < item.saleDetailDTOList.length; i++) { |
|
|
|
if (item.saleDetailDTOList[i].productId == productId) { |
|
|
|
item.saleDetailDTOList.splice(item.saleDetailDTOList[i], 1) |
|
|
|
} |
|
|
|
} |
|
|
|
that.carList = item.saleDetailDTOList |
|
|
|
that.setSaleDetail(); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
//删除商品下的单条规格 |
|
|
|
delGoodsPrecs(item, index, index1) { |
|
|
|
let that = this; |
|
|
|
this.hangId = item.id; |
|
|
|
console.log(item.saleDetailDTOList) |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条规格吗?", |
|
|
|
success: function(res) { |
|
|
|
item.saleDetailDTOList[index].stockLogList1.splice(item.saleDetailDTOList[index] |
|
|
|
.stockLogList1[index1], 1) |
|
|
|
that.carList = item.saleDetailDTOList |
|
|
|
that.setSaleDetail(); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
//编辑挂单信息 |
|
|
|
setDetail() { |
|
|
|
this.tui.request("/app/sale/updateOrder", "POST", { |
|
|
|
@ -537,6 +600,12 @@ |
|
|
|
checkPay(price) { |
|
|
|
this.purchasePrice = price; |
|
|
|
this.$refs.payDialog.close() |
|
|
|
}, |
|
|
|
//带参数跳转到开单页 |
|
|
|
goSaleGoods() { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/inventory/goodsList1' |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -545,7 +614,7 @@ |
|
|
|
<style lang="scss" scoped> |
|
|
|
button { |
|
|
|
color: #ffffff; |
|
|
|
background: #5fd9ee; |
|
|
|
background: linear-gradient(90deg, #60F3FF, #088FEB); |
|
|
|
width: 90%; |
|
|
|
margin-top: 20upx; |
|
|
|
} |
|
|
|
@ -630,7 +699,10 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.specs-name { |
|
|
|
display: flex; |
|
|
|
padding-bottom: 20rpx; |
|
|
|
height: 60rpx; |
|
|
|
line-height: 60rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.order-name { |
|
|
|
@ -638,6 +710,7 @@ |
|
|
|
font-size: 32rpx; |
|
|
|
font-weight: bold; |
|
|
|
line-height: 80rpx; |
|
|
|
|
|
|
|
img { |
|
|
|
height: 32rpx; |
|
|
|
width: 32rpx; |
|
|
|
@ -722,9 +795,19 @@ |
|
|
|
margin: 0 auto; |
|
|
|
} |
|
|
|
|
|
|
|
.sale-name { |
|
|
|
width: 300rpx; |
|
|
|
height: 80rpx; |
|
|
|
padding: 0 20rpx; |
|
|
|
text-overflow: ellipsis; |
|
|
|
overflow: hidden; |
|
|
|
white-space: nowrap; |
|
|
|
} |
|
|
|
|
|
|
|
.btn-list { |
|
|
|
flex: 1; |
|
|
|
// flex: 1; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-content { |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
@ -732,24 +815,29 @@ |
|
|
|
height: 1200rpx; |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-title { |
|
|
|
display: flex; |
|
|
|
height: 180rpx; |
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
margin-top: 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-title-left { |
|
|
|
width: 150rpx; |
|
|
|
height: 150rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-title-right { |
|
|
|
width: 400rpx; |
|
|
|
margin-left: 30rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-title-right-box { |
|
|
|
height: 50rpx; |
|
|
|
line-height: 50rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-checkList { |
|
|
|
display: flex; |
|
|
|
height: 50rpx; |
|
|
|
@ -757,10 +845,12 @@ |
|
|
|
line-height: 50rpx; |
|
|
|
margin: 20rpx 0; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-checkList-box { |
|
|
|
height: 50rpx; |
|
|
|
width: 60%; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-bottom { |
|
|
|
width: 100%; |
|
|
|
height: 100rpx; |
|
|
|
@ -768,13 +858,16 @@ |
|
|
|
bottom: 0; |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-bottom-left { |
|
|
|
width: 50%; |
|
|
|
line-height: 80rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-bottom-right { |
|
|
|
width: 50%; |
|
|
|
line-height: 100rpx; |
|
|
|
|
|
|
|
.bottom-btn { |
|
|
|
width: 70%; |
|
|
|
line-height: 35px; |
|
|
|
@ -787,11 +880,13 @@ |
|
|
|
border-radius: 70rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-container { |
|
|
|
width: 100%; |
|
|
|
background: #fff; |
|
|
|
height: 50rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-purchase-price { |
|
|
|
display: flex; |
|
|
|
line-height: 40px; |
|
|
|
@ -799,11 +894,13 @@ |
|
|
|
width: 95%; |
|
|
|
margin: 20rpx auto; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-title-fur { |
|
|
|
width: 95%; |
|
|
|
height: 70rpx; |
|
|
|
margin: 0 auto; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-name { |
|
|
|
font-size: 30rpx; |
|
|
|
width: 50%; |
|
|
|
@ -811,6 +908,7 @@ |
|
|
|
height: 70rpx; |
|
|
|
line-height: 70rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.shop-attrs { |
|
|
|
text { |
|
|
|
display: inline-block; |
|
|
|
@ -829,11 +927,13 @@ |
|
|
|
color: #fff; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.shop-popup-title-left img { |
|
|
|
width: 150rpx; |
|
|
|
height: 150rpx; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.popup-pay-content { |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
@ -842,12 +942,14 @@ |
|
|
|
height: auto; |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-pay-title { |
|
|
|
font-size: 36rpx; |
|
|
|
font-weight: bold; |
|
|
|
text-align: center; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-pay-container { |
|
|
|
margin-top: 20rpx; |
|
|
|
height: 100rpx; |
|
|
|
|