wangfukang 3 years ago
parent
commit
63762af8ae
  1. 208
      pages/billing/addUser.vue
  2. 52
      pages/index/addHangOrder.vue
  3. 2
      pages/index/order.vue
  4. 1
      pages/index/peopleList.vue
  5. 2
      pages/index/waitStorageDetail.vue
  6. 147
      pages/inventory/goodsList1.vue
  7. 2
      pages/rebate/rebateShare.vue

208
pages/billing/addUser.vue

@ -104,7 +104,8 @@
}, },
onLoad(option) { onLoad(option) {
this.popleType = option.popleType this.popleType = option.popleType
this.type=option.type this.type=option.type
let data = JSON.parse(option.data)
if (option.type = "edit") { if (option.type = "edit") {
this.formData.address1 = data.province + data.city + data.area this.formData.address1 = data.province + data.city + data.area
this.formData.address = data.address this.formData.address = data.address
@ -112,8 +113,8 @@
this.formData.city = data.city this.formData.city = data.city
this.formData.province = data.province this.formData.province = data.province
this.formData.id = data.id this.formData.id = data.id
this.formData.consigneeMobile = data.consigneeMobile this.formData.consigneeMobile = data.consigneeMobile || data.phone
this.formData.consigneeName = data.consigneeName this.formData.consigneeName = data.consigneeName || data.name
} }
}, },
methods: { methods: {
@ -121,23 +122,43 @@
this.delShow = true; this.delShow = true;
}, },
delItemModal() { delItemModal() {
this.delShow = false; this.delShow = false;
this.tui.request("/app/supplier/delByIds", "post", { if(this.popleType=="khName"){
ids: this.formData.id, this.tui.request("/app/customer/delById", "post", {
}, false, true).then((res) => { id: this.formData.id,
if (res.code == 200) { }, false, true).then((res) => {
uni.showToast({ if (res.code == 200) {
title: "删除成功", uni.showToast({
icon: 'none' title: "删除成功",
}) icon: 'none'
uni.navigateBack() })
} else { uni.navigateBack()
uni.showToast({ } else {
title: "删除失败", uni.showToast({
icon: 'none' title: "删除失败",
}) icon: 'none'
} })
}) }
})
}else{
this.tui.request("/app/supplier/delByIds", "post", {
ids: this.formData.id,
}, false, true).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "删除成功",
icon: 'none'
})
uni.navigateBack()
} else {
uni.showToast({
title: "删除失败",
icon: 'none'
})
}
})
}
}, },
nameBlur() { nameBlur() {
this.formData.username = this.formData.phone; this.formData.username = this.formData.phone;
@ -166,57 +187,106 @@
let that = this; let that = this;
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
if(this.popleType == 'khName'){ if(this.popleType == 'khName'){
that.tui.request("/app/customer/save", "post", { if(that.type=='edit'){
name:this.formData.consigneeName, that.tui.request("/app/customer/edit", "post", {
phone:this.formData.consigneeMobile, name:this.formData.consigneeName,
address:this.formData.address, phone:this.formData.consigneeMobile,
province:this.addressObj.province, address:this.formData.address,
city:this.addressObj.city, province:this.addressObj.province,
area:this.addressObj.area, city:this.addressObj.city,
userName:this.formData.consigneeMobile area:this.addressObj.area,
}, false,true).then((res) => { id:this.formData.id,
if (res.code == 200) { userName:this.formData.consigneeMobile
uni.showToast({ }, false,true).then((res) => {
title: "添加成功", if (res.code == 200) {
icon: 'none' uni.showToast({
}) title: "添加成功",
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。 icon: 'none'
let prevPage = pages[pages.length - 2]; //上一页页面实例 })
prevPage.$vm.popleType = 'khName' let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
uni.navigateBack({ let prevPage = pages[pages.length - 2]; //上一页页面实例
delta: 1 prevPage.$vm.popleType = 'khName'
}) uni.navigateBack({
} else { delta: 1
uni.showToast({ })
title: "添加失败", } else {
icon: 'none' uni.showToast({
}) title: "添加失败",
} icon: 'none'
}) })
}
})
}else{
that.tui.request("/app/customer/save", "post", {
name:this.formData.consigneeName,
phone:this.formData.consigneeMobile,
address:this.formData.address,
province:this.formData.province,
city:this.formData.city,
area:this.formData.area,
userName:this.formData.consigneeMobile
}, false,true).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "添加成功",
icon: 'none'
})
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let prevPage = pages[pages.length - 2]; //上一页页面实例
prevPage.$vm.popleType = 'khName'
uni.navigateBack({
delta: 1
})
} else {
uni.showToast({
title: "添加失败",
icon: 'none'
})
}
})
}
}else{ }else{
that.tui.request("/app/supplier/save", "post", Object.assign(that.addressObj, res), false, if(that.type=='edit'){
true).then((res) => { that.tui.request("/app/supplier/edit", "post", this.formData, false,
if (res.code == 200) { true).then((res) => {
uni.showToast({ if (res.code == 200) {
title: "添加成功", uni.showToast({
icon: 'none' title: "修改成功",
}) icon: 'none'
let pages = })
getCurrentPages(); uni.navigateBack()
let prevPage = pages[pages.length - 2]; //上一页页面实例 } else {
prevPage.$vm.popleType = 'gysName' uni.showToast({
uni.navigateBack({ title: "修改失败",
delta: 1 icon: 'none'
}) })
} else { }
uni.showToast({ })
title: "添加失败", }else{
icon: 'none' that.tui.request("/app/supplier/save", "post", Object.assign(that.addressObj, res), false,
}) true).then((res) => {
} if (res.code == 200) {
}) uni.showToast({
title: "添加成功",
icon: 'none'
})
let pages =
getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一页页面实例
prevPage.$vm.popleType = 'gysName'
uni.navigateBack({
delta: 1
})
} else {
uni.showToast({
title: "添加失败",
icon: 'none'
})
}
})
}
} }
}).catch(err => { }).catch(err => {
}) })
} }

