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>
<view class="shop-list" v-for="(items,index1) in item.saleDetailDTOList" :key="index1"> <view class="shop-list" v-for="(items,index1) in item.saleDetailDTOList" :key="index1">
<view class="order-name"> <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=""> <img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6b5ab32ff93a4c51b90e562e0b22e850.png" @tap.stop="largeImg(items.productPicture)" alt="">
</view> </view>
<view class="specs-name" v-for="(itemss,index2) in items.stockLogList1" :key="index2"> <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"> <view class="shop-box" v-for="(item,index3) in list" :key="index3">
<uni-card :title="item.productName?item.productName:'暂无'" <uni-card :title="item.productName?item.productName:'暂无'"
:sub-title="item.createTime?item.createTime:'暂无'" > :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="margin: 5px 0;height: 1px;background: #eee;"></view>
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;"> <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: 70%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
@ -34,7 +34,8 @@
pages: 1, pages: 1,
pageNum: 1, pageNum: 1,
userId:'', userId:'',
type:'' type:'',
userType:''
} }
}, },
filters: { filters: {
@ -51,6 +52,7 @@
}, },
onLoad(option) { onLoad(option) {
this.userId = option.id this.userId = option.id
this.userType = uni.getStorageSync('type')
this.type = option.type this.type = option.type
this.getList() this.getList()
}, },

6
pages/index/dataStatistics.vue

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

14
pages/index/downStearmList.vue

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

6
pages/index/index.vue

@ -61,7 +61,7 @@
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
<view class="contentPadding" v-if="type == 0"> <view class="contentPadding">
<view class="title"> <view class="title">
<i class="iconfont icon-huaban"> 本周营收统计 <i class="iconfont icon-huaban"> 本周营收统计
<view class="btn" @tap="gotoSearchData"> <view class="btn" @tap="gotoSearchData">
@ -106,14 +106,14 @@
<u-cell icon="grid-fill" url="/pages/index/checkShop" title="切换当前店铺" clickable isLink <u-cell icon="grid-fill" url="/pages/index/checkShop" title="切换当前店铺" clickable isLink
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
<view class="border-line"></view> <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> clickable isLink arrow-direction="left"></u-cell>
<u-cell icon="man-add-fill" url="/pages/index/upstream" v-if="type==0" title="供货商欠款" <u-cell icon="man-add-fill" url="/pages/index/upstream" v-if="type==0" title="供货商欠款"
clickable isLink arrow-direction="left"></u-cell> clickable isLink arrow-direction="left"></u-cell>
<u-cell icon="man-add-fill" url="/pages/index/waitStorage?inStorageStatus=1" title="采购单历史" clickable isLink <u-cell icon="man-add-fill" url="/pages/index/waitStorage?inStorageStatus=1" title="采购单历史" clickable isLink
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
<view class="border-line"></view> <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> clickable isLink arrow-direction="left"></u-cell>
<u-cell icon="account-fill" url="/pages/index/downstream" v-if="type==0" title="客户欠款" <u-cell icon="account-fill" url="/pages/index/downstream" v-if="type==0" title="客户欠款"
clickable isLink arrow-direction="left"></u-cell> 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-flex-shrink">备注</view>
<view class="tui-goods-price"> <view class="tui-goods-price">
<uni-tooltip :content="sales.remark == null ?'暂无':sales.remark" placement="left"> <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> </uni-tooltip>
</view> </view>
</view> </view>
@ -543,6 +543,9 @@
'-' + that.list[i].stockLogList1[z] '-' + that.list[i].stockLogList1[z]
.attributeList) .attributeList)
}else{
that.list[i].stockLogList1[z].maxNum = that.list[i].stockLogList1[z]
.productCount
} }
} }
} }
@ -560,7 +563,8 @@
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }
}) })
console.log('刷新',that.list)
}, },
checkBoxChange() { checkBoxChange() {
if (this.radio1 == 2) { if (this.radio1 == 2) {
@ -582,26 +586,38 @@
if(this.$refs.returnClose.val == ''){ if(this.$refs.returnClose.val == ''){
this.tui.toast("金额不能为空") this.tui.toast("金额不能为空")
return return
} }
this.list.forEach(item1 => {
item1.stockLogList1.forEach((item2, index) => { for (var i = 0; i < this.list.length; i++) {
if (item2.returnCount) { this.list[i].stockLogList = []
item2.productCount = item2.returnCount }
} else { for (var i = 0; i < this.list.length; i++) {
item1.stockLogList1.splice(index, 1) 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 i = 0; i < this.list.length; i++) {
for (var m = 0; m < this.list[i].stockLogList1.length; m++) { for (var m = 0; m < this.list[i].stockLogList.length; m++) {
if (m == 0) { this.list[i].stockLogList[m].productCount = this.list[i].stockLogList[m].returnCount
this.list[i].productCount = this.list[i].stockLogList1[m].productCount if(this.list[i].stockLogList.length >0){
} else { if (m == 0) {
this.list[i].productCount += this.list[i].stockLogList1[m].productCount 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.saleId = this.sales.id;
this.sales.province = '' this.sales.province = ''
this.sales.city = '' this.sales.city = ''

29
pages/index/peopleList.vue

@ -18,16 +18,16 @@
</view> </view>
<view class="name-tel" style="width: 100%;" v-else> <view class="name-tel" style="width: 100%;" v-else>
<text style="line-height: 75rpx;">{{item.name}}</text> <text style="line-height: 75rpx;">{{item.name}}</text>
<text>{{item.phone}}</text> <text v-if="item.name != '散客'">{{item.phone}}</text>
</view> </view>
<view class="name-tel" style="width: 100%;display: flex;flex-direction: column;height:auto;font-size: 30rpx;"> <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>{{item.name == '散客'?'-':item.province + item.city + item.area}}</text>
<text style="font-size: 26rpx;color:#747474;height: 30rpx;line-height: 30rpx;">{{item.address}}</text> <text style="font-size: 26rpx;color:#747474;height: 30rpx;line-height: 30rpx;">{{item.name == '散客'?'-':item.address}}</text>
</view> </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>
<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>
</view> </view>
@ -40,7 +40,7 @@
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text> <text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text> <text style="line-height: 75rpx;">{{item.workerName}}</text>
</view> </view>
<view class="standard-box" @tap.stop="toggle('center',item.shippingMethodId)"> <view class="standard-box" @tap.stop="toggle('center',item)">
<view class=""> <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> <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.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text> <text style="line-height: 75rpx;">{{item.workerName}}</text>
</view> </view>
<view class="standard-box" @tap.stop="toggle('center',item.shippingMethodId)"> <view class="standard-box" @tap.stop="toggle('center',item)">
<view class=""> <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> <uni-icons type="info" color='#088FEB' size="16" style="line-height: 75rpx;"></uni-icons>
</view> </view>
<view class="phone-btn" @tap.stop="clickPhone(item.mobile)" v-if="popleType != 'kdName'">拨打电话</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.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text> <text style="line-height: 75rpx;">{{item.workerName}}</text>
</view> </view>
<view class="standard-box" @tap.stop="toggle('center',item.shippingMethodId)"> <view class="standard-box" @tap.stop="toggle('center',item)">
<view class=""> <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> <uni-icons type="info" color='#088FEB' size="16" style="line-height: 75rpx;"></uni-icons>
@ -268,7 +268,10 @@
//查询拉包工和快递人员的列表 //查询拉包工和快递人员的列表
kdyOrlbgList() { kdyOrlbgList() {
this.tui.request("/worker/getWXByCondition", "post", { 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) => { }, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.popleList = res.result; this.popleList = res.result;
@ -291,10 +294,10 @@
}) })
}, },
//打开弹出层 //打开弹出层
toggle(type,id) { toggle(type,item) {
uni.setStorageSync("transCompany", id) uni.setStorageSync("transCompany", item.shippingMethodId || item.id)
uni.navigateTo({ 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-num">{{item.productSn}}</view>
<view class="box-right-price" v-if="item.wholesalePrice"> <view class="box-right-price" v-if="item.wholesalePrice">
<view class="price-box" v-if="type==0"> <view class="price-box" v-if="type==0">
<text>{{item.purchasePrice}}</text> <text>{{item.purchasePrice?item.purchasePrice:'暂无'}}</text>
<text>采购价</text> <text>采购价</text>
</view> </view>
<view class="price-box"> <view class="price-box">

75
pages/inventory/gategory.vue

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

163
pages/inventory/gategoryLow.vue

@ -31,6 +31,42 @@
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称" <uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称"
cancelText="删除" @confirm="dialogInputConfirm" @close="dialogDel"> cancelText="删除" @confirm="dialogInputConfirm" @close="dialogDel">
</uni-popup-dialog> </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> </uni-popup>
</view> </view>
@ -52,12 +88,25 @@
delType: '', delType: '',
showList: {}, showList: {},
dialogTit: '输入分类名', dialogTit: '输入分类名',
categoryId:'', categoryId:'',
goodsList:[]
// type: 'center', // type: 'center',
} }
}, },
computed: { 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) { onLoad(options) {
this.categoryId = options.id this.categoryId = options.id
@ -96,6 +145,42 @@
this.tui.toast(res.message) this.tui.toast(res.message)
} }
}).catch((res) => {}) }).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() { getProductAttribute() {
@ -305,7 +390,8 @@
uni.showToast({ uni.showToast({
title: "删除成功", title: "删除成功",
icon: 'none' icon: 'none'
}) })
this.$refs.carPopup.close()
} else { } else {
uni.showToast({ uni.showToast({
title: "删除失败", title: "删除失败",
@ -325,7 +411,8 @@
uni.showToast({ uni.showToast({
title: "删除成功", title: "删除成功",
icon: 'none' icon: 'none'
}) })
this.$refs.carPopup.close()
} else { } else {
uni.showToast({ uni.showToast({
title: "删除失败", title: "删除失败",
@ -345,7 +432,8 @@
uni.showToast({ uni.showToast({
title: "删除成功", title: "删除成功",
icon: 'none' icon: 'none'
}) })
this.$refs.carPopup.close()
} else { } else {
uni.showToast({ uni.showToast({
title: "删除失败", title: "删除失败",
@ -357,8 +445,9 @@
}, },
delItem(item, type) { delItem(item, type) {
this.delType = type; this.delType = type;
this.delItems = item; this.delItems = item;
this.show = true; this.getTypeToNum()
// this.show = true;
}, },
} }
} }
@ -428,5 +517,67 @@
.content-low:hover { .content-low:hover {
background: #eee; 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> </style>

6
pages/inventory/getProductIdToList.vue

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

Loading…
Cancel
Save