wangfukang 3 years ago
parent
commit
4cce9ca378
  1. 25
      pages/index/addHangOrder.vue
  2. 77
      pages/index/orderDetail.vue
  3. 43
      pages/index/peopleList.vue
  4. 19
      pages/index/waitStorageDetail.vue
  5. 18
      pages/inventory/addGoods.vue
  6. 47
      pages/inventory/addinventory.vue
  7. 10
      pages/inventory/goodsList1.vue
  8. 39
      pages/rebate/withdrawal.vue

25
pages/index/addHangOrder.vue

@ -336,12 +336,27 @@
}
}else{
this.productId = res.result
this.toggle('bottom', res.result);
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
this.carList.push(item.saleDetailDTOList[i])
this.tui.request("/app/product/getByBarcode", "POST", {
barcode:res.result
}, false, true).then((res1) => {
if (res1.code == 200) {
if(res1.result == ''){
this.tui.toast('您的店铺中暂无该商品!')
}else{
this.toggle('bottom', res1.result[0].id);
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
this.carList.push(item.saleDetailDTOList[i])
}
}
}
} else {
this.tui.toast(res.message)
}
}
}).catch((res) => {
this.tui.toast(res)
})
}
},

77
pages/index/orderDetail.vue

@ -1,11 +1,17 @@
<template>
<view class="container">
<uni-card :title="sales.userName == null ?'暂无':sales.userName+'('+order.phone+')'"
thumbnail="/static/images/dingdan/dd0.png">
<view class="uni-body" v-if="sales.province != null">
{{sales.province + sales.area + sales.city + sales.receiveAddress}} </view>
</uni-card>
<view class="container">
<view v-if="sales.userName !='散客'">
<uni-card :title="sales.userName == null ?'暂无':sales.userName+'('+order.phone+')'"
thumbnail="/static/images/dingdan/dd0.png">
<view class="uni-body" v-if="sales.province != null">
{{sales.province + sales.area + sales.city + sales.receiveAddress}} </view>
</uni-card>
</view>
<view v-else>
<uni-card :title="sales.userName == null ?'暂无':sales.userName"
thumbnail="/static/images/dingdan/dd0.png">
</uni-card>
</view>
<view class="tui-order-item boxbg">
<view class="content-box">
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(item,index) in list" :key="index">
@ -76,7 +82,8 @@
<view class="tui-flex-shrink">备注</view>
<view class="tui-goods-price">
<uni-tooltip :content="sales.remark == null ?'暂无':sales.remark" placement="left">
<view style="font-size: 13px;width: 200px;height: 40rpx;overflow: hidden;text-align: right;">{{ sales.remark == null ?'':sales.remark}}</view>
<view style="font-size: 13px;width: 200px;height: 40rpx;overflow: hidden;text-align: right;">{{ sales.remark == null ?'':sales.remark}}</view>
<text style="color: blue;" v-if="sales.remark != null">查看更多</text>
</uni-tooltip>
</view>
</view>
@ -241,7 +248,7 @@
</view>
<view class="tui-btn-mr" v-if="sales.status == 0 || sales.status == 1" @click="cancelOrder">取消订单</view>
<view class="tui-btn-mr" v-if="sales.status == 4" @click="returnGoods">{{ !isReturn ? '退货' : '确认退货'}}</view>
<view class="tui-btn-mr" @tap="inputDialogToggle()" v-if="sales.status != 6 && !editNoPrice && sales.status != 2">回款</view>
<view class="tui-btn-mr" @tap="inputDialogToggle()" v-if="sales.status != 6 && !editNoPrice && sales.status != 2 && sales.noEarn >0">回款</view>
</view>
<!-- 回款金额输入框 -->
<uni-popup ref="inputDialog" type="dialog">
@ -408,12 +415,6 @@
},
//打印小票
onPrintSmall(){
// this.sales = res.result.sale
// this.list = res.result.saleDetailDTOList
// this.order = res.result.customer
// this.orderXd = res.result.orderXd
// this.shopData = res.result.shop
let that = this;
that.yNum = 150
let heightNum = 300
@ -435,34 +436,39 @@
strCmd += blesdk.addCPCLText('280', '130', '24', '0', 0, '日期:' + this.sales.createTime) //+
strCmd += blesdk.addCPCLText('0', '150', '24', '0', 0,
'=========================================================')
this.carList.forEach(function(value, key) {
strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, value.productName + '(' +
value.productSn + ')')
value.stockLogList.forEach(function(value1, key1) {
for(var i=0;i<this.list.length;i++){
strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, this.list[i].productName + '(' +
this.list[i].productSn + ')')
for(var m=0;m<this.list[i].stockLogList.length;m++){
strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, (that.slicePrint(
key1)) + '*' + value1)
key1)) + '*' + this.list[i].stockLogList[m].attributeList)
strCmd += blesdk.addCPCLText('280', that.yNum, '24', '0', 0, '单价:' + value.discountAmount)
strCmd += blesdk.addCPCLText('440', that.yNum, '24', '0', 0, '总价:' + (value
.discountAmount * value1))
})
})
.discountAmount * this.list[i].stockLogList[m].productCount))
}
}
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0,
'===============================================================')
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '总数量:' + this.totalAmount)
strCmd += blesdk.addCPCLText('200', this.yNum, '24', '0', 0, '总金额' + this.shouldPay)
strCmd += blesdk.addCPCLText('400', this.yNum, '24', '0', 0, '应收:' + this.relPrice)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '实收:' + this.priceOk)
strCmd += blesdk.addCPCLText('200', this.yNum, '24', '0', 0, '欠款:' + (this.relPrice - this.priceOk))
strCmd += blesdk.addCPCLText('400', this.yNum, '24', '0', 0, '其他费用:' + (this.otherExpense == '' ? 0 : this.otherExpense))
if(this.remark.length >20){
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '总数量:' + this.sales.productCount)
strCmd += blesdk.addCPCLText('200', this.yNum, '24', '0', 0, '总金额' + this.sales.totalAmount)
strCmd += blesdk.addCPCLText('400', this.yNum, '24', '0', 0, '应收:' + this.sales.realAmount)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '实收:' + this.sales.alreadyEarn)
strCmd += blesdk.addCPCLText('200', this.yNum, '24', '0', 0, '欠款:' + this.sales.noEarn)
strCmd += blesdk.addCPCLText('400', this.yNum, '24', '0', 0, '其他费用:' + this.sales.otherExpense)
// this.sales = res.result.sale
// this.list = res.result.saleDetailDTOList
// this.order = res.result.customer
// this.orderXd = res.result.orderXd
// this.shopData = res.result.shop
if(this.sales.remark.length >20){
let position = 20;
let part1 = this.remark.substring(0, position);
let part2 = this.remark.substring(position);
let part1 = this.sales.remark.substring(0, position);
let part2 = this.sales.remark.substring(position);
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + part1)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, part2)
}else{
strCmd += blesdk.addCPCLText('0', 3000, '24', '0', 0, '备注:' + this.remark)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + this.sales.remark)
}
strCmd += blesdk.addCPCLLocation(0);
strCmd += blesdk.addCPCLPrint();
@ -962,6 +968,9 @@
padding-left: 16upx;
box-sizing: border-box;
}
.uni-tooltip {
display: flex;
}
.tui-order-title::before {
content: '';

43
pages/index/peopleList.vue

@ -36,7 +36,12 @@
</view>
<!-- 物流、发车、大巴走这一套 -->
<view class="" v-if="popleType== 'wlName' || popleType== 'fcName' || popleType== 'dbName'">
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[0]" :key="item">
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="(item,index) in popleList[0]" :key="index">
<view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<view style="width: 100%;height: 100%;line-height: 120rpx;text-align: center;color: red;" @tap.stop="clickPhone(item.mobile)">
此{{popleType== 'wlName'?'物流公司': popleType== 'fcName'?'厢货车': popleType== 'dbName'?'大巴车':'公司'}}已下线,点击可拨打电话
</view>
</view>
<view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
@ -58,6 +63,11 @@
<view>↓↓下方为区域内所有物流公司↓↓</view>
</view>
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[1]" :key="item">
<view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<view style="width: 100%;height: 100%;line-height: 120rpx;text-align: center;color: red;" @tap.stop="clickPhone(item.mobile)">
此{{popleType== 'wlName'?'物流公司': popleType== 'fcName'?'厢货车': popleType== 'dbName'?'大巴车':'公司'}}已下线,点击可拨打电话
</view>
</view>
<view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
@ -78,6 +88,11 @@
<!--快递、拉包工 -->
<view class="" v-if="popleType== 'kdName' || popleType== 'lbgName' || popleType== 'kdyName'">
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList" :key="item">
<view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<view style="width: 100%;height: 100%;line-height: 120rpx;text-align: center;color: red;" @tap.stop="clickPhone(item.mobile)">
此{{popleType== 'wlName'?'物流公司': popleType== 'fcName'?'厢货车': popleType== 'dbName'?'大巴车':'公司'}}已下线,点击可拨打电话
</view>
</view>
<view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
@ -188,7 +203,7 @@
} else {
this.popleList = [...this.popleList, ...res.result.content]
}
this.totalPages = res.result.number
this.totalPages = res.result.totalPages
}else{
this.tui.toast(res.message)
}
@ -270,6 +285,19 @@
this.tui.toast(res.message)
}
})
},
//未入库遮罩
clickMask(item){
let title = ''
if(item.delFlag == 0){
title = '请将商品上架后再操作!'
}else{
title = '请将上次入库的采购价维护后再进行操作!'
}
uni.showToast({
title: title,
icon: 'none'
})
},
//点击选择列表,带参数 返回上一页
clickList(item) {
@ -329,6 +357,9 @@
//新增人员
goAddPeople(type,data){
this.modelShow = true;
this.pages = 1
this.searchName = ""
this.popleList = []
uni.navigateTo({
url: "/pages/billing/addUser?type="+type+'&data='+JSON.stringify(data) + '&popleType=' + this.popleType
})
@ -430,5 +461,13 @@
text-align: center;
color: #BEBEBE;
margin-top:20rpx;
}
.shop-mask {
width: 100%;
height: 120rpx;
position: absolute;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.6);
}
</style>