52
pages/index/addHangOrder.vue

@ -153,11 +153,13 @@
<uni-popup-dialog ref="inputClose" mode="input" title="挂单名称" placeholder="请输入挂单名称" <uni-popup-dialog ref="inputClose" mode="input" title="挂单名称" placeholder="请输入挂单名称"
@confirm="addReg"></uni-popup-dialog> @confirm="addReg"></uni-popup-dialog>
</uni-popup> </uni-popup>
<!-- 编辑挂单 --> <!-- 编辑挂单 -->
<uni-popup ref="setDialog" type="dialog"> <uni-popup ref="setDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" v-model="value" @input='' title="挂单名称" placeholder="请输入挂单名称" <uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="value"
@confirm="setDetail"></uni-popup-dialog> placeholder="请输入挂单名称" cancelText="删除" @confirm="setDetail" @close="dialogDel">
</uni-popup> </uni-popup-dialog>
</uni-popup>
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此分类?'" showCancelButton="true" @cancel="show = false" @confirm="delItemModal"></u-modal>
<!-- 查看大图弹出层 --> <!-- 查看大图弹出层 -->
<uni-popup ref="imgPopup" background-color="#fff"> <uni-popup ref="imgPopup" background-color="#fff">
<view class="img-popup-content"> <view class="img-popup-content">
@ -176,13 +178,15 @@
voiceText: '', voiceText: '',
recordState: false, recordState: false,
pageNumber: 1, pageNumber: 1,
regList: [], regList: [],
show: false,
list: [], list: [],
value: '', value: '',
indexList: [], indexList: [],
pageNum: 1, //分页的页码 pageNum: 1, //分页的页码
shopList: [], shopList: [],
info: 0, info: 0,
dialogTit:'挂单名称',
categoryId: '', //分类id categoryId: '', //分类id
searchName: '', //搜索框输入值 searchName: '', //搜索框输入值
shopId: '', //店铺id, shopId: '', //店铺id,
@ -407,7 +411,8 @@
productId: this.goodsDetail.id, productId: this.goodsDetail.id,
realPrice: this.zPrice, realPrice: this.zPrice,
productCount: this.zNum, productCount: this.zNum,
discountAmount: this.zPrice, discountAmount: this.purchasePrice,
unitPrice:this.purchasePrice,
productName: this.goodsDetail.productName, productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn, productSn: this.goodsDetail.productSn,
productPicture: this.goodsDetail.productPicture, productPicture: this.goodsDetail.productPicture,
@ -542,6 +547,37 @@
}).catch((res) => { }).catch((res) => {
this.tui.toast(res) this.tui.toast(res)
}) })
},
//带删除按钮的弹窗
dialogDel(){
this.delItem(this.list, 'del')
},
delItem(item, type) {
this.delType = type;
this.delItems = item;
this.show = true;
},
delItemModal() {
this.show = false;
console.log(this.delItems)
if(this.delType == 'del') {
this.tui.request("/app/sale/delById", "post", {
id: this.delItems.id,
}, false, true).then((res) => {
if (res.code == 200) {
this.getRegList()
uni.showToast({
title:"删除成功",
icon: 'none'
})
} else {
uni.showToast({
title:"删除失败",
icon: 'none'
})
}
}).catch((res) => {})
}
}, },
//删除整条挂单 //删除整条挂单
delHangOrder() { delHangOrder() {

2
pages/index/order.vue

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<view class="search"> <view class="search">
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" /> <uni-datetime-picker style="margin-bottom:10px;" v-model="range" @change="searchList" type="daterange" />
<u-search placeholder="输入收货人/货号/商品名称/供应商查询" v-model="keyword" @search="searchList" bg-color="#fff" <u-search placeholder="输入收货人/货号/商品名称/供应商查询" v-model="keyword" @search="searchList" bg-color="#fff"
:show-action="false" style="margin-top:10px;" border-color="#afd9ee"></u-search> :show-action="false" style="margin-top:10px;" border-color="#afd9ee"></u-search>
</view> </view>

1
pages/index/peopleList.vue

@ -201,6 +201,7 @@
//新增人员 //新增人员
goAddPeople(type,data){ goAddPeople(type,data){
this.modelShow = true; this.modelShow = true;
console.log(data)
uni.navigateTo({ uni.navigateTo({
url: "/pages/billing/addUser?type="+type+'&data='+JSON.stringify(data) + '&popleType=' + this.popleType url: "/pages/billing/addUser?type="+type+'&data='+JSON.stringify(data) + '&popleType=' + this.popleType
}) })

2
pages/index/waitStorageDetail.vue

@ -13,7 +13,7 @@
<view>货号:{{item.productSn == null ?'暂无':item.productSn}}</view> <view>货号:{{item.productSn == null ?'暂无':item.productSn}}</view>
<view><text v-if="type==0">单价:{{item.purchasePrice == null ?'暂无':item.purchasePrice}}</text> 数量:{{item.productCount == null ?'暂无':item.productCount}} <text v-if="type==0">总价:{{item.price == null ?'暂无':item.price}}</text></view> <view><text v-if="type==0">单价:{{item.purchasePrice == null ?'暂无':item.purchasePrice}}</text> 数量:{{item.productCount == null ?'暂无':item.productCount}} <text v-if="type==0">总价:{{item.price == null ?'暂无':item.price}}</text></view>
</view> </view>
<view v-if="type==0 && sales.inStorageStatus == 0" style="position: absolute;top: 130rpx;right: 40rpx;color: blue;text-decoration: underline;" <view v-if="type==0 && sales.inStorageStatus == 0" style="position: absolute;top: 20rpx;right: 40rpx;color: blue;text-decoration: underline;"
@tap="clickCollapse(index)"> @tap="clickCollapse(index)">
维护采购价 维护采购价
</view> </view>

147
pages/inventory/goodsList1.vue

@ -470,76 +470,79 @@
this.khName = [] this.khName = []
this.saleId = '' this.saleId = ''
} }
for (let i = 0; i < this.carList1.length; i++) { for (let i = 0; i < this.carList1.length; i++) {
if (this.carList.size == 0) { //当前页没有数据 if(this.carList1[i].saleDetailQueryDTO){
if (this.carList.size == 0) { //当前页没有数据
let obj = {
purchasePrice: this.carList1[i].price, //采购价 let obj = {
price: 0, //总价 purchasePrice: this.carList1[i].price, //采购价
discount: 10, //折扣 price: 0, //总价
unitPrice: this.carList1[i].unitPrice || 0, //单价 discount: 10, //折扣
discountAmount: this.carList1[i].unitPrice || 0, //折后价 unitPrice: this.carList1[i].unitPrice || 0, //单价
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 discountAmount: this.carList1[i].unitPrice || 0, //折后价
lsprice: this.carList1[i].lsprice, //零售价 wholesalePrice: this.carList1[i].wholesalePrice, //批发价
productCount: 0, //总数量 lsprice: this.carList1[i].lsprice, //零售价
productId: this.carList1[i].id, productCount: 0, //总数量
productName: this.carList1[i].productName, productId: this.carList1[i].id,
productPicture: this.carList1[i].productPicture, productName: this.carList1[i].productName,
productSn: this.carList1[i].productSn, productPicture: this.carList1[i].productPicture,
stockLogList: new Map(), productSn: this.carList1[i].productSn,
stockLogList1: [], stockLogList: new Map(),
supplierName: this.carList1[i].supplierName //供应商 stockLogList1: [],
} supplierName: this.carList1[i].supplierName //供应商
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { }
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i] for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
.saleDetailQueryDTO[m].productCount) obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i]
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount .saleDetailQueryDTO[m].productCount)
} obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
this.carList.set(this.carList1[i].id, obj) }
} else { //当前页有数据 this.carList.set(this.carList1[i].id, obj)
if (this.carList.has(this.carList1[i].id) == true) { //商品相同 } else { //当前页有数据
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { if (this.carList.has(this.carList1[i].id) == true) { //商品相同
if (this.carList.get(this.carList1[i].id).stockLogList.has(this.carList1[i].saleDetailQueryDTO[ for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
m].attributeList) == true) { //规格相同 if (this.carList.get(this.carList1[i].id).stockLogList.has(this.carList1[i].saleDetailQueryDTO[
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[ m].attributeList) == true) { //规格相同
m].attributeList, this.carList.get(this.carList1[i].id).stockLogList.get(this this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[
.carList1[i].saleDetailQueryDTO[m].attributeList) + this.carList1[i] m].attributeList, this.carList.get(this.carList1[i].id).stockLogList.get(this
.saleDetailQueryDTO[m].productCount) .carList1[i].saleDetailQueryDTO[m].attributeList) + this.carList1[i]
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[ .saleDetailQueryDTO[m].productCount)
m].productCount this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[
} else { //规格不同 m].productCount
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[ } else { //规格不同
m].attributeList, this.carList1[i].saleDetailQueryDTO[m].productCount) this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[ m].attributeList, this.carList1[i].saleDetailQueryDTO[m].productCount)
m].productCount this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[
} m].productCount
} }
} else { //商品不同 }
let obj = { } else { //商品不同
purchasePrice: this.carList1[i].price, //采购价 let obj = {
price: 0, purchasePrice: this.carList1[i].price, //采购价
discount: 10, price: 0,
discountAmount: this.carList1[i].unitPrice || 0, discount: 10,
unitPrice: this.carList1[i].unitPrice || 0, //单价 discountAmount: this.carList1[i].unitPrice || 0,
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 unitPrice: this.carList1[i].unitPrice || 0, //单价
lsprice: this.carList1[i].lsprice, //零售价 wholesalePrice: this.carList1[i].wholesalePrice, //批发价
productCount: 0, lsprice: this.carList1[i].lsprice, //零售价
productId: this.carList1[i].id, productCount: 0,
productName: this.carList1[i].productName, productId: this.carList1[i].id,
productPicture: this.carList1[i].productPicture, productName: this.carList1[i].productName,
stockLogList: new Map(), productPicture: this.carList1[i].productPicture,
stockLogList1: [], stockLogList: new Map(),
productSn: this.carList1[i].productSn, stockLogList1: [],
supplierName: this.carList1[i].supplierName productSn: this.carList1[i].productSn,
} supplierName: this.carList1[i].supplierName
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { }
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i] for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
.saleDetailQueryDTO[m].productCount) obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i]
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount .saleDetailQueryDTO[m].productCount)
} obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
this.carList.set(this.carList1[i].id, obj) }
} this.carList.set(this.carList1[i].id, obj)
} }
}
}
} }
uni.removeStorageSync('carList1') uni.removeStorageSync('carList1')
uni.removeStorageSync('khName') uni.removeStorageSync('khName')
@ -1744,7 +1747,9 @@
margin-left: 46rpx !important; margin-left: 46rpx !important;
} }
} }
.uni-data-checklist .checklist-group .checklist-box {
margin-right: 0 !important;
}
.uni-numbox { .uni-numbox {
input { input {
padding-left: 0; padding-left: 0;

2
pages/rebate/rebateShare.vue

@ -43,7 +43,7 @@
.content { .content {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/352c2490d88b47ac84bf13bfa046abcf.png') no-repeat; background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/abdc5c897c4f4fe198b74091a708030b.jpg') no-repeat;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
overflow: hidden; overflow: hidden;

Loading…
Cancel
Save