wangfukang 3 years ago
parent
commit
0c939040ee
  1. 2
      pages/index/addHangOrder.vue
  2. 6
      pages/index/customAndSupplierProductDetail.vue
  3. 6
      pages/index/dataStatistics.vue
  4. 14
      pages/index/downStearmList.vue
  5. 6
      pages/index/index.vue
  6. 54
      pages/index/orderDetail.vue
  7. 29
      pages/index/peopleList.vue
  8. 2
      pages/index/shareStyle.vue
  9. 75
      pages/inventory/gategory.vue
  10. 163
      pages/inventory/gategoryLow.vue
  11. 6
      pages/inventory/getProductIdToList.vue

2
pages/index/addHangOrder.vue

@ -32,7 +32,7 @@
</view>
<view class="shop-list" v-for="(items,index1) in item.saleDetailDTOList" :key="index1">
<view class="order-name">
<text style="float: left;">{{items.productName}}({{items.productSn}})单价:{{items.price}}</text>
<text style="float: left;">{{items.productName}}({{items.productSn}})单价:{{items.discountAmount}}</text>
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6b5ab32ff93a4c51b90e562e0b22e850.png" @tap.stop="largeImg(items.productPicture)" alt="">
</view>
<view class="specs-name" v-for="(itemss,index2) in items.stockLogList1" :key="index2">

6
pages/index/customAndSupplierProductDetail.vue

@ -4,7 +4,7 @@
<view class="shop-box" v-for="(item,index3) in list" :key="index3">
<uni-card :title="item.productName?item.productName:'暂无'"
:sub-title="item.createTime?item.createTime:'暂无'" >
<view class="uni-body" style="text-align: center;">采购价:{{item.realPrice?item.realPrice:'暂无'}} 总数量:{{item.productCount?item.productCount:'暂无'}} 总价:{{item.shouldPay?item.shouldPay:'暂无'}}</view>
<view class="uni-body" style="text-align: center;"><text v-if="userType==0">采购价:{{item.realPrice?item.realPrice:'暂无'}}</text> 总数量:{{item.productCount?item.productCount:'暂无'}} <text v-if="userType==0">总价:{{item.shouldPay?item.shouldPay:'暂无'}}</text></view>
<view style="margin: 5px 0;height: 1px;background: #eee;"></view>
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
@ -34,7 +34,8 @@
pages: 1,
pageNum: 1,
userId:'',
type:''
type:'',
userType:''
}
},
filters: {
@ -51,6 +52,7 @@
},
onLoad(option) {
this.userId = option.id
this.userType = uni.getStorageSync('type')
this.type = option.type
this.getList()
},

6
pages/index/dataStatistics.vue

@ -14,7 +14,7 @@
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="type==0?shopInfo.totalProfit:0" :decimals="2"></u-count-to>
<view class="grid-text">今日利润</view>
<view class="grid-text">利润</view>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="shopInfo.totalCCount"></u-count-to>
@ -50,13 +50,15 @@
return {
range:[],
shopInfo:{},
priceList:[]
priceList:[],
type:''
};
},
onShow(){
this.getMonth();
this.getSaleInfo();
this.getList();
this.type = uni.getStorageSync('type')
},
methods: {
getSaleInfo() {

14
pages/index/downStearmList.vue

@ -703,10 +703,13 @@
}
.bottom-box {
width: 100%;
position: fixed;
bottom: 0;
display: flex;
width: 100%;
height: 120rpx;
position: fixed;
bottom: 0;
display: flex;
background: #fff;
z-index: 99;
}
.bottom-left {
@ -774,7 +777,8 @@
.content-right {
width: 100%;
overflow-y: scroll;
overflow-y: scroll;
margin-bottom: 150rpx;
}
.right-box {

6
pages/index/index.vue

@ -61,7 +61,7 @@
</u-grid-item>
</u-grid>
</view>
<view class="contentPadding" v-if="type == 0">
<view class="contentPadding">
<view class="title">
<i class="iconfont icon-huaban"> 本周营收统计
<view class="btn" @tap="gotoSearchData">
@ -106,14 +106,14 @@
<u-cell icon="grid-fill" url="/pages/index/checkShop" title="切换当前店铺" clickable isLink
arrow-direction="left"></u-cell>
<view class="border-line"></view>
<u-cell icon="man-add-fill" url="/pages/index/peopleList?popleType=gysName" v-if="type==0" title="供货商管理"
<u-cell icon="man-add-fill" url="/pages/index/peopleList?popleType=gysName" title="供货商管理"
clickable isLink arrow-direction="left"></u-cell>
<u-cell icon="man-add-fill" url="/pages/index/upstream" v-if="type==0" title="供货商欠款"
clickable isLink arrow-direction="left"></u-cell>
<u-cell icon="man-add-fill" url="/pages/index/waitStorage?inStorageStatus=1" title="采购单历史" clickable isLink
arrow-direction="left"></u-cell>
<view class="border-line"></view>
<u-cell icon="account-fill" url="/pages/index/peopleList?popleType=khName" v-if="type==0" title="客户管理"
<u-cell icon="account-fill" url="/pages/index/peopleList?popleType=khName" title="客户管理"
clickable isLink arrow-direction="left"></u-cell>
<u-cell icon="account-fill" url="/pages/index/downstream" v-if="type==0" title="客户欠款"
clickable isLink arrow-direction="left"></u-cell>

54
pages/index/orderDetail.vue

@ -76,7 +76,7 @@
<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;">{{ sales.remark == null ?'暂无':sales.remark}}</view>
<view style="font-size: 13px;width: 200px;height: 40rpx;overflow: hidden;">{{ sales.remark == null ?'':sales.remark}}</view>
</uni-tooltip>
</view>
</view>
@ -543,6 +543,9 @@
'-' + that.list[i].stockLogList1[z]
.attributeList)
}else{
that.list[i].stockLogList1[z].maxNum = that.list[i].stockLogList1[z]
.productCount
}
}
}
@ -560,7 +563,8 @@
} else {
this.tui.toast(res.message)
}
})
})
console.log('刷新',that.list)
},
checkBoxChange() {
if (this.radio1 == 2) {
@ -582,26 +586,38 @@
if(this.$refs.returnClose.val == ''){
this.tui.toast("金额不能为空")
return
}
this.list.forEach(item1 => {
item1.stockLogList1.forEach((item2, index) => {
if (item2.returnCount) {
item2.productCount = item2.returnCount
} else {
item1.stockLogList1.splice(index, 1)
}
})
})
}
for (var i = 0; i < this.list.length; i++) {
this.list[i].stockLogList = []
}
for (var i = 0; i < this.list.length; i++) {
for (var m = 0; m < this.list[i].stockLogList1.length; m++) {
if(this.list[i].stockLogList1[m].returnCount && this.list[i].stockLogList1[m].returnCount > 0){
this.list[i].stockLogList.push(this.list[i].stockLogList1[m])
}
}
}
console.log(this.list)
for (var i = 0; i < this.list.length; i++) {
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
for (var m = 0; m < this.list[i].stockLogList.length; m++) {
this.list[i].stockLogList[m].productCount = this.list[i].stockLogList[m].returnCount
if(this.list[i].stockLogList.length >0){
if (m == 0) {
this.list[i].productCount = this.list[i].stockLogList[m].productCount
} else {
this.list[i].productCount += this.list[i].stockLogList[m].productCount
}
}
}
this.list[i].stockLogList1 = this.list[i].stockLogList
console.log('长度',this.list[i].stockLogList1.length)
if(this.list[i].stockLogList1.length <= 0){
this.list[i].productCount = 0
}
}
}
console.log(this.list)
this.sales.saleId = this.sales.id;
this.sales.province = ''
this.sales.city = ''

29
pages/index/peopleList.vue

@ -18,16 +18,16 @@
</view>
<view class="name-tel" style="width: 100%;" v-else>
<text style="line-height: 75rpx;">{{item.name}}</text>
<text>{{item.phone}}</text>
<text v-if="item.name != '散客'">{{item.phone}}</text>
</view>
<view class="name-tel" style="width: 100%;display: flex;flex-direction: column;height:auto;font-size: 30rpx;">
<text>{{item.province + item.city + item.area}}</text>
<text style="font-size: 26rpx;color:#747474;height: 30rpx;line-height: 30rpx;">{{item.address}}</text>
<text>{{item.name == '散客'?'-':item.province + item.city + item.area}}</text>
<text style="font-size: 26rpx;color:#747474;height: 30rpx;line-height: 30rpx;">{{item.name == '散客'?'-':item.address}}</text>
</view>
<view class="name-edit" @tap.stop="goAddPeople('edit',item)" style="top: 25rpx;">
<view v-if="item.name != '散客'" class="name-edit" @tap.stop="goAddPeople('edit',item)" style="top: 25rpx;">
编辑
</view>
<view class="name-edit" @tap.stop="goDetail(item)" style="background: #FF9797;bottom:25rpx">
<view v-if="item.name != '散客'" class="name-edit" @tap.stop="goDetail(item)" style="background: #FF9797;bottom:25rpx">
查看明细
</view>
</view>
@ -40,7 +40,7 @@
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text>
</view>
<view class="standard-box" @tap.stop="toggle('center',item.shippingMethodId)">
<view class="standard-box" @tap.stop="toggle('center',item)">
<view class="">
<text style="padding-left:40rpx;">线路查询</text>
<uni-icons type="info" color='#088FEB' size="16" style="line-height: 75rpx;"></uni-icons>
@ -61,9 +61,9 @@
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text>
</view>
<view class="standard-box" @tap.stop="toggle('center',item.shippingMethodId)">
<view class="standard-box" @tap.stop="toggle('center',item)">
<view class="">
<text style="padding-left:40rpx;">收费标准</text>
<text style="padding-left:40rpx;">线路查询</text>
<uni-icons type="info" color='#088FEB' size="16" style="line-height: 75rpx;"></uni-icons>
</view>
<view class="phone-btn" @tap.stop="clickPhone(item.mobile)" v-if="popleType != 'kdName'">拨打电话</view>
@ -81,7 +81,7 @@
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text>
</view>
<view class="standard-box" @tap.stop="toggle('center',item.shippingMethodId)">
<view class="standard-box" @tap.stop="toggle('center',item)">
<view class="">
<text style="padding-left:40rpx;">收费标准</text>
<uni-icons type="info" color='#088FEB' size="16" style="line-height: 75rpx;"></uni-icons>
@ -268,7 +268,10 @@
//查询拉包工和快递人员的列表
kdyOrlbgList() {
this.tui.request("/worker/getWXByCondition", "post", {
ownerCompany: this.companyType, //公司id,如果是快递公司,才需要传
ownerCompany: this.companyType, //公司id,如果是快递公司,才需要传
searchStr:this.searchName,
pageNum: 1,
pageSize: 10
}, false, false).then((res) => {
if (res.code == 200) {
this.popleList = res.result;
@ -291,10 +294,10 @@
})
},
//打开弹出层
toggle(type,id) {
uni.setStorageSync("transCompany", id)
toggle(type,item) {
uni.setStorageSync("transCompany", item.shippingMethodId || item.id)
uni.navigateTo({
url: "/package1/other/logisticsAddress"
url: "/package1/other/logisticsAddress?type=kaidan"
})
},
//关闭弹出层

2
pages/index/shareStyle.vue

@ -24,7 +24,7 @@
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price" v-if="item.wholesalePrice">
<view class="price-box" v-if="type==0">
<text>{{item.purchasePrice}}</text>
<text>{{item.purchasePrice?item.purchasePrice:'暂无'}}</text>
<text>采购价</text>
</view>
<view class="price-box">

75
pages/inventory/gategory.vue

@ -28,20 +28,29 @@
</uni-popup>
<!-- 查看商品库存弹出层 -->
<uni-popup ref="carPopup" background-color="#fff">
<view class="popup-content">
<view class="popup-content" style="height:auto !important;">
<view style="font-size: 36rpx;font-weight: bold;text-align: center;">提示</view>
<view v-if="goodsList !=''"
style="width:100%;font-weight:bold;text-align: center;font-size: 28rpx;margin: 20rpx 0;">
{{goodsList[0].productName}}商品有以下库存,确认继续删除吗?</view>
<view v-for="(item,index) in goodsList" :key="index" style="position: relative;">
<view style="padding-bottom: 100rpx;">
<view class="checkList">
<view class="checkList-box">
{{item.attributeList | sliceMsg}} {{item.stockCount}}
{{goodsList[0].productName}}商品有以下库存,确认继续删除吗?
</view>
<view class="tui-order-item boxbg">
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
<view style="width: 29%;text-align: center;">数量</view>
</view>
<view class="shop-box" v-for="(item,index) in goodsList" :key="index" style="position: relative;">
<view style='height: 50rpx;line-height: 50rpx;'>
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;float: left;height: 50rpx;overflow: hidden;">
{{item.attributeList | sliceMsg}}
</view>
<view style="width: 29%;text-align: center;float: left;">
{{item.stockCount}}
</view>
</view>
</view>
</view>
<!-- <u-loadmore :status="status" /> -->
<view class="popup-bottom">
<view class="popup-bottom-left">
<view class="bottom-btn" @tap="this.$refs.carPopup.close()"
@ -75,6 +84,18 @@
},
computed: {
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
}
},
onShow() {
this.getGategoryList()
@ -111,7 +132,7 @@
},
//查询分类下有没有库存
getTypeToNum(id) {
getTypeToNum(id) {
let that = this;
this.tui.request("/app/stock/getlistByAttributeList", "post", {
categoryId: id,
@ -120,25 +141,25 @@
if (res.result != '') {
this.goodsList = res.result
this.$refs.carPopup.open('bottom')
} else {
this.tui.request("/app/productAttribute/selectByCategoryId", "POST", {
categoryId: this.delItems.id
}, false, true).then((res1) => {
if (res1.code == 200) {
if(res1.result.length > 0){
uni.showModal({
title: "提示",
content: "此分类已经维护了子分类,确定继续删除吗?",
success: function(res2) {
if (res2.confirm) {
that.delItemModal()
}
}
})
}else{
that.show = true
}
}
} else {
this.tui.request("/app/productAttribute/selectByCategoryId", "POST", {
categoryId: this.delItems.id
}, false, true).then((res1) => {
if (res1.code == 200) {
if (res1.result.length > 0) {
uni.showModal({
title: "提示",
content: "此分类已经维护了子分类,确定继续删除吗?",
success: function(res2) {
if (res2.confirm) {
that.delItemModal()
}
}
})
} else {
that.show = true
}
}
}).catch((res) => {})
}
}

163
pages/inventory/gategoryLow.vue

@ -31,6 +31,42 @@
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称"
cancelText="删除" @confirm="dialogInputConfirm" @close="dialogDel">
</uni-popup-dialog>
</uni-popup>
<!-- 查看商品库存弹出层 -->
<uni-popup ref="carPopup" background-color="#fff">
<view class="popup-content" style="height:auto !important;">
<view style="font-size: 36rpx;font-weight: bold;text-align: center;">提示</view>
<view v-if="goodsList !=''"
style="width:100%;font-weight:bold;text-align: center;font-size: 28rpx;margin: 20rpx 0;">
{{goodsList[0].productName}}商品有以下库存,确认继续删除吗?
</view>
<view class="tui-order-item boxbg">
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
<view style="width: 29%;text-align: center;">数量</view>
</view>
<view class="shop-box" v-for="(item,index) in goodsList" :key="index" style="position: relative;">
<view style='height: 50rpx;line-height: 50rpx;'>
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;float: left;height: 50rpx;overflow: hidden;">
{{item.attributeList | sliceMsg}}
</view>
<view style="width: 29%;text-align: center;float: left;">
{{item.stockCount}}
</view>
</view>
</view>
</view>
<!-- <u-loadmore :status="status" /> -->
<view class="popup-bottom">
<view class="popup-bottom-left">
<view class="bottom-btn" @tap="this.$refs.carPopup.close()"
style="background: linear-gradient(90deg, #FF9797, #FFC1E0);">再想想</view>
</view>
<view class="popup-bottom-right">
<view class="bottom-btn" @tap="this.show = true">确认删除</view>
</view>
</view>
</view>
</uni-popup>
</view>
@ -52,12 +88,25 @@
delType: '',
showList: {},
dialogTit: '输入分类名',
categoryId:'',
categoryId:'',
goodsList:[]
// type: 'center',
}
},
computed: {
},
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(options) {
this.categoryId = options.id
@ -96,6 +145,42 @@
this.tui.toast(res.message)
}
}).catch((res) => {})
},
//查询分类下有没有库存
getTypeToNum() {
let that = this;
this.tui.request("/app/stock/getlistByAttributeList", "post", {
categoryId: this.categoryId,
attributeList:this.delItems.attributeName || this.delItems.value,
}, false, true).then((res) => {
if (res.code == 200) {
if (res.result != '') {
this.goodsList = res.result
this.$refs.carPopup.open('bottom')
} else {
that.show = true
// this.tui.request("/app/productAttribute/selectByCategoryId", "POST", {
// categoryId: this.delItems.id
// }, false, true).then((res1) => {
// if (res1.code == 200) {
// if (res1.result.length > 0) {
// uni.showModal({
// title: "提示",
// content: "此分类已经维护了子分类,确定继续删除吗?",
// success: function(res2) {
// if (res2.confirm) {
// that.delItemModal()
// }
// }
// })
// } else {
// that.show = true
// }
// }
// }).catch((res) => {})
}
}
}).catch((res) => {})
},
// 获取属性名
getProductAttribute() {
@ -305,7 +390,8 @@
uni.showToast({
title: "删除成功",
icon: 'none'
})
})
this.$refs.carPopup.close()
} else {
uni.showToast({
title: "删除失败",
@ -325,7 +411,8 @@
uni.showToast({
title: "删除成功",
icon: 'none'
})
})
this.$refs.carPopup.close()
} else {
uni.showToast({
title: "删除失败",
@ -345,7 +432,8 @@
uni.showToast({
title: "删除成功",
icon: 'none'
})
})
this.$refs.carPopup.close()
} else {
uni.showToast({
title: "删除失败",
@ -357,8 +445,9 @@
},
delItem(item, type) {
this.delType = type;
this.delItems = item;
this.show = true;
this.delItems = item;
this.getTypeToNum()
// this.show = true;
},
}
}
@ -428,5 +517,67 @@
.content-low:hover {
background: #eee;
}
.popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
margin-bottom: 30rpx;
overflow: scroll;
}
.popup-container {
width: 100%;
background: #fff;
height: 50rpx;
}
.checkList {
display: flex;
height: 50rpx;
font-size: 28rpx;
line-height: 50rpx;
margin: 20rpx 0;
}
.checkList-box {
height: 50rpx;
width: 60%;
}
.popup-bottom {
width: 95%;
height: 100rpx;
position: fixed;
bottom: 0;
left: 2.5%;
display: flex;
z-index: 99;
background: #fff;
}
.popup-bottom-left {
width: 50%;
line-height: 80rpx;
}
.popup-bottom-right {
width: 50%;
line-height: 100rpx;
}
.bottom-btn {
width: 70%;
line-height: 35px;
height: 70rpx;
text-align: center;
/* margin-top: 10rpx; */
color: #fff;
font-size: 28rpx;
margin: 0 auto;
background: linear-gradient(90deg, #60F3FF, #088FEB);
border-radius: 70rpx;
}
</style>

6
pages/inventory/getProductIdToList.vue

@ -24,7 +24,7 @@
<view class="shop-box" v-for="(item,index3) in list" :key="index3" v-else>
<uni-card :title="'供应商:'+ (item.purchase.supplierName?item.purchase.supplierName:'暂无')"
:sub-title="item.purchase.createTime?item.purchase.createTime:'暂无'" >
<view class="uni-body" style="text-align: center;">采购价:{{item.purchaseDetails[0].purchasePrice?item.purchaseDetails[0].purchasePrice:'暂无'}} 总数量:{{item.purchase.totalAmount?item.purchase.totalAmount:'暂无'}} 总价:{{item.purchase.shouldPay?item.purchase.shouldPay:'暂无'}}</view>
<view class="uni-body" style="text-align: center;"><text v-if="userType==0">采购价:{{item.purchaseDetails[0].purchasePrice?item.purchaseDetails[0].purchasePrice:'暂无'}}</text> 总数量:{{item.purchase.totalAmount?item.purchase.totalAmount:'暂无'}} <text v-if="userType==0">总价:{{item.purchase.shouldPay?item.purchase.shouldPay:'暂无'}}</text></view>
<view style="margin: 5px 0;height: 1px;background: #eee;"></view>
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
@ -56,7 +56,8 @@
pages: 1,
pageNum: 1,
productId:'',
type:''
type:'',
userType:''
}
},
filters: {
@ -73,6 +74,7 @@
},
onLoad(option) {
this.productId = option.id
this.userType = uni.getStorageSync('type')
this.type = option.type
this.getWaitStorage()
},

Loading…
Cancel
Save