19
pages/index/waitStorageDetail.vue

@ -48,17 +48,13 @@
<view class="tui-price-large">{{ sales.noPay == null ?'暂无':sales.noPay}}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">其他费用</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.otherPay == null ?'暂无':sales.otherPay}}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32">
<view class="tui-flex-shrink">备注</view>
<view class="tui-goods-price">
<view class="tui-price-large">{{ sales.remark == null ?'暂无':sales.remark}}</view>
<uni-tooltip :content="sales.remark == null ?'暂无':sales.remark" placement="left">
<view style="font-size: 13px;width: 200px;height: 40rpx;overflow: hidden;text-align: right;">{{ sales.remark == null ?'':sales.remark}}</view>
<text style="color: blue;">查看更多</text>
</uni-tooltip>
</view>
</view>
</view>
@ -289,7 +285,7 @@
}
</script>
<style lang="scss" scoped>
<style lang="scss">
.container {
padding-bottom: 118rpx;
.boxbg {
@ -536,5 +532,8 @@
line-height: 140rpx;
color: #777;
background: #eee;
}
.uni-tooltip {
display: flex !important;
}
</style>

18
pages/inventory/addGoods.vue

@ -14,7 +14,7 @@
:maxCount="1"></u-upload>
</uni-forms-item>
<uni-forms-item label="货号" name="productSn" required>
<uni-easyinput type="text" v-model="formData.productSn" placeholder="请输入货号" trim="all" />
<uni-easyinput type="text" v-model="formData.productSn" @blur="getSnIsRepeat" placeholder="请输入货号" trim="all" />
</uni-forms-item>
<uni-forms-item label="商品条码" name="barcode">
<uni-easyinput type="text" v-model="formData.barcode" placeholder="可以扫码商品条码添加" trim="all" />
@ -206,21 +206,24 @@
},
categoryChange(e) {
this.categoryId = e
},
// 触发提交表单
submit() {
let that = this;
that.tui.request('/app/product/getByProductSn', "post", {
},
//货号是否重复
getSnIsRepeat(){
this.tui.request('/app/product/getByProductSn', "post", {
productSn:this.formData.productSn
}, false, true).then((res1) => {
if (res1.code == 200) {
if(res1.result != ''){
this.tui.toast('当前货号已被商品:“'+res1.result[0].productName+'”占用,请重新输入')
return;
this.formData.productSn = ''
}
}
})
},
// 触发提交表单
submit() {
let that = this;
let url = ''
this.$refs.form.validate().then(res => {
if(that.dataList !=''){
@ -269,7 +272,6 @@
}else{
that.formData.barcode = res.result;
}
}
})
},

47
pages/inventory/addinventory.vue

@ -662,25 +662,34 @@
value.stockLogList1.push(obj)
})
purchaseDetails.push(value)
})
this.tui.request("/app/stock/putInOfProduct", "post", {
purchase: purchase,
purchaseDetails: purchaseDetails
}, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "入库成功",
icon: 'none'
})
uni.navigateBack({
delta: 2
})
} else {
uni.showToast({
title: "入库失败",
icon: 'none'
})
}
})
uni.showModal({
title: "提示",
content: "请再次确认供应商、商品库存、规格是否正确,入库后不可修改。确认入库吗?",
success: function(res) {
if(res.confirm){
that.tui.request("/app/stock/putInOfProduct", "post", {
purchase: purchase,
purchaseDetails: purchaseDetails
}, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "入库成功",
icon: 'none'
})
uni.navigateBack({
delta: 2
})
} else {
uni.showToast({
title: "入库失败",
icon: 'none'
})
}
})
}
that.$forceUpdate()
}
})
},
//编辑每一个的单价

10
pages/inventory/goodsList1.vue

@ -335,10 +335,10 @@
<view style="height: 60rpx;line-height: 60rpx;">上次拿货时间:</view>
<view style="height: 60rpx;line-height: 60rpx;">{{historyList.createTime}}</view>
<view style="height: 60rpx;line-height: 60rpx;">上次拿货数:{{historyList.productCount}}</view>
<view style="height: 60rpx;line-height: 60rpx;font-size: 36rpx;font-weight: bold;">上次拿货价:{{historyList.price}}</view>
<view style="height: 60rpx;line-height: 60rpx;font-size: 36rpx;font-weight: bold;">上次拿货价:{{historyList.discountAmount}}</view>
</view>
<view class="popup-bottom">
<view class="popup-btn" @tap="checkPay(historyList.price)">一键使用历史价格</view>
<view class="popup-btn" @tap="checkPay(historyList.discountAmount)">一键使用历史价格</view>
</view>
</view>
</uni-popup>
@ -805,6 +805,10 @@
},
//商品上选择是零售价还是批发价
checkPay(price) {
if(price == undefined || price == null){
this.tui.toast("暂无拿货记录")
return
}
let that = this;
let num = this.carList.get(this.index)
num.discountAmount = price
@ -1272,7 +1276,7 @@
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + part1)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, part2)
}else{
strCmd += blesdk.addCPCLText('0', 3000, '24', '0', 0, '备注:' + this.remark)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + this.remark)
}
strCmd += blesdk.addCPCLLocation(0);
strCmd += blesdk.addCPCLPrint();

39
pages/rebate/withdrawal.vue

@ -30,7 +30,7 @@
</view>
</view>
<view>
<u-button type="primary" shape="circle" @click="onSubmit">提现</u-button>
<u-button type="primary" shape="circle" :disabled="isClick" @click="onSubmit">提现</u-button>
</view>
</uni-card>
</view>
@ -45,7 +45,8 @@
zfbAccount: '',
zfbName: '',
realBalance:'',
shopId:''
shopId:'',
isClick:false
}
},
onLoad(options) {
@ -57,6 +58,7 @@
this.realBalance = this.canbalance
},
onSubmit() {
this.isClick = true;
if(Number(this.realBalance) > Number(this.canbalance)){
this.tui.toast("提现金额不能大于账户余额!")
return
@ -72,20 +74,25 @@
shopId:this.shopId,
aliName:this.zfbName,
aliAccount:this.zfbAccount
}, false, false, true).then((res) => {
if (res.code !== 200) return
uni.showToast({
title: res.message,
icon: 'none',
duration: 2000,
complete() {
setTimeout(() => {
uni.reLaunch({
url: `/pages/rebate/rebate`
})
}, 2000)
}
})
}, false, false, true).then((res) => {
if (res.code == 200){
this.tui.toast(res.message)
setTimeout(() => {
uni.reLaunch({
url: `/pages/rebate/rebate`
})
}, 2000)
}else{
this.tui.toast(res.message)
setTimeout(() => {
this.isClick = false;
// uni.reLaunch({
// url: `/pages/rebate/rebate`
// })
}, 2000)
}
})
}
}

Loading…
Cancel
Save