|
|
@ -13,7 +13,7 @@ |
|
|
<view class="noPic" v-else>暂无图片</view> |
|
|
<view class="noPic" v-else>暂无图片</view> |
|
|
<view class="shop-productName"> |
|
|
<view class="shop-productName"> |
|
|
<view style="color:#FF5809;">{{item.productName}} ({{item.productSn == null ? '暂无':item.productSn}})</view> |
|
|
<view style="color:#FF5809;">{{item.productName}} ({{item.productSn == null ? '暂无':item.productSn}})</view> |
|
|
<view>单价:{{item.purchasePrice == null ? '暂无':item.purchasePrice}} 数量:{{item.productCount == null ? '暂无':item.productCount}} 总价:{{item.discountAmount == null ? '暂无':item.discountAmount}}</view> |
|
|
<view>单价:{{item.discountAmount == null ? '暂无':item.discountAmount}} 数量:{{item.productCount == null ? '暂无':item.productCount}} 总价:{{item.productCount * item.discountAmount}}</view> |
|
|
<view v-if="item.supplierName !=undefined">供应商:{{item.supplierName == null ? '暂无':item.supplierName}}</view> |
|
|
<view v-if="item.supplierName !=undefined">供应商:{{item.supplierName == null ? '暂无':item.supplierName}}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -36,6 +36,13 @@ |
|
|
<view class="tui-price-large">{{ sales.totalAmount == null ?'暂无':sales.totalAmount }}</view> |
|
|
<view class="tui-price-large">{{ sales.totalAmount == null ?'暂无':sales.totalAmount }}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="tui-price-flex tui-size32" v-if="type == 0"> |
|
|
|
|
|
<view class="tui-flex-shrink">总成本</view> |
|
|
|
|
|
<view class="tui-goods-price"> |
|
|
|
|
|
<view class="tui-size-24">¥</view> |
|
|
|
|
|
<view class="tui-price-large">{{ sales.zongchengben == null ?'暂无':sales.zongchengben }}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
<view class="tui-price-flex tui-size32"> |
|
|
<view class="tui-price-flex tui-size32"> |
|
|
<view class="tui-flex-shrink">实收金额</view> |
|
|
<view class="tui-flex-shrink">实收金额</view> |
|
|
<view class="tui-goods-price"> |
|
|
<view class="tui-goods-price"> |
|
|
@ -72,20 +79,19 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
<view class="tui-flex-shrink">已选金额</view> |
|
|
<view class="tui-flex-shrink">退货金额</view> |
|
|
<view class="tui-goods-price"> |
|
|
<view class="tui-goods-price"> |
|
|
<view class="tui-size-24">¥</view> |
|
|
<view class="tui-size-24">¥</view> |
|
|
<view class="tui-price-large">{{ changeAmount}}</view> |
|
|
<view class="tui-price-large">{{ changeAmount}}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
<!-- <view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
<view class="tui-flex-shrink">退货金额</view> |
|
|
<view class="tui-flex-shrink">退货金额</view> |
|
|
<view class="tui-goods-price"> |
|
|
<view class="tui-goods-price"> |
|
|
<view class="tui-size-24">¥</view> |
|
|
<view class="tui-size-24">¥</view> |
|
|
<input type="digit" style="width: 150rpx;text-align: right;border-bottom: 1px solid #eee;" v-model='returnAmount' @input="getReturnA"> |
|
|
<input type="digit" style="width: 150rpx;text-align: right;border-bottom: 1px solid #eee;" v-model='returnAmount' @input="getReturnA"> |
|
|
<!-- <view class="tui-price-large">{{ returnAmount}}</view> --> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> --> |
|
|
<!-- <view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
<!-- <view class="tui-price-flex tui-size32" v-if="isReturn"> |
|
|
<view class="tui-flex-shrink">欠款抵扣</view> |
|
|
<view class="tui-flex-shrink">欠款抵扣</view> |
|
|
<view class="tui-goods-price"> |
|
|
<view class="tui-goods-price"> |
|
|
@ -111,9 +117,14 @@ |
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn && radio1 == 0"> |
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn && radio1 == 0"> |
|
|
<view class="tui-flex-shrink">配送人员</view> |
|
|
<view class="tui-flex-shrink">配送人员</view> |
|
|
<view class="tui-goods-price"> |
|
|
<view class="tui-goods-price"> |
|
|
<input type="text" v-model="lbgName.workerName" @tap.stop="goPopleList('lbgName')" placeholder="可指定拉包工" disabled style="height:75rpx;line-height:84rpx;border-bottom: 1px solid #088fe0;text-align: center;"> |
|
|
<input type="text" v-model="lbgName.workerName" @tap.stop="goPopleList('lbgName')" placeholder="可指定拉包工" disabled style="height:75rpx;line-height:84rpx;border-bottom: 1px solid #088fe0;text-align: center;"> |
|
|
<uni-icons type="right" size="16" style="line-height: 80rpx;"></uni-icons> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="tui-price-flex tui-size32" v-if="isReturn && radio1 == 0"> |
|
|
|
|
|
<view class="tui-flex-shrink">取货地址</view> |
|
|
|
|
|
<view class="tui-goods-price"> |
|
|
|
|
|
<input type="text" @input="changeAddress" placeholder="请输入取货地址" style="height:75rpx;line-height:84rpx;border-bottom: 1px solid #088fe0;text-align: center;"> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -126,7 +137,9 @@ |
|
|
<u-collapse-item v-for="(item,index) in returnList" :key="index" :title="item.returnSale.createTime" |
|
|
<u-collapse-item v-for="(item,index) in returnList" :key="index" :title="item.returnSale.createTime" |
|
|
:name="item.returnSale.saleId"> |
|
|
:name="item.returnSale.saleId"> |
|
|
<view class="u-collapse-content" v-for="(val, index2) in item.saleDetailDTOList" :key="index2"> |
|
|
<view class="u-collapse-content" v-for="(val, index2) in item.saleDetailDTOList" :key="index2"> |
|
|
<view>{{val.productName}}</view> |
|
|
<view>拉包工:{{item.returnSale.workerName == null?'自送':item.returnSale.workerName}}</view> |
|
|
|
|
|
<view>退货金额:{{item.returnSale.totalAmount}}</view> |
|
|
|
|
|
<view>{{val.productName}} </view> |
|
|
<view v-for="(val1, index3) in val.stockLogList1" :key="index3" v-if="val1.productCount!=0"> |
|
|
<view v-for="(val1, index3) in val.stockLogList1" :key="index3" v-if="val1.productCount!=0"> |
|
|
{{val1.attributeList | sliceMsg}} 数量:{{val1.productCount}} |
|
|
{{val1.attributeList | sliceMsg}} 数量:{{val1.productCount}} |
|
|
</view> |
|
|
</view> |
|
|
@ -183,13 +196,13 @@ |
|
|
<view class="tui-order-flex"> |
|
|
<view class="tui-order-flex"> |
|
|
<view class="tui-item-title">配送公司:</view> |
|
|
<view class="tui-item-title">配送公司:</view> |
|
|
<view class="tui-item-content"> |
|
|
<view class="tui-item-content"> |
|
|
{{ sales.companyName == null ?'暂无':sales.companyName}} |
|
|
{{ sales.companyName == null ?'暂无':sales.companyName}} <text style="color: blue;text-decoration-line: underline;" @tap="makeCall(sales.companyPhone)">({{sales.companyPhone == null ?'':sales.companyPhone}})</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="tui-order-flex"> |
|
|
<view class="tui-order-flex"> |
|
|
<view class="tui-item-title">配送人员:</view> |
|
|
<view class="tui-item-title">配送人员:</view> |
|
|
<view class="tui-item-content"> |
|
|
<view class="tui-item-content"> |
|
|
{{orderXd.worker.workerName == null ?'暂无':orderXd.worker.workerName}} |
|
|
{{orderXd.worker.workerName == null ?'暂无':orderXd.worker.workerName }} <text style="color: blue;text-decoration-line: underline;" @tap="makeCall(orderXd.worker.mobile)"> ({{orderXd.worker.mobile == null ?'暂无':orderXd.worker.mobile}})</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="tui-order-flex"> |
|
|
<view class="tui-order-flex"> |
|
|
@ -216,6 +229,11 @@ |
|
|
<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="sureNpPay"></uni-popup-dialog> |
|
|
@confirm="sureNpPay"></uni-popup-dialog> |
|
|
|
|
|
</uni-popup> |
|
|
|
|
|
<!-- 退货确认输入框 --> |
|
|
|
|
|
<uni-popup ref="returnDialog" type="dialog"> |
|
|
|
|
|
<uni-popup-dialog ref="returnClose" v-model="returnAmount" mode="input" title="请再次确认退货金额" placeholder="请输入退货金额" |
|
|
|
|
|
@confirm="sureReturn"></uni-popup-dialog> |
|
|
</uni-popup> |
|
|
</uni-popup> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
@ -258,7 +276,8 @@ |
|
|
collection:[], |
|
|
collection:[], |
|
|
lbgName:[], |
|
|
lbgName:[], |
|
|
returnAmount:0, |
|
|
returnAmount:0, |
|
|
shopData:[] |
|
|
shopData:[], |
|
|
|
|
|
changeA:'' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
components: { |
|
|
components: { |
|
|
@ -275,8 +294,8 @@ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}) |
|
|
}) |
|
|
this.returnAmount = (sum * this.sales.discount * 0.1).toFixed(2) |
|
|
this.returnAmount = sum.toFixed(2) |
|
|
return (sum * this.sales.discount * 0.1).toFixed(2) |
|
|
return this.returnAmount |
|
|
} else { |
|
|
} else { |
|
|
return 0 |
|
|
return 0 |
|
|
} |
|
|
} |
|
|
@ -303,6 +322,7 @@ |
|
|
}, |
|
|
}, |
|
|
onShow(){ |
|
|
onShow(){ |
|
|
this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) |
|
|
this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) |
|
|
|
|
|
this.type=uni.getStorageSync('type') |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
|
if (option.id != null && option.id != undefined && option.id != "") { |
|
|
if (option.id != null && option.id != undefined && option.id != "") { |
|
|
@ -324,7 +344,22 @@ |
|
|
this.tui.request("/app/sale/get/" + option.id, "GET", null, false, false).then((res) => { |
|
|
this.tui.request("/app/sale/get/" + option.id, "GET", null, false, false).then((res) => { |
|
|
if (res.code == 200 && res.result != null && res.result != undefined) { |
|
|
if (res.code == 200 && res.result != null && res.result != undefined) { |
|
|
this.sales = res.result.sale |
|
|
this.sales = res.result.sale |
|
|
this.list = res.result.saleDetailDTOList |
|
|
this.list = res.result.saleDetailDTOList |
|
|
|
|
|
for(var i=0;i<this.list.length;i++){ |
|
|
|
|
|
for(var m=0;m<this.list[i].stockLogList1.length;m++){ |
|
|
|
|
|
if(this.list[i].productCount == null){ |
|
|
|
|
|
this.list[i].productCount = this.list[i].stockLogList1[m].productCount |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.list[i].productCount += this.list[i].stockLogList1[m].productCount |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.list[i].chengben = this.list[i].productCount * this.list[i].purchasePrice |
|
|
|
|
|
} |
|
|
|
|
|
this.sales.zongchengben = 0 |
|
|
|
|
|
for(var i=0;i<this.list.length;i++){ |
|
|
|
|
|
this.sales.zongchengben += this.list[i].chengben |
|
|
|
|
|
} |
|
|
|
|
|
this.sales.zongchengben = this.sales.zongchengben.toFixed(2) |
|
|
this.order = res.result.customer |
|
|
this.order = res.result.customer |
|
|
this.orderXd = res.result.orderXd |
|
|
this.orderXd = res.result.orderXd |
|
|
this.shopData = res.result.shop |
|
|
this.shopData = res.result.shop |
|
|
@ -374,6 +409,14 @@ |
|
|
strCmd += blesdk.addCPCLLocation(0); |
|
|
strCmd += blesdk.addCPCLLocation(0); |
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
this.bufferData = strCmd; |
|
|
this.bufferData = strCmd; |
|
|
|
|
|
}, |
|
|
|
|
|
makeCall(phone){ |
|
|
|
|
|
uni.makePhoneCall({ |
|
|
|
|
|
phoneNumber: phone + '' |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
changeAddress(e){ |
|
|
|
|
|
this.changeA = e.detail.value |
|
|
}, |
|
|
}, |
|
|
//点击图片放大 |
|
|
//点击图片放大 |
|
|
showImage() { |
|
|
showImage() { |
|
|
@ -415,9 +458,6 @@ |
|
|
//回款按钮 this.type==gys时,是上游客户欠款接口。否则为销售单欠款接口 |
|
|
//回款按钮 this.type==gys时,是上游客户欠款接口。否则为销售单欠款接口 |
|
|
editnoEarn() { |
|
|
editnoEarn() { |
|
|
this.editNoPrice = true; |
|
|
this.editNoPrice = true; |
|
|
}, |
|
|
|
|
|
getReturnA(e){ |
|
|
|
|
|
this.returnAmount = e.detail.value |
|
|
|
|
|
}, |
|
|
}, |
|
|
getNoPay(en) { |
|
|
getNoPay(en) { |
|
|
if (en != undefined) { |
|
|
if (en != undefined) { |
|
|
@ -490,8 +530,9 @@ |
|
|
console.log(that.list) |
|
|
console.log(that.list) |
|
|
}, |
|
|
}, |
|
|
checkBoxChange() { |
|
|
checkBoxChange() { |
|
|
if (this.radio1 == 1) { |
|
|
if (this.radio1 == 2) { |
|
|
this.lbgName = [] |
|
|
this.lbgName = [] |
|
|
|
|
|
this.changeA = '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
open() { |
|
|
open() { |
|
|
@ -500,19 +541,39 @@ |
|
|
close() { |
|
|
close() { |
|
|
this.popupShow = false |
|
|
this.popupShow = false |
|
|
}, |
|
|
}, |
|
|
sureReturn() { |
|
|
sureReturn() { |
|
|
|
|
|
console.log(this.$refs.returnClose.val) |
|
|
|
|
|
if(this.radio1 == 0 && this.changeA == ''){ |
|
|
|
|
|
this.tui.toast("请输入取货地址") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.list.forEach(item1 => { |
|
|
this.list.forEach(item1 => { |
|
|
item1.stockLogList1.forEach(item2 => { |
|
|
item1.stockLogList1.forEach((item2,index) => { |
|
|
|
|
|
console.log(index) |
|
|
if (item2.returnCount) { |
|
|
if (item2.returnCount) { |
|
|
item2.productCount = item2.returnCount |
|
|
item2.productCount = item2.returnCount |
|
|
} else { |
|
|
} else { |
|
|
item2.productCount = 0 |
|
|
item1.stockLogList1.splice(index, 1) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
this.sales.saleId = this.sales.id; |
|
|
for(var i=0;i<this.list.length;i++){ |
|
|
this.sales.totalAomount = this.returnAmount; |
|
|
for(var m=0;m<this.list[i].stockLogList1.length;m++){ |
|
|
|
|
|
if(m==0){ |
|
|
|
|
|
this.list[i].productCount = this.list[i].stockLogList1[m].productCount |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.list[i].productCount += this.list[i].stockLogList1[m].productCount |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.sales.saleId = this.sales.id; |
|
|
|
|
|
this.sales.province = '' |
|
|
|
|
|
this.sales.city = '' |
|
|
|
|
|
this.sales.area = '' |
|
|
|
|
|
this.sales.receiveAddress = this.changeA |
|
|
|
|
|
this.sales.totalAmount = this.$refs.returnClose.val; |
|
|
|
|
|
this.sales.transportType = this.radio1 |
|
|
this.tui.request("/app/return/rtg", "post", { |
|
|
this.tui.request("/app/return/rtg", "post", { |
|
|
returnSale: this.sales, |
|
|
returnSale: this.sales, |
|
|
returnSaleDetailList: this.list, |
|
|
returnSaleDetailList: this.list, |
|
|
@ -537,8 +598,9 @@ |
|
|
// }) |
|
|
// }) |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
if (this.isReturn) { |
|
|
if (this.isReturn) { |
|
|
this.sureReturn() |
|
|
this.$refs.returnDialog.open() |
|
|
|
|
|
// this.sureReturn() |
|
|
} else { |
|
|
} else { |
|
|
this.isReturn = true; |
|
|
this.isReturn = true; |
|
|
} |
|
|
} |
|
|
@ -578,7 +640,7 @@ |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss"> |
|
|
.btn-wrap { |
|
|
.btn-wrap { |
|
|
width: 164rpx; |
|
|
width: 164rpx; |
|
|
height: 80rpx; |
|
|
height: 80rpx; |
|
|
@ -879,7 +941,7 @@ |
|
|
.shop-collapse text { |
|
|
.shop-collapse text { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
padding-right: 40rpx; |
|
|
// padding-right: 40rpx; |
|
|
border-right: 1px solid #eee; |
|
|
border-right: 1px solid #eee; |
|
|
} |
|
|
} |
|
|
.noPic{ |
|
|
.noPic{ |
|
|
@ -890,5 +952,9 @@ |
|
|
line-height: 140rpx; |
|
|
line-height: 140rpx; |
|
|
color: #777; |
|
|
color: #777; |
|
|
background: #eee; |
|
|
background: #eee; |
|
|
|
|
|
} |
|
|
|
|
|
.checklist-box{ |
|
|
|
|
|
margin-right: 0 !important; |
|
|
|
|
|
margin-left: 50rpx !important; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |