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) {
this.popleType = option.popleType
this.type=option.type
this.type=option.type
let data = JSON.parse(option.data)
if (option.type = "edit") {
this.formData.address1 = data.province + data.city + data.area
this.formData.address = data.address
@ -112,8 +113,8 @@
this.formData.city = data.city
this.formData.province = data.province
this.formData.id = data.id
this.formData.consigneeMobile = data.consigneeMobile
this.formData.consigneeName = data.consigneeName
this.formData.consigneeMobile = data.consigneeMobile || data.phone
this.formData.consigneeName = data.consigneeName || data.name
}
},
methods: {
@ -121,23 +122,43 @@
this.delShow = true;
},
delItemModal() {
this.delShow = false;
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'
})
}
})
this.delShow = false;
if(this.popleType=="khName"){
this.tui.request("/app/customer/delById", "post", {
id: this.formData.id,
}, false, true).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "删除成功",
icon: 'none'
})
uni.navigateBack()
} else {
uni.showToast({
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() {
this.formData.username = this.formData.phone;
@ -166,57 +187,106 @@
let that = this;
this.$refs.form.validate().then(res => {
if(this.popleType == 'khName'){
that.tui.request("/app/customer/save", "post", {
name:this.formData.consigneeName,
phone:this.formData.consigneeMobile,
address:this.formData.address,
province:this.addressObj.province,
city:this.addressObj.city,
area:this.addressObj.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'
})
}
})
if(that.type=='edit'){
that.tui.request("/app/customer/edit", "post", {
name:this.formData.consigneeName,
phone:this.formData.consigneeMobile,
address:this.formData.address,
province:this.addressObj.province,
city:this.addressObj.city,
area:this.addressObj.area,
id:this.formData.id,
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{
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{
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'
})
}
})
if(that.type=='edit'){
that.tui.request("/app/supplier/edit", "post", this.formData, false,
true).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "修改成功",
icon: 'none'
})
uni.navigateBack()
} else {
uni.showToast({
title: "修改失败",
icon: 'none'
})
}
})
}else{
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 => {
})
}

52
pages/index/addHangOrder.vue

@ -153,11 +153,13 @@
<uni-popup-dialog ref="inputClose" mode="input" title="挂单名称" placeholder="请输入挂单名称"
@confirm="addReg"></uni-popup-dialog>
</uni-popup>
<!-- 编辑挂单 -->
<uni-popup ref="setDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" v-model="value" @input='' title="挂单名称" placeholder="请输入挂单名称"
@confirm="setDetail"></uni-popup-dialog>
</uni-popup>
<!-- 编辑挂单 -->
<uni-popup ref="setDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="value"
placeholder="请输入挂单名称" cancelText="删除" @confirm="setDetail" @close="dialogDel">
</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">
<view class="img-popup-content">
@ -176,13 +178,15 @@
voiceText: '',
recordState: false,
pageNumber: 1,
regList: [],
regList: [],
show: false,
list: [],
value: '',
indexList: [],
pageNum: 1, //分页的页码
shopList: [],
info: 0,
info: 0,
dialogTit:'挂单名称',
categoryId: '', //分类id
searchName: '', //搜索框输入值
shopId: '', //店铺id,
@ -407,7 +411,8 @@
productId: this.goodsDetail.id,
realPrice: this.zPrice,
productCount: this.zNum,
discountAmount: this.zPrice,
discountAmount: this.purchasePrice,
unitPrice:this.purchasePrice,
productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn,
productPicture: this.goodsDetail.productPicture,
@ -542,6 +547,37 @@
}).catch((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() {

2
pages/index/order.vue

@ -1,7 +1,7 @@
<template>
<view>
<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"
:show-action="false" style="margin-top:10px;" border-color="#afd9ee"></u-search>
</view>

1
pages/index/peopleList.vue

@ -201,6 +201,7 @@
//新增人员
goAddPeople(type,data){
this.modelShow = true;
console.log(data)
uni.navigateTo({
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><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 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)">
维护采购价
</view>

147
pages/inventory/goodsList1.vue

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

2
pages/rebate/rebateShare.vue

@ -43,7 +43,7 @@
.content {
width: 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-position: center;
overflow: hidden;

Loading…
Cancel
Save