wangfukang 3 years ago
parent
commit
97010c6b80
  1. 78
      pages/billing/changeGoods1.vue
  2. 73
      pages/index/shareStyle.vue
  3. 4
      pages/index/waitStorage.vue
  4. 6
      pages/index/waitStorageDetail.vue
  5. 24
      pages/inventory/addinventory.vue
  6. 2
      pages/inventory/changeGoods1.vue
  7. 11
      pages/inventory/goodsList1.vue
  8. 9
      pages/inventory/inventoryDetail.vue

78
pages/billing/changeGoods1.vue

@ -276,19 +276,61 @@
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
for (var i = 0; i < this.temporaryList.length; i++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) != -1) {
this.temporaryList[i] = this.attributeList
for (var m = 0; m < this.temporaryList.length; m++) {
if (this.temporaryList[m].name.indexOf(this.attributeList.name) != -1) {
this.temporaryList[m] = this.attributeList
return
} else {
if (this.temporaryList.length == (i + 1)) {
if (this.temporaryList.length == (m + 1)) {
this.temporaryList.push(this.attributeList);
return
}
}
}
}
if(this.carList.length == 0){
let data = {
id: this.goodsDetail.id,
price: this.zPrice,
num: this.zNum,
productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn,
productPicture: this.goodsDetail.productPicture,
supplierName: this.goodsDetail.supplierName,
saleDetailQueryDTO: this.temporaryList,
wholesalePrice: this.goodsDetail.wholesalePrice,
lsprice: this.goodsDetail.price
}
this.carList.push(data)
}else{
for(let i = 0; i < this.carList.length; i++){
if(this.carList[i].id== this.goodsDetail.id){ //商品存在
for(let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++){
if(this.carList[i].saleDetailQueryDTO[m].name != this.attributeList.name){ //规格不存在
if(this.carList[i].saleDetailQueryDTO.length == (m+1)){
this.carList[i].saleDetailQueryDTO.push(this.attributeList)
}
}
}
}else{ //商品不存在
let data = {
id: this.goodsDetail.id,
price: this.zPrice,
num: this.zNum,
productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn,
productPicture: this.goodsDetail.productPicture,
supplierName: this.goodsDetail.supplierName,
saleDetailQueryDTO: this.temporaryList,
wholesalePrice: this.goodsDetail.wholesalePrice,
lsprice: this.goodsDetail.price
}
this.carList.push(data)
}
}
}
}
@ -338,10 +380,12 @@
this.type = type
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
if (type == 'carPopup') {
this.carNum = 0
this.$refs.carPopup.open('bottom')
for (let i = 0; i < this.carList.length; i++) {
this.carNum += this.carList[i].num
}
this.carType = this.carList.length
} else {
this.checkGoods(item);
@ -439,19 +483,19 @@
// icon: 'none'
// })
// }else{
let data = {
id: this.goodsDetail.id,
price: this.zPrice,
num: this.zNum,
productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn,
productPicture: this.goodsDetail.productPicture,
supplierName: this.goodsDetail.supplierName,
saleDetailQueryDTO: this.temporaryList,
wholesalePrice: this.goodsDetail.wholesalePrice,
lsprice: this.goodsDetail.price
}
this.carList.push(data)
// let data = {
// id: this.goodsDetail.id,
// price: this.zPrice,
// num: this.zNum,
// productName: this.goodsDetail.productName,
// productSn: this.goodsDetail.productSn,
// productPicture: this.goodsDetail.productPicture,
// supplierName: this.goodsDetail.supplierName,
// saleDetailQueryDTO: this.temporaryList,
// wholesalePrice: this.goodsDetail.wholesalePrice,
// lsprice: this.goodsDetail.price
// }
// this.carList.push(data)
this.temporaryList = []
this.purchasePrice = ''
this.zPrice = ''

73
pages/index/shareStyle.vue

@ -7,7 +7,8 @@
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="index"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;"
:class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
</view>
<view class="content-right">
@ -71,7 +72,8 @@
<view v-for="(item,index) in gwcList" style="position: relative;" :key="index">
<view class="popup-title">
<view class="popup-title-left">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c09dfa8c61c949f8b0dbb8f041d5a501.png" alt="">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c09dfa8c61c949f8b0dbb8f041d5a501.png"
alt="">
</view>
<view class="popup-title-right">
<view class="popup-title-right-box" style="color: #088FEB;">{{item.productName}}</view>
@ -107,17 +109,17 @@
pageNum: 1, //分页的页码
shopList: [],
info: 0,
goodsList:[],
goodsList: [],
categoryId: '', //分类id
searchName: '', //搜索框输入值
shopId: '', //店铺id,
checkbox: '', //需要分享的商品id
id: '',
carList:[],
carNum:0,
carType:0,
type:'',
gwcList:[]
carList: [],
carNum: 0,
carType: 0,
type: '',
gwcList: []
}
},
created() {
@ -181,9 +183,9 @@
})
},
//未入库遮罩
clickMask(item){
clickMask(item) {
let title = ''
if(item.delFlag == 0){
if (item.delFlag == 0) {
title = '请将商品上架后再操作!'
}
// else if(item.delFlag == 1){
@ -210,20 +212,20 @@
checkboxChange(item) {
console.log(item)
item.checked = !item.checked
if(this.carList.indexOf(item.id) != -1){
this.carList.splice(this.carList.indexOf(item.id),1)
}else{
if (this.carList.indexOf(item.id) != -1) {
this.carList.splice(this.carList.indexOf(item.id), 1)
} else {
this.carList.push(item.id)
}
if(this.gwcList.length==0){
if (this.gwcList.length == 0) {
this.gwcList.push(item)
}else{
for(let i=0;i<this.gwcList.length;i++){
if(this.gwcList[i].id==item.id){
} else {
for (let i = 0; i < this.gwcList.length; i++) {
if (this.gwcList[i].id == item.id) {
console.log('这里')
this.gwcList.splice(i,1)
}else{
if(this.gwcList.length == (i+1)){
this.gwcList.splice(i, 1)
} else {
if (this.gwcList.length == (i + 1)) {
console.log('是不是那里')
this.gwcList.push(item)
return
@ -233,7 +235,7 @@
}
}
console.log('gwcList',this.gwcList)
console.log('gwcList', this.gwcList)
},
//点击分享按钮
clickShareBtn(e) {
@ -283,7 +285,6 @@
},
//弹出购物车或者商品规格选择弹窗
toggle(type, item) {
this.type = type
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
if (type == 'carPopup') {
this.$refs.carPopup.open('bottom')
@ -294,28 +295,36 @@
}
},
//删除整条商品
delShop(id){
delShop(id) {
var that = this;
for (let i=0;i<this.shopList.length;i++) {
if(this.shopList[i].id == id){
uni.showModal({
title: "提示",
content: "确定删除此条商品吗?",
success: function(res) {
that.carList.splice(that.carList.indexOf(id),1)
if (res.confirm) {
for (let i = 0; i < that.gwcList.length; i++) {
console.log('匹配吗?',that.goodsList)
if (that.gwcList[i].id == id) {
that.carList.splice(that.carList.indexOf(id), 1)
that.carType = that.carList.length
that.$set(that.shopList[i], 'checked', !that.shopList[i].checked)
that.gwcList.splice(i, 1)
for(let m= 0;m < that.goodsList.length;m++){
if(that.goodsList[m].id == id){
that.$set(that.goodsList[m], 'checked', !that.goodsList[m].checked)
}
console.log(that.carList.length)
console.log(that.carList)
}
})
}
}
}
}
})
},
//关闭购物车弹窗
closeCar(){
closeCar() {
this.$refs.carPopup.close()
}
}
@ -542,6 +551,7 @@
border-bottom: 1px solid #eee;
margin-top: 20rpx;
}
.popup-bottom {
width: 100%;
height: 100rpx;
@ -572,6 +582,7 @@
border-radius: 70rpx;
}
}
.shop-mask {
width: 100%;
height: 190rpx;

4
pages/index/waitStorage.vue

@ -64,9 +64,11 @@
// this.page = ++this.page;
// this.getList();
// },
onShow(){
this.getList()
},
onLoad(option) {
this.inStorageStatus = option.inStorageStatus || ''
this.getList()
this.type = uni.getStorageSync('type')
},
methods: {

6
pages/index/waitStorageDetail.vue

@ -4,14 +4,14 @@
<view class="uni-body" v-if="sales.province">{{sales.province + sales.area + sales.city + sales.receiveAddress}} </view>
</uni-card>
<view class="tui-order-item boxbg">
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(item,index) in goodsList" :key="key">
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(item,index) in goodsList" :key="index">
<view class="shop-name">
<img :src="item.productPicture == null ?'暂无':item.productPicture" alt=""
style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;">
<view class="shop-productName">
<view style="color:#FF5809;">品名:{{item.productName == null ?'暂无':item.productName}}</view>
<view>货号:{{item.productSn == null ?'暂无':item.productSn}}</view>
<view>总价:{{item.price == null ?'暂无':item.price}} 数量:{{item.productCount == null ?'暂无':item.productCount}}</view>
<view><text v-if="type==0">总价:{{item.price == null ?'暂无':item.price}}</text> 数量:{{item.productCount == null ?'暂无':item.productCount}}</view>
</view>
<view v-if="type==0 && sales.inStorageStatus == 0" style="position: absolute;top: 130rpx;right: 40rpx;color: blue;text-decoration: underline;"
@tap="clickCollapse(index)">
@ -19,7 +19,7 @@
</view>
</view>
<view class="shop-type">
<view class="shop-collapse" v-for="items in item.stockLogList1">
<view class="shop-collapse" v-for="(items,index) in item.stockLogList1" :key='index'>
<text>{{items.attributeList | sliceMsg}}</text>
<!-- <text style="color: red;">单价:¥{{item.price}}</text> -->
<text>数量:{{items.productCount == null ?'暂无':item.productCount}}</text>

24
pages/inventory/addinventory.vue

@ -46,7 +46,7 @@
</view>
<view
style="position: absolute;top: 130rpx;right: 40rpx;color: blue;text-decoration: underline;"
@tap="clickCollapse(value[0])">
@tap="clickCollapse(value[0])" v-if='storageType==0'>
维护采购价
</view>
</view>
@ -55,25 +55,25 @@
<view class="content-box" style="margin-bottom:110rpx;">
<!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 -->
<view class="price-box-list">
<view class="content-list" v-if='type==0'>
<view class="content-list" v-if='storageType==0'>
<view class="list-name">应付金额</view>
<view class="list-val">
<input type="text" v-model="shouldPay">
</view>
</view>
<view class="content-list" v-if='type==0'>
<view class="content-list" v-if='storageType==0'>
<view class="list-name">已付金额</view>
<view class="list-val">
<input type="text" v-model="alreadyPay" @blur="changePay">
</view>
</view>
<view class="content-list" v-if='type==0'>
<view class="content-list" v-if='storageType==0'>
<view class="list-name">欠款</view>
<view class="list-val">
<input type="text" v-model="noPay" disabled>
</view>
</view>
<view class="content-list" v-if='type==0'>
<view class="content-list" v-if='storageType==0'>
<view class="list-name">其他费用</view>
<view class="list-val">
<input type="text" v-model="otherPay">
@ -190,7 +190,7 @@
keyList: [],
temporaryList: [],
zNum: 0,
type:''
storageType:''
}
},
filters: {
@ -252,6 +252,7 @@
productId: this.carList1[i].id,
productName: this.carList1[i].productName,
productPicture: this.carList1[i].productPicture,
productSn: this.carList1[i].productSn,
stockLogList: new Map(),
stockLogList1: [],
name: ''
@ -270,10 +271,10 @@
that.totalAmount += value.productCount
})
this.noPay = this.shouldPay
this.type = uni.getStorageSync('type')
},
onLoad() {
this.storageType = uni.getStorageSync('type')
},
methods: {
scanCodeAdd() {
@ -356,7 +357,6 @@
},
//弹出商品规格选择
toggle(type, id) {
this.type = type
if (type == 'bottom') {
this.getById(id);
}
@ -522,15 +522,17 @@
inventorySubmit() {
if (this.khName == '' || this.carList == '') {
uni.showToast({
title: "信息填写完成后入库!",
title: "商品信息填写完成后入库!",
icon: 'none'
})
return
}else{
if(type==0 && this.shouldPay == 0){
if(this.storageType==0 && this.shouldPay == 0){
uni.showToast({
title: "管理员必须维护价格!",
icon: 'none'
})
return
}
}
let that = this;

2
pages/inventory/changeGoods1.vue

@ -22,7 +22,7 @@
<view class="box-right-name">{{item.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price">
<view class="price-box">
<view class="price-box" v-if="storageType == 0">
<text>{{item.purchasePrice == null ?'待入库':item.purchasePrice}}</text>
<text>采购价</text>
</view>

11
pages/inventory/goodsList1.vue

@ -78,7 +78,7 @@
</view>
<view style="position: absolute;top: 110rpx;right: 40rpx;color: blue;text-decoration: underline;"
@tap.stop="clickPrice(value[0])">
选择售价
改价
</view>
<view style="position: absolute;top: 30rpx;right: 30rpx;" @tap.stop="delShop(value[0])">
<uni-icons color="red" type="trash" size="26"></uni-icons>
@ -922,8 +922,6 @@
this.tui.toast('请选择配送公司!')
return
}
}else if(this.radioType== 3){
console.log(this.radioType1)
if(this.radioType1 == 0){
if(this.lbgName == ''){
this.tui.toast('请选择配送人员!')
@ -931,6 +929,11 @@
}
}
}else if(this.radioType== 3){
if(this.pbAddress == ''){
this.tui.toast('请输入拼包地址!')
return
}
}
}else{
this.tui.toast('请选择发货方式!')
@ -957,7 +960,7 @@
createBy: this.xsyId,
createByName:this.createByName,
remark: this.remark,
otherExpense:this.otherExpense, //其他费用
otherExpense:this.otherExpense ==''?0:this.otherExpense, //其他费用
shareAddress:this.pbAddress,
transCompany: this.wlName.id,
companyName:this.wlName.companyName,

9
pages/inventory/inventoryDetail.vue

@ -120,11 +120,10 @@
//快递单600*1040 入库单440*320
let strCmd = blesdk.CreatCPCLPage(440, 320, 1, 0);
strCmd += blesdk.addCPCLText('0', '30', '24', '0', 0, '商品名:'+this.dataList.productName)
strCmd += blesdk.addCPCLText('0', '80', '24', '0', 0, '商品id:'+this.dataList.id)
strCmd += blesdk.addCPCLText('0', '130', '24', '0', 0, '货 号:'+this.dataList.productSn)
strCmd += blesdk.addCPCLText('0', '180', '24', '0', 0, '供应商:'+this.dataList.supplierName)
strCmd += blesdk.addCPCLText('0', '230', '24', '0', 0, '批发价:'+this.dataList.wholesalePrice)
strCmd += blesdk.addCPCLText('0', '280', '24', '0', 0, '零售价:'+this.dataList.price)
strCmd += blesdk.addCPCLText('0', '80', '24', '0', 0, '货 号:'+this.dataList.productSn)
strCmd += blesdk.addCPCLText('0', '130', '24', '0', 0, '供应商:'+this.dataList.supplierName)
strCmd += blesdk.addCPCLText('0', '180', '24', '0', 0, '批发价:'+this.dataList.wholesalePrice)
strCmd += blesdk.addCPCLText('0', '230', '24', '0', 0, '零售价:'+this.dataList.price)
strCmd += blesdk.addCPCLQRCode(260, 170, 'H', '1', 6, this.dataList.id) //二维码
strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中
strCmd += blesdk.addCPCLPrint();

Loading…
Cancel
Save