Browse Source

新增了客户分类及修改了一些bug

master
wangfukang 2 years ago
parent
commit
5965fbec9f
  1. 48
      package1/AI/AIHangOrderList.vue
  2. 89
      package1/AI/AiChangeGoods.vue
  3. 2525
      package1/AI/voiceInventory.vue
  4. 52
      package1/index/order.vue
  5. 14
      package1/index/orderDetail.vue
  6. 2
      package1/index/peopleList.vue
  7. 82
      package1/inventory/addGoods.vue
  8. 95
      package1/inventory/inventoryConfirm.vue
  9. 87
      package1/stock/addStock.vue

48
package1/AI/AIHangOrderList.vue

@ -909,7 +909,26 @@
}
}
return name;
},
},
//把unitPrice变成折前价,用于去开单的时候切换折扣
getUnitPrice(item,items){
if(item.discount != 10){
if(item.discount == null || item.discount == 0 || item.discount ==undefined){
return items.discountAmount
}else{
return ((items.discountAmount * 10000) / (item.discount * 100) / 10).toFixed(2)
}
}else if(items.discount!= 10){
if(items.discount == null || items.discount == 0 || items.discount ==undefined){
return items.discountAmount
}else{
return ((items.discountAmount * 10000) / (items.discount * 100) / 10).toFixed(2)
}
}else{
return items.discountAmount || items.wholesalePrice
}
},
//带参数跳转到开单页
goSaleGoods(item) {
let dataList = []
@ -919,10 +938,10 @@
this.returnList.forEach(function(value, key) {
item.saleDetailDTOList.push(value)
})
item.discount = item.discount==null?10:item.discount
if (item.saleDetailDTOList.length>0) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
let obj = {}
let attrMap = new Map()
let newSaleDetailDTOList = []
@ -944,14 +963,16 @@
}
obj.attrId = item.saleDetailDTOList[i].attrId
obj.saleDetailQueryDTO = newSaleDetailDTOList
obj.num = 0
obj.num = 0
obj.buyCount = item.saleDetailDTOList[i].buyCount
obj.customerCategoryRule = item.saleDetailDTOList[i].customerCategoryRule != null ?JSON.parse(item.saleDetailDTOList[i].customerCategoryRule):null
obj.discount = item.saleDetailDTOList[i].discount
obj.id = item.saleDetailDTOList[i].productId
obj.price = item.saleDetailDTOList[i].price
obj.lsprice = item.saleDetailDTOList[i].price
obj.categoryId = item.saleDetailDTOList[i].categoryId
obj.zPrice = item.saleDetailDTOList[i].discountAmount
obj.unitPrice = item.saleDetailDTOList[i].discountAmount || item.saleDetailDTOList[i]
.wholesalePrice
obj.unitPrice = this.getUnitPrice(item,item.saleDetailDTOList[i])
obj.discountAmount = item.saleDetailDTOList[i].discountAmount
obj.productName = item.saleDetailDTOList[i].productName
obj.productPicture = item.saleDetailDTOList[i].productPicture + '?time=' + new Date().getTime()
@ -975,18 +996,17 @@
dataList.push(obj)
}
setTimeout(res11=>{
this.tui.request("/app/customer/list", "post", {
notBuyDays: "",
pageNum: 1,
pageSize: 10,
searchStr: item.userName,
sort: "",
}, false, false).then((res) => {
this.tui.request("/app/debt/selectByUserId", "post", {
shopId:uni.getStorageSync('shopId'),
userId:item.userId
}, false, true).then((res) => {
if (res.code == 200) {
this.returnList = new Map()
console.log('dataList',dataList)
uni.setStorageSync('khName', JSON.stringify(res.result.records[0]))
res.result.name = res.result.userName
uni.setStorageSync('khName', JSON.stringify(res.result))
uni.setStorageSync('carList1', JSON.stringify(dataList))
uni.setStorageSync('discountAll', item.discount != null ?item.discount:10)
uni.setStorageSync('hangOrder', true)
uni.switchTab({
url: '/pages/inventory/goodsList1'

89
package1/AI/AiChangeGoods.vue

@ -45,9 +45,12 @@
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box">
<text>{{item.stockCount}}</text>
<text>库存</text>
<view class="price-box" @tap.stop="seeStockCount(item.stockCount,item.minusStockCount)">
<text>{{item.stockCount + item.minusStockCount}}</text>
<view>
库存
<uni-icons type="help" size="15"></uni-icons>
</view>
</view>
</view>
</view>
@ -61,7 +64,7 @@
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">{{item.productName}}</view>
<view class="box-right-name">{{item.productName == null ?'':item.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price">
<view class="price-box">
@ -76,15 +79,52 @@
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box">
<text>{{item.stockCount}}</text>
<text>库存</text>
<view class="price-box" @tap.stop="seeStockCount(item.stockCount,item.minusStockCount)">
<text>{{item.stockCount + item.minusStockCount}}</text>
<view>
库存
<uni-icons type="help" size="15"></uni-icons>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 显示正负库存弹窗 -->
<uni-popup ref="showPopup" background-color="#fff">
<view class="popup-pay-content" style="width: 550rpx;">
<view class="popup-pay-title">
<text>库存数</text>
</view>
<view style="width: 100%;height: 150rpx;">
<view
style="width: 200rpx;height: 130rpx;border: 3px solid #FFE4C4;border-radius: 10px;margin-top: 20rpx;padding-top: 10px;display: flex;flex-direction: column;text-align: center;float: left;margin-left: 20rpx;">
<text style="font-weight: bold;">
正数库存
</text>
<text style="font-size: 30rpx;color: #000;font-weight: bold;">
{{zheng}}
</text>
</view>
<view
style="width: 200rpx;height: 130rpx;border: 3px solid #FFE4C4;border-radius: 10px;margin-top: 20rpx;padding-top: 10px;display: flex;flex-direction: column;text-align: center;float: left;margin-left: 40rpx;">
<text style="font-weight: bold;">
负数库存
</text>
<text style="font-size: 30rpx;color: #000;font-weight: bold;">
{{fu}}
</text>
</view>
</view>
<view class="popup-pay-container" style="display: flex;margin-top: 50rpx;background: #89CFF0;">
<view @tap='$refs.showPopup.close()'
style="flex:1;text-align: center;border-right: 1px solid #eee;background: #088FEB;font-size:32rpx;">
确认
</view>
</view>
</view>
</uni-popup>
</view>
</template>
@ -95,7 +135,9 @@
return {
indexList: [],
pageNum: 1, //分页的页码
shopList: [],
shopList: [],
zheng:'',
fu:'',
shopList1: [],
categoryId: '', //分类id
searchName: '', //搜索框输入值
@ -110,6 +152,11 @@
this.getGategoryList()
},
methods: {
seeStockCount(zheng,fu){
this.zheng = zheng;
this.fu = fu;
this.$refs.showPopup.open()
},
//初始化获取分类列表
getGategoryList() {
this.tui.request("/app/productCategory/list", "get", {
@ -382,4 +429,30 @@
color: #777;
background: #eee;
}
.popup-pay-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
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;
border-radius: 10px;
background: #088FEB;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
color: #fff;
}
</style>

2525
package1/AI/voiceInventory.vue

File diff suppressed because it is too large

52
package1/index/order.vue

@ -37,7 +37,7 @@
<checkbox-group @change="checkboxChange">
<label class="uni-list-cell uni-list-cell-pd" >
<checkbox v-if="btnStatus==false" :value="item" style="float: left;width: 60rpx;line-height: 300rpx;margin: 0 20rpx;" />
<view :style="{width:btnStatus==false?'95%':'100%'}" @tap="gotoDetail(item.id)">
<view :style="{width:btnStatus==false?'95%':'100%'}" @tap="gotoDetail(item.id,item.userId)">
<uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'数量:'+(item.productCount == null ?'暂无':item.productCount)">
<view class="uni-body" style="font-weight: bold;font-size: 30rpx;">
<text class="cardText" style="font-size: 30rpx;">单号:</text>
@ -59,7 +59,7 @@
<view class="uni-body"> <text class="cardText">
订单状态:</text>{{item.status == '0' ?'待抢单' :item.status == '2' ?'作废' :item.status == '1' ?'待取货' :item.status == '3' ?'待送达' :item.status == '4' ?'已完成' :item.status == '5' ?'下游客户待退货' :item.status == '00' ?'退货待抢单' :item.status == '01' ?'退货待取货' :item.status == '03' ?'退货待送达' :item.status == '04' ?'待确认退货' :item.status == '6' ?'待配货':item.status == '8' ?'待物流上门':item.status == '9' ?'已完成' :'挂单'}}
</view>
<view class="floatRight" v-if="item.status == 6" @tap.stop="goSaleGoods(item)">去开单</view>
<view class="floatRight" v-if="item.status == 6" @tap.stop="goSaleGoods(item,'')">去开单</view>
<view class="floatRight" v-if="item.status == 4" @tap.stop="cancelOrder(item,'',index)">撤销</view>
<view class="floatRight" v-if="item.status == 4" @tap.stop="cancelOrder(item,'goPay')">撤销并复制</view>
<view class="floatRight" v-if="item.status == 2" @tap.stop="goSaleGoods(item)">重新开单</view>
@ -124,11 +124,11 @@
},
methods: {
gotoDetail(id) {
gotoDetail(id,userId) {
// this.page = 1
uni.setStorageSync('noReload',true)
uni.navigateTo({
url: '/package1/index/orderDetail?id=' + id
url: '/package1/index/orderDetail?id=' + id +'&userId='+userId
})
},
searchList(res) {
@ -252,7 +252,7 @@
}, true, true).then((res1) => {
if (res1.code == 200) {
if (type == 'goPay') {
that.goSaleGoods(item)
that.goSaleGoods(item,'cancel')
} else {
that.inventoryList[index].status = 2
that.$forceUpdate()
@ -263,15 +263,33 @@
}
}).catch((res1) => {})
},
getUnitPrice(item,items){
if(item.discount != 10){
if(item.discount == null || item.discount == 0 || item.discount ==undefined){
return items.discountAmount
}else{
return ((items.discountAmount * 10000) / (item.discount * 100) / 10).toFixed(2)
}
}else if(items.discount!= 10){
if(items.discount == null || items.discount == 0 || items.discount ==undefined){
return items.discountAmount
}else{
return ((items.discountAmount * 10000) / (items.discount * 100) / 10).toFixed(2)
}
}else{
return items.discountAmount || items.wholesalePrice
}
},
//带参数跳转到开单页
goSaleGoods(item) {
goSaleGoods(item,type) {
let dataList = []
if(!item.saleDetailDTOList){
item.saleDetailDTOList = []
}
this.returnList.forEach(function(value, key) {
item.saleDetailDTOList.push(value)
})
})
item.discount = item.discount==null?10:item.discount
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
@ -295,14 +313,16 @@
}
obj.saleDetailQueryDTO = newSaleDetailDTOList
obj.num = 0
obj.num = 0
obj.customerCategoryRule = item.saleDetailDTOList[i].customerCategoryRule != null ?JSON.parse(item.saleDetailDTOList[i].customerCategoryRule):null
obj.id = item.saleDetailDTOList[i].productId
obj.price = item.saleDetailDTOList[i].price
obj.price = item.saleDetailDTOList[i].price
obj.buyCount = item.saleDetailDTOList[i].buyCount
obj.lsprice = item.saleDetailDTOList[i].price
obj.categoryId = item.saleDetailDTOList[i].categoryId
obj.zPrice = item.saleDetailDTOList[i].discountAmount
obj.unitPrice = item.saleDetailDTOList[i].discountAmount || item.saleDetailDTOList[i]
.wholesalePrice
obj.attrId = item.saleDetailDTOList[i].attrId
obj.discountAmount = item.saleDetailDTOList[i].discountAmount
obj.productName = item.saleDetailDTOList[i].productName
obj.productPicture = item.saleDetailDTOList[i].productPicture + '?time=' + new Date().getTime()
obj.productSn = item.saleDetailDTOList[i].productSn
@ -311,7 +331,12 @@
obj.saleId = item.id
obj.remark = item.remark
obj.xsyId = item.createBy
obj.createByName = item.createByName
obj.createByName = item.createByName
if(type == 'cancel'){
obj.unitPrice = this.getUnitPrice(item,item.saleDetailDTOList[i])
}else{
obj.unitPrice = item.saleDetailDTOList[i].discountAmount
}
dataList.push(obj)
}
} else {
@ -336,6 +361,9 @@
res.result.id = item.userId
uni.setStorageSync('khName', JSON.stringify(res.result))
uni.setStorageSync('carList1', JSON.stringify(dataList))
if(type == 'cancel'){
uni.setStorageSync('discountAll', item.discount != null ?item.discount:10)
}
uni.setStorageSync('hangOrder', true)
uni.switchTab({
url: '/pages/inventory/goodsList1'

14
package1/index/orderDetail.vue

@ -350,6 +350,10 @@
<view class="tui-item-title">店铺电话:</view>
<view class="tui-item-content">{{ shopOwnerPhone }}</view>
</view>
<view class="tui-order-flex">
<view class="tui-item-title">店铺备注:</view>
<view class="tui-item-content">{{ shopRemark1 }}</view>
</view>
</view>
</view>
<!-- 小静家的临时二维码 -->
@ -490,6 +494,7 @@
popupShow: false,
shopAddress: uni.getStorageSync('shopAddress'),
shopOwnerPhone: uni.getStorageSync('shopOwnerPhone'),
shopRemark1:uni.getStorageSync('shopRemark'),
sales: {},
dealingsRecord: {},
order: {},
@ -524,6 +529,7 @@
qrArr: [],
isShare: false,
isDownKH: false,
userId:'',
addressArr: [],
jinjuPhone: '', //金桔家单独改成这个电话
modal_qr: false,
@ -602,10 +608,12 @@
}
this.saleId = option.id
this.userId = option.userId
this.isShare = option.shopId ? true : false
if (option.id != null && option.id != undefined && option.id != "") {
if (option.type == 'gys') {
this.type = option.type;
console.log("222")
this.tui.request("/app/purchase/getPurchaseAllData", "post", {
id: option.id
}, false, true).then((res) => {
@ -619,7 +627,10 @@
}
}).catch((res) => {})
} else {
this.tui.request("/app/sale/get/" + option.id, "GET", null, false, false).then((res) => {
console.log("333")
this.tui.request("/app/sale/get/" + option.id, "GET", {
customerId:this.userId
}, false, false).then((res) => {
if (res.code == 200 && res.result != null && res.result != undefined) {
this.sales = res.result.sale
if (res.result.dealingsRecord != null) {
@ -750,6 +761,7 @@
},
//打印小票二维码,分割二维码字符串
analysisQrCode() {
console.log("1111")
let that = this;
that.tui.request("/app/shop/getShopInfoById", "post", {
id: this.shopId,

2
package1/index/peopleList.vue

@ -113,7 +113,7 @@
<view v-if="item.name != '散客' && item.consigneeName !='默认供应商'" class="name-edit" @tap.stop="goAddPeople('edit',item)" style="bottom: 86rpx;">
编辑
</view>
<view class="name-edit" @tap.stop="goDetail(item)" style="background: #FF9797;bottom:16rpx">
<view class="name-edit" v-if="userType==0" @tap.stop="goDetail(item)" style="background: #FF9797;bottom:16rpx">
查看明细
</view>
</view>

82
package1/inventory/addGoods.vue

@ -39,10 +39,10 @@
</view>
</view>
</uni-forms-item>
<!-- <uni-forms-item label="客户价格" name="categoryId" v-if="customerCategoryList != null">
<uni-forms-item label="客户价格" name="categoryId">
<view class="content-list">
<view class="list-val">
<input type="text" placeholder="根据客户分类自定义价格" disabled :value="formData.userCategoryName"
<input type="text" placeholder="根据客户分类自定义价格" disabled
style="border-bottom: 1px solid #fff;text-align: center;" @tap="addCustomPrice">
<uni-icons type="right" size="16"
style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons>
@ -56,7 +56,7 @@
{{item.categoryName}}:{{item.categoryPrice}}
</view>
</view>
</view> -->
</view>
<uni-forms-item label="添加规格" name="categoryId">
<view class="content-list">
<view class="list-val">
@ -435,7 +435,7 @@
typeItem: {},
arrtChange: [],
categoryId: '',
dataList: [],
dataList: {},
zPrice: 0,
type: 'add',
customerCategoryList:[],
@ -513,8 +513,10 @@
if (this.typeItem) {
this.formData.categoryId = this.typeItem.id
}
},
onLoad(option) {
this.getCustomerCategoryList()
if (option.dataList) {
this.dataList = JSON.parse(option.dataList)
this.tui.request("/app/product/getById/" + this.dataList.id, "POST", {
@ -522,13 +524,15 @@
}, false, true).then((res) => {
if (res.code == 200) {
this.type = 'edit'
this.customerCategoryList = JSON.parse(res.result.customerCategoryRule)
this.customerCategoryList = this.checkPriceRule((res.result.customerCategoryRule != '' && res.result.customerCategoryRule != null)? JSON.parse(res.result.customerCategoryRule): null)
console.log('customerCategoryList',this.customerCategoryList)
this.formData.attrId = res.result.attrId
this.formData.productName = res.result.productName
this.formData.barcode = res.result.barcode
this.formData.price = res.result.price
this.formData.productSn = res.result.productSn
this.formData.stockCount = this.dataList.stockCount
this.formData.minusStockCount = this.dataList.minusStockCount
this.formData.purchasePrice = res.result.purchasePrice
this.oldPurchasePrice = res.result.purchasePrice
this.formData.wholesalePrice = res.result.wholesalePrice
@ -543,8 +547,6 @@
this.tui.toast(res.message)
}
}).catch((res) => {})
}else{
this.getCustomerCategoryList()
}
this.userType = uni.getStorageSync('type')
@ -752,7 +754,14 @@
}
},
addCustomPrice(){
this.$refs.customPopup.open()
if(this.customerCategoryList == null){
uni.navigateTo({
url: '/package1/index/customClassList'
})
}else{
this.$refs.customPopup.open()
}
},
generateSn(value) {
this.tui.request("/app/productSn/getNewProductSn", "POST", {
@ -782,6 +791,31 @@
this.$refs.customPopup.close()
this.$forceUpdate()
},
checkPriceRule(ruleArr){
if(ruleArr != null && ruleArr != ''){
if(this.customerCategoryList != '' && this.customerCategoryList != null){
let categorySon = []
for(let i=0;i<this.customerCategoryList.length;i++){
let isHae = false
for(let j=0;j<ruleArr.length;j++){
if(this.customerCategoryList[i].categoryId == ruleArr[j].categoryId){
isHae = true
}
}
if(isHae == false){
ruleArr.push(this.customerCategoryList[i])
}
}
}else{
ruleArr = this.customerCategoryList
}
}else{
ruleArr = this.customerCategoryList
}
return ruleArr
},
async startGetSn() {
var that = this;
if (this.prefixRule == '') {
@ -942,7 +976,7 @@
} else {
this.formData.purchasePrice = e.target.value
console.log('改变', this.formData)
if (this.dataList == '') {
if (this.dataList.id) {
uni.hideLoading()
return
}
@ -1015,20 +1049,22 @@
},
//货号是否重复
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 + '”占用,请重新输入')
this.formData.productSn = ''
if(this.formData.productSn != '' && this.dataList.productSn != this.formData.productSn){
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 + '”占用,请重新输入')
this.formData.productSn = ''
}
}
}
})
})
}
},
ejectRuleSelect() {
if (this.dataList != '') {
if (this.dataList.id) {
//颜色
for (let m = 0; m < this.multipleList[0].productAttributeValueVoList.length; m++) {
let isTrue = true
@ -1064,7 +1100,7 @@
}
this.$nextTick(() => {
this.oldMultipleList = this.multipleList
if (this.dataList == '') {
if (this.dataList.id) {
this.multipleList = []
}
this.$refs.addTypeDialog.open('bottom')
@ -1075,7 +1111,7 @@
let that = this;
let url = ''
this.$refs.form.validate().then(res => {
if (that.dataList != '') {
if (that.dataList.id) {
url = '/app/product/edit'
this.formData.id = that.dataList.id
this.formData.stockCount = that.dataList.stockCount
@ -1112,7 +1148,7 @@
console.log('purchasePrice', this.formData)
that.tui.request(url, "post", this.formData, false, false).then((res1) => {
if (res1.code == 200) {
if (that.dataList != '') { //编辑商品
if (that.dataList.id) { //编辑商品
let pages = getCurrentPages();
let prevPage = pages[pages.length - 3];
let shopList = prevPage.$vm.shopList

95
package1/inventory/inventoryConfirm.vue

@ -126,6 +126,7 @@
purchaseDetails:'',
aiinventory:0, //1是AI入库 0是普通入库 2采购退货
userType:1,
claerSubmitBtn:0,
leijiqiankuan:0,
zhiqianqiankuan:0,
yuedikou:0
@ -178,52 +179,58 @@
this.leijiqiankuan = option.leijiqiankuan
},
methods: {
inventorySubmit() {
let url;
uni.showLoading({
title: '加载中...'
})
if(this.aiinventory == 1){
url = '/app/stock/putInPriceOfAi'
for(let i=0;i<this.purchaseDetails.length;i++){
delete this.purchaseDetails[i].id;
}
}else if(this.aiinventory == 0){
url = '/app/stock/putInOfProduct'
}else{
url = '/app/stock/putOutPrice'
for(let i=0;i<this.purchaseDetails.length;i++){
delete this.purchaseDetails[i].id;
inventorySubmit() {
this.claerSubmitBtn += 1
if(this.claerSubmitBtn == 1){
let url;
uni.showLoading({
title: '加载中...'
})
if(this.aiinventory == 1){
url = '/app/stock/putInPriceOfAi'
for(let i=0;i<this.purchaseDetails.length;i++){
delete this.purchaseDetails[i].id;
}
}else if(this.aiinventory == 0){
url = '/app/stock/putInOfProduct'
}else{
url = '/app/stock/putOutPrice'
for(let i=0;i<this.purchaseDetails.length;i++){
delete this.purchaseDetails[i].id;
}
}
this.$nextTick(()=>{
this.purchase.balanceDeductionAmount = this.yuedikou
this.tui.request(url, "post", {
purchase: this.purchase,
purchaseDetails: this.purchaseDetails
}, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "成功",
icon: 'none'
})
setTimeout(res => {
uni.switchTab({
url: '/pages/index/index'
});
}, 1000)
} else {
uni.showToast({
title: "失败",
icon: 'none'
})
}
})
})
setTimeout(res => {
uni.hideLoading();
}, 2000)
}else{
this.tui.toast("请勿重复提交!")
}
this.$nextTick(()=>{
this.purchase.balanceDeductionAmount = this.yuedikou
this.tui.request(url, "post", {
purchase: this.purchase,
purchaseDetails: this.purchaseDetails
}, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "成功",
icon: 'none'
})
setTimeout(res => {
uni.switchTab({
url: '/pages/index/index'
});
}, 1000)
} else {
uni.showToast({
title: "失败",
icon: 'none'
})
}
})
})
setTimeout(res => {
uni.hideLoading();
}, 2000)
},
batchPrint(){
uni.navigateTo({

87
package1/stock/addStock.vue

@ -40,9 +40,12 @@
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box">
<text>{{item.stockCount}}</text>
<text>库存</text>
<view class="price-box" @tap.stop="seeStockCount(item.stockCount,item.minusStockCount)">
<text>{{item.stockCount + item.minusStockCount}}</text>
<view>
库存
<uni-icons type="help" size="15"></uni-icons>
</view>
</view>
</view>
</view>
@ -74,9 +77,12 @@
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box">
<text>{{item.stockCount}}</text>
<text>库存</text>
<view class="price-box" @tap.stop="seeStockCount(item.stockCount,item.minusStockCount)">
<text>{{item.stockCount + item.minusStockCount}}</text>
<view>
库存
<uni-icons type="help" size="15"></uni-icons>
</view>
</view>
</view>
</view>
@ -142,6 +148,40 @@
<u-loadmore :status="status" />
</view>
</uni-popup>
<!-- 显示正负库存弹窗 -->
<uni-popup ref="showPopup" background-color="#fff">
<view class="popup-pay-content" style="width: 550rpx;">
<view class="popup-pay-title">
<text>库存数</text>
</view>
<view style="width: 100%;height: 150rpx;">
<view
style="width: 200rpx;height: 130rpx;border: 3px solid #FFE4C4;border-radius: 10px;margin-top: 20rpx;padding-top: 10px;display: flex;flex-direction: column;text-align: center;float: left;margin-left: 20rpx;">
<text style="font-weight: bold;">
正数库存
</text>
<text style="font-size: 30rpx;color: #000;font-weight: bold;">
{{zheng}}
</text>
</view>
<view
style="width: 200rpx;height: 130rpx;border: 3px solid #FFE4C4;border-radius: 10px;margin-top: 20rpx;padding-top: 10px;display: flex;flex-direction: column;text-align: center;float: left;margin-left: 40rpx;">
<text style="font-weight: bold;">
负数库存
</text>
<text style="font-size: 30rpx;color: #000;font-weight: bold;">
{{fu}}
</text>
</view>
</view>
<view class="popup-pay-container" style="display: flex;margin-top: 50rpx;background: #89CFF0;">
<view @tap='$refs.showPopup.close()'
style="flex:1;text-align: center;border-right: 1px solid #eee;background: #088FEB;font-size:32rpx;">
确认
</view>
</view>
</view>
</uni-popup>
</view>
</template>
@ -155,7 +195,9 @@
status: 'loadmore',
pageNum: 1, //分页的页码
shopList: [],
shopList1: [],
shopList1: [],
zheng:'',
fu:'',
pages: 1,
totalPages: 0,
info: 0,
@ -246,6 +288,11 @@
this.storageType = uni.getStorageSync('type')
},
methods: {
seeStockCount(zheng,fu){
this.zheng = zheng;
this.fu = fu;
this.$refs.showPopup.open()
},
//初始化获取分类列表
getGategoryList() {
this.tui.request("/app/productCategory/list", "get", {}, false, true).then((res) => {
@ -743,4 +790,30 @@
width: 90%;
// margin-top: 20upx;
}
.popup-pay-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
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;
border-radius: 10px;
background: #088FEB;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
color: #fff;
}
</style>
Loading…
Cancel
Save