diff --git a/pages/.DS_Store b/pages/.DS_Store
index 0975784..d13ddaa 100644
Binary files a/pages/.DS_Store and b/pages/.DS_Store differ
diff --git a/pages/billing/.DS_Store b/pages/billing/.DS_Store
index f411168..9e04d90 100644
Binary files a/pages/billing/.DS_Store and b/pages/billing/.DS_Store differ
diff --git a/pages/billing/addUser.vue b/pages/billing/addUser.vue
index a038b85..ea6d4e0 100644
--- a/pages/billing/addUser.vue
+++ b/pages/billing/addUser.vue
@@ -2,15 +2,26 @@
-
-
+
-
+
+
+
+
+
+ *客户欠款输入正数,如有余额则此处输入负数
+
+
+
+
+
+ *供应商的欠款需输入正数,如有余额则此处输入负数
+
@@ -27,7 +38,8 @@
+ @confirm="delItemModal">
+
@@ -40,9 +52,12 @@
} from 'vuex';
export default {
data() {
- return {
+ return {
+ showPrice:false,
+ keyboardNum:'',
userInfo: '',
- show: false,
+ show: false,
+ goodsNum:'',
delShow: false,
addressObj: {},
type: '',
@@ -54,7 +69,8 @@
address: '',
province: '',
city: '',
- area: ''
+ area: '',
+ noEarn:""
},
// 单选数据源
sexs: [{
@@ -131,19 +147,22 @@
},
methods: {
//获取手机通讯录
- getUserPhone() {
-
+ getUserPhone() {
let that = this;
wx.chooseContact({
success: function(res) {
-
that.formData.consigneeMobile = res.phoneNumber
that.formData.consigneeName = res.displayName
},
- fail(res) {
-
- }
+ fail(res) {}
})
+ },
+ keyboardConfirm(){
+ if(this.keyboardNum != ''){
+ this.formData.noEarn = this.keyboardNum
+ }
+ this.showPrice = false
+ this.keyboardNum = ''
},
del() {
this.delShow = true;
@@ -189,6 +208,20 @@
},
nameBlur() {
this.formData.username = this.formData.phone;
+ },
+ keyCancel(){
+ this.showFu = false
+ this.showPrice = false
+ this.keyboardNum = ''
+ },
+ // 按键被点击(点击退格键不会触发此事件)
+ valChange(val) {
+ // 将每次按键的值拼接到value变量中,注意+=写法
+ this.keyboardNum += val
+ },
+ // 退格键被点击
+ backspace(val) {
+ this.keyboardNum = val
},
authVerification() {
uni.getSetting({
@@ -223,12 +256,9 @@
uni.chooseLocation({
latitude:'38.335974',
longitude:'116.805783',
- success: function(res) {
- console.log('11111',res)
- if (res.name != '') {
-
- let aaa = getArea(res.address)
- console.log('2222',aaa)
+ success: function(res) {
+ if (res.name != '') {
+ let aaa = getArea(res.address)
that.formData.province = aaa.province
that.formData.city = aaa.city
that.formData.area = aaa.country
@@ -285,7 +315,8 @@
province: this.formData.province,
city: this.formData.city,
area: this.formData.area,
- userName: this.formData.consigneeMobile
+ userName: this.formData.consigneeMobile,
+ amountOwed:this.formData.noEarn
}, false, true).then((res) => {
if (res.code == 200) {
uni.showToast({
@@ -402,5 +433,8 @@
background: #088FEB;
color: #fff;
border-radius: 0;
+ }
+ .qichu{
+ margin-bottom: 0;
}
\ No newline at end of file
diff --git a/pages/billing/changeGoods1.vue b/pages/billing/changeGoods1.vue
index 07706e2..75909ec 100644
--- a/pages/billing/changeGoods1.vue
+++ b/pages/billing/changeGoods1.vue
@@ -1,85 +1,84 @@
-
-
+
+
-
-
-
- {{item.categoryName}}
-
+
+
+ {{item.categoryName}}
-
-
-
-
-
-
- 暂无图片
+
+
+
+
+
+
+
+ 暂无图片
+
+
+
+ {{item.productSn}}
+ (已下架)
-
-
- {{item.productName}}
- (已下架)
+ {{item.productName}}
+
+
+ {{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
+ 采购价
- {{item.productSn}}
-
-
- {{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
- 采购价
-
-
- {{item.wholesalePrice}}
- 批发价
-
-
- {{item.price}}
- 零售价
-
-
- {{item.stockCount}}
- 库存
-
+
+ {{item.wholesalePrice}}
+ 批发价
+
+
+ {{item.price}}
+ 零售价
+
+
+ {{item.stockCount}}
+ 库存
+
+
+
+
+
+
+
+
+ 暂无图片
-
-
-
-
-
-
- 暂无图片
-
-
- {{item.productName}}
- {{item.productSn}}
-
-
- {{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
- 采购价
-
-
- {{item.wholesalePrice}}
- 批发价
-
-
- {{item.price}}
- 零售价
-
-
- {{item.stockCount}}
- 库存
-
+
+ {{item.productName}}
+ {{item.productSn}}
+
+
+ {{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
+ 采购价
+
+
+ {{item.wholesalePrice}}
+ 批发价
+
+
+ {{item.price}}
+ 零售价
+
+
+ {{item.stockCount}}
+ 库存
-
-
+
+
+
-
+
@@ -114,9 +113,9 @@
-
- {{items.name}}
+ {{items.name}}
-
+
{{itemTag.value}}
-
-
+
@@ -143,7 +141,7 @@
-
-
+
+
@@ -156,9 +154,20 @@
{{item.name}}
- {{item.productNum==null?'无库存':item.productNum}}
+
+ {{item.productNum==null?'无库存':item.productNum}}
+
+
+
+
+
+ -
+
+
+
+ +
+
-
@@ -174,7 +183,7 @@
-
+
@@ -238,7 +256,7 @@
-
+
@@ -251,26 +269,31 @@
focus:false,
pageNum: 1, //分页的页码
shopList: [],
- shopList1:[],
- info: 0,
+ shopList1:[],
+ show:false,
categoryId: '', //分类id
searchName: '', //搜索框输入值
shopId: '', //店铺id,
checkbox: [], //需要分享的商品id
temporaryNum: 0,
allChangeNum:0,
+ defaultText:0,
oneGoodsSpec:[],
goodsDetail: [],
- attrNameList: [],
+ attrNameList: [],
+ keyboard:'',
+ oneGoodsName:'',
temporaryList: [],
isPlusAndMinus:false,
carList: [],
attributeList: [],
- purchasePrice: 0,
+ purchasePrice: 0,
+ keyboardIndex:'',
zPrice: 0,
zNum: 0,
goodsNum:'',
- storageType: '',
+ storageType: '',
+ keyboardNum:"",
carNum: 0,
carType: 0,
type: '',
@@ -278,6 +301,7 @@
productNum:null,
height:0,
pecsList:[],
+ // status: 'loadmore',
pageOldTemList:[],
oldTemList:[],
goodsList:[],
@@ -295,22 +319,15 @@
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
- name += newObj[as] + '/'
+ name += newObj[as] + ' | '
}
}
return name;
- },
- maxNum(val) {
- if (val >= 10) {
- return 10
- } else if (val < 0) {
- return 0
- }
}
},
onReachBottom() {
if (this.pageNum >= this.pages) return;
- this.status = 'loading';
+ // this.status = 'loading';
this.pageNum ++;
this.getShareList();
},
@@ -340,21 +357,19 @@
}
}).catch((res) => {})
},
- combination(arr) {
- let result = [
- []
- ]
-
- arr.map(x => {
- var res = []
- result.map(y => {
- x.specs.map(z => {
- res.push([...y, z])
- })
- })
- result = res
- })
- return result;
+ // 按键被点击(点击退格键不会触发此事件)
+ valChange(val) {
+ // 将每次按键的值拼接到value变量中,注意+=写法
+ this.keyboardNum += val
+ if(this.keyboard == 'goodsNum'){
+ this.goodsNum = this.keyboardNum
+ }
+ },
+ // 退格键被点击
+ backspace(val) {
+ this.keyboardNum = val
+ this.goodsNum = val
+ console.log(val)
},
//保存已选
saveCheck(){
@@ -367,49 +382,17 @@
}
},
chenumChange(e,index,index1){
- console.log('1111',this.linshiPrice)
-
- if(this.linshiPrice == e.target.value){
- this.carList[index].saleDetailQueryDTO[index1].productCount = Number(e.target.value)
- }else{
- console.log('buxiangdeng',e.detail.value)
- if(e.detail.value == ''){
- this.carList[index].saleDetailQueryDTO[index1].productCount = this.linshiPrice
- }else if(e.detail.value == 0){
- this.carList[index].saleDetailQueryDTO[index1].productCount = 0
- }else{
- this.carList[index].saleDetailQueryDTO[index1].productCount = Number(e.detail.value);
- }
- this.$forceUpdate()
- }
+ this.carList[index].saleDetailQueryDTO[index1].productCount = e
+ this.$forceUpdate()
this.carChange()
},
numChange(e,index){
- if(this.linshiPrice == e.target.value){
- this.temporaryList[index].productCount = Number(e.target.value)
- }else{
- if(e.detail.value == ''){
- this.temporaryList[index].productCount = this.linshiPrice
- }else if(e.detail.value == 0){
- this.temporaryList[index].productCount = 0
- }else{
- this.temporaryList[index].productCount = Number(e.detail.value);
- }
- this.$forceUpdate()
- }
+ this.temporaryList[index].productCount = e
+ this.$forceUpdate()
this.temporaryChange()
},
allChange(e){
- if(this.linshiPrice == e.target.value){
- this.allChangeNum = e.target.value
- }else{
- if(e.target.value == ''){
- this.allChangeNum = this.linshiPrice
- }else{
- this.allChangeNum = e.target.value
- }
-
- }
+ this.allChangeNum = e
//监听到输入框改变,给所有的都赋值
if(this.isPlusAndMinus == false){
for(var i=0;i 0){
- jishuqi++
- }
- }
- var resultList = []
- if(jishuqi == this.goodsList.length){
- resultList = this.combination(this.goodsList);
- }
this.evalue = []
var value = []
- for (var m = 0; m < resultList.length; m++) {
- var name = ''
- let value1 = "{"
- for (var j = 0; j < resultList[m].length; j++) {
- if(j != resultList[m].length - 1){
- name += resultList[m][j] + '/'
- value1 += '"'+this.dataObj.get(resultList[m][j]) + '":"' + resultList[m][j] + '",'
- }else{
- name += resultList[m][j]
- value1 += '"'+this.dataObj.get(resultList[m][j]) + '":"' + resultList[m][j] + '"'
+ for(let i=0,data=this.goodsDetail.attributeList[0].value;i {
if (res1.code == 200) {
- if (typeof(res1.result) == 'string') {
- let newObj = JSON.parse(res1.result)
+ if (typeof(res1.result.attributeAndValue) == 'string') {
+ let newObj = JSON.parse(res1.result.attributeAndValue)
let newArr = []
let dataArr = []
for (let val in newObj) {
@@ -820,14 +824,20 @@
}
this.focus = false
if(newArr[0].value.length == 1 && newArr[1].value.length == 1){
- console.log('只有一个',newArr)
+ // uni.hideKeyboard()
+ this.keyboard = 'goodsNum'
+ this.keyboardNum = this.goodsNum
+ this.show = true
+ this.oneGoodsName = newArr[0].value[0].value +' | '+ newArr[1].value[0].value
this.oneGoodsSpec = newArr
// this.oneGoodsToCarList(newArr)
this.$refs.goodsNumDialog.open('center')
this.$nextTick(() => {
this.focus = true
})
+ this.getKCList(res1.result.stock);
}else{
+ // newArr[0].value[0].isChecked = true
this.$refs.popup.open('bottom')
this.goodsDetail.attributeList = newArr;
for (var i = 0; i < this.goodsDetail.attributeList.length; i++) {
@@ -855,119 +865,121 @@
oldCheck = false
oldValue = []
}
+ this.getKCList(res1.result.stock);
+ }
+ if(this.temporaryList == ''){
+ this.attrNameChange(0,this.goodsDetail.attributeList[0].value[0].value,0)
}
-
}
-
+
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
- this.getKCList(item.id);
+ await uni.hideLoading()
},
- oneGoodsToCarList(){
+ async oneGoodsToCarList(){
let that = this;
// this.oneGoodsSpec //规格
// this.goodsNum //数量
+ this.show = false
this.evalue = []
var value = []
var name = ''
let value1 = "{"
- name = this.oneGoodsSpec[0].value[0].value + '/' + this.oneGoodsSpec[1].value[0].value
+ name = this.oneGoodsSpec[0].value[0].value + ' | ' + this.oneGoodsSpec[1].value[0].value
value1 += '"'+this.oneGoodsSpec[0].name + '":"' + this.oneGoodsSpec[0].value[0].value + '",'
value1 += '"'+this.oneGoodsSpec[1].name + '":"' + this.oneGoodsSpec[1].value[0].value + '"'
value1 += "}"
value.push(value1)
this.evalue.push(name)
- for (var i = 0; i < value.length; i++) {
- this.attributeList = {
- attributeList: value[i],
- productCount: this.goodsNum,
- productNum:0,
- name: this.evalue[i],
- price: this.goodsDetail.purchasePrice
+ await this.$nextTick(()=>{
+ for (var i = 0; i < value.length; i++) {
+ this.attributeList = {
+ attributeList: value[i],
+ productCount: Number(this.goodsNum),
+ productNum:0,
+ name: this.evalue[i],
+ price: this.goodsDetail.purchasePrice
+ }
+ this.temporaryList = []
+ this.temporaryList.push(this.attributeList);
}
- this.temporaryList.push(this.attributeList);
- }
- let data = {
- id: this.goodsDetail.id,
- price: this.zPrice,
- num: this.zNum,
- categoryId:this.goodsDetail.categoryId,
- productName: this.goodsDetail.productName,
- productSn: this.goodsDetail.productSn,
- productPicture: this.goodsDetail.productPicture,
- supplierName: this.goodsDetail.supplierName,
- saleDetailQueryDTO: this.temporaryList,
- saleDetailQueryDTO1: [],
- wholesalePrice: this.goodsDetail.wholesalePrice,
- lsprice: this.goodsDetail.price
- }
- if (this.carList.length == 0) {
- this.carList.push(data)
- } else {
- let aa = true;
- for (let i = 0; i < this.carList.length; i++) {
- if (this.carList[i].id == data.id) {
- this.carList[i] = data
- aa = false
+ })
+
+ await this.$nextTick(()=>{
+ console.log('pecsList',this.pecsList)
+ for(var i=0;i{
+ let data = {
+ id: this.goodsDetail.id,
+ price: this.zPrice,
+ num: this.zNum,
+ categoryId:this.goodsDetail.categoryId,
+ productName: this.goodsDetail.productName,
+ productSn: this.goodsDetail.productSn,
+ returnPrice:this.goodsDetail.wholesalePrice,
+ productPicture: this.goodsDetail.productPicture,
+ supplierName: this.goodsDetail.supplierName,
+ saleDetailQueryDTO: this.temporaryList,
+ saleDetailQueryDTO1: [],
+ purchasePrice:this.goodsDetail.purchasePrice,
+ wholesalePrice: this.goodsDetail.wholesalePrice,
+ lsprice: this.goodsDetail.price
+ }
+ if (this.carList.length == 0) {
this.carList.push(data)
+ } else {
+ let aa = true;
+ for (let i = 0; i < this.carList.length; i++) {
+ if (this.carList[i].id == data.id) {
+ this.carList[i] = data
+ aa = false
+ }
+ }
+ if (aa) {
+ this.carList.push(data)
+ }
}
- }
+ })
this.$nextTick(()=>{
that.$refs.goodsNumDialog.close()
that.goodsNum = ''
})
-
+ this.$forceUpdate()
},
//库存商品详情
- getKCList(id) {
+ getKCList(list) {
+ console.log('list',list)
this.yanseList = new Map()
this.chimaList = new Map()
- this.tui.request("/app/stock/productCount", "GET", {
- productId: id
- }, false, true).then((res) => {
- if (res.code == 200) {
- this.pecsList = res.result
-
- for(let i=0;i {
- if(key == '颜色'){
- if(this.yanseList.has(attributeList[key]) != true){
- this.yanseList.set(attributeList[key],attributeList[key])
- }
-
- }else{
- if(this.chimaList.has(attributeList[key]) != true){
- this.chimaList.set(attributeList[key],attributeList[key])
- }
- }
- })
- }
- for(let i=0;i {
+ if(key == '颜色'){
+ if(this.yanseList.has(attributeList[key]) != true){
+ this.yanseList.set(attributeList[key],attributeList[key])
}
+
}
- console.log('颜色',this.yanseList)
- console.log('尺码',this.chimaList)
- console.log('颜色',this.goodsDetail)
- } else {
- this.tui.toast(res.message)
+ })
+ }
+ for(let i=0;i {})
- setTimeout(res => {
- uni.hideLoading();
- }, 200)
+ }
},
//未入库遮罩
@@ -986,7 +998,11 @@
this.indexList[i].parentId = false
}
}
- this.categoryId = this.indexList[index].id
+ this.categoryId = this.indexList[index].id
+ this.pageNum = 1
+ this.searchName = ""
+ this.shopList1 = []
+ this.shopList = []
this.getShareList()
},
//临时改价
@@ -995,59 +1011,65 @@
},
//弹窗选择规格后,点击弹窗中选好了按钮
temporaryCheck() {
- if(this.temporaryList == ''){
- this.tui.toast("请选择规格!")
- return;
- }
- let data = {
- id: this.goodsDetail.id,
- price: this.zPrice,
- num: this.zNum,
- categoryId:this.goodsDetail.categoryId,
- productName: this.goodsDetail.productName,
- productSn: this.goodsDetail.productSn,
- productPicture: this.goodsDetail.productPicture,
- supplierName: this.goodsDetail.supplierName,
- saleDetailQueryDTO: this.temporaryList,
- saleDetailQueryDTO1: [],
- wholesalePrice: this.goodsDetail.wholesalePrice,
- lsprice: this.goodsDetail.price
- }
- if (this.carList.length == 0) {
- this.carList.push(data)
- } else {
- let aa = true;
- for (let i = 0; i < this.carList.length; i++) {
- if (this.carList[i].id == data.id) {
- this.carList[i] = data
- aa = false
- }
- }
- if (aa) {
- this.carList.push(data)
- }
- }
-
-
- for (let i = 0; i < this.carList.length; i++) {
- this.carList[i].num = 0
- for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) {
- this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount
- }
- }
-
- this.temporaryList = []
- this.oldTemList = []
- this.purchasePrice = ''
- this.zPrice = ''
- this.zNum = ''
- for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
- this.goodsDetail.attributeList[i].isChecked = false;
- for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
- this.goodsDetail.attributeList[i].value[m].isChecked = false
- }
+ let newList = []
+ for(let i=0;i{
+ let data = {
+ id: this.goodsDetail.id,
+ price: this.zPrice,
+ num: this.zNum,
+ categoryId:this.goodsDetail.categoryId,
+ productName: this.goodsDetail.productName,
+ productSn: this.goodsDetail.productSn,
+ returnPrice:this.goodsDetail.wholesalePrice,
+ productPicture: this.goodsDetail.productPicture,
+ supplierName: this.goodsDetail.supplierName,
+ saleDetailQueryDTO: newList,
+ saleDetailQueryDTO1: [],
+ purchasePrice:this.goodsDetail.purchasePrice,
+ wholesalePrice: this.goodsDetail.wholesalePrice,
+ lsprice: this.goodsDetail.price
+ }
+ if (this.carList.length == 0) {
+ this.carList.push(data)
+ } else {
+ let aa = true;
+ for (let i = 0; i < this.carList.length; i++) {
+ if (this.carList[i].id == data.id) {
+ this.carList[i] = data
+ aa = false
+ }
+ }
+ if (aa) {
+ this.carList.push(data)
+ }
+ }
+
+
+ for (let i = 0; i < this.carList.length; i++) {
+ this.carList[i].num = 0
+ for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) {
+ this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount
+ }
+ }
+
+ this.temporaryList = []
+ this.oldTemList = []
+ this.purchasePrice = ''
+ this.zPrice = ''
+ this.zNum = ''
+ for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
+ this.goodsDetail.attributeList[i].isChecked = false;
+ for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
+ this.goodsDetail.attributeList[i].value[m].isChecked = false
+ }
+ }
+ this.$refs.popup.close()
+ })
},
//删除整条商品
@@ -1074,24 +1096,6 @@
delCarData(index) {
this.temporaryList.splice(index, 1);
this.temporaryChange()
- // uni.showModal({
- // title: "提示",
- // content: "确定删除此条商品吗?",
- // success: function(res) {
- // if(res.confirm){
- // that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name);
- // that.carList.get(id).stockLogList.delete(name)
- // that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get(id).purchasePrice
- // if(that.carList.get(id).stockLogList.size == 0){
- // that.carList.delete(id)
- // }
-
- // that.getAllPrice()
- // }
- // that.$forceUpdate()
- // }
- // })
-
},
//删除商品下的某一个规格
delShopSpec(index, index1) {
@@ -1128,6 +1132,14 @@
checkPay(price) {
this.purchasePrice = price;
this.$refs.inputDialog.close()
+ },
+ keyWordChange(e){
+ if(e.show == false){
+ this.show = false
+ this.keyboardNum = ''
+ this.goodsNum = ''
+ }
+
}
}
}
@@ -1139,9 +1151,7 @@
}
.page1 {
- // display: flex;
- // flex-direction: column;
- height: 92%;
+ height: 100%;
}
.uni-tab__dot {
@@ -1231,15 +1241,19 @@
color: #646566;
}
- .title-box {
- background: #fff;
+ .title-box {
+ background: #fff;
+ position: fixed;
+ top: 0;
+ width: 100%;
+ z-index: 99;
}
.bottom-box {
width: 100%;
height: 120rpx;
- position: fixed;
- bottom: 0;
+ // position: fixed;
+ // bottom: 0;
display: flex;
background: #fff;
z-index: 98;
@@ -1277,13 +1291,14 @@
.content-box {
background: #fff;
flex: 1;
- display: flex;
+ display: flex;
+ overflow: hidden;
}
.content-left {
width: 170rpx;
background: #eee;
- height: 100%;
+ height: auto;
overflow: scroll;
}
@@ -1321,7 +1336,10 @@
.content-right {
flex: 1;
overflow-y: scroll;
- padding-bottom: 100rpx;
+ height: 100%;
+ // padding-bottom: 100rpx;
+ // padding-bottom: 100rpx;
+ // margin-bottom: 80rpx;
}
.right-box {
@@ -1591,5 +1609,8 @@
flex: 1;
text-align: center;
background: linear-gradient(90deg, #60F3FF, #088FEB);
+ }
+ .right-box:last-child{
+ margin-bottom:100rpx;
}
\ No newline at end of file
diff --git a/pages/billing/delivery.vue b/pages/billing/delivery.vue
deleted file mode 100644
index 7029285..0000000
--- a/pages/billing/delivery.vue
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 确定
-
-
-
-
-
-
-
-
-
diff --git a/pages/index/.DS_Store b/pages/index/.DS_Store
index d2d335c..0c5ba65 100644
Binary files a/pages/index/.DS_Store and b/pages/index/.DS_Store differ
diff --git a/pages/index/addHangOrder.vue b/pages/index/addHangOrder.vue
deleted file mode 100644
index 4a28ce9..0000000
--- a/pages/index/addHangOrder.vue
+++ /dev/null
@@ -1,1309 +0,0 @@
-
-
-
-
-
-
-
-
- -
-
- {{item.saleName}}
-
- 编辑
- 语音备注
- 扫码选货
- 开单
-
-
-
- {{item.createByName}}
- {{item.createTime}}
-
-
-
-
-
-
-
- 备注:
- {{item.remark==null?'暂无':item.remark}}
-
-
-
- {{items.productName}}({{items.productSn}})单价:{{items.discountAmount}}
-
-
-
-
-
-
- {{itemss.attributeList | sliceMsg}} * {{itemss.productCount}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 语音识别中...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/index/checkShop.vue b/pages/index/checkShop.vue
index 36e39c6..eaaf860 100644
--- a/pages/index/checkShop.vue
+++ b/pages/index/checkShop.vue
@@ -87,6 +87,7 @@
uni.setStorageSync('shopAddress', res.result.shopAddress)
uni.setStorageSync('shopIcon', res.result.shopIcon)
uni.setStorageSync('type', res.result.userType)
+ uni.setStorageSync('shopId', this.current)
this.tui.toast('切换店铺成功', 2000, true)
setTimeout(() => {
uni.reLaunch({
diff --git a/pages/index/customAndSupplierProductDetail.vue b/pages/index/customAndSupplierProductDetail.vue
index 3daa2ba..ca1d992 100644
--- a/pages/index/customAndSupplierProductDetail.vue
+++ b/pages/index/customAndSupplierProductDetail.vue
@@ -1,34 +1,310 @@
-
-
-
-
-
-
- {{data.createTime}}
- 实际售价:{{data.customerBuyProductDetailLogVos[0].realPrice}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 日期:{{item.createTime | removeStr}}
+
+
+ 操作:{{item.createByName}}
+
+
+
+
+
+ 货号
+ 数量
+ 拿货金额
+ 采购成本
+ 利润
+
+
+
+ {{item1.productSn}}
+ {{item1.productCount == null ?'0':item1.productCount}}
+ {{item1.discountAmount * item1.productCount}}
+ {{userType == 0 && isDownKH == false?(item1.purchasePrice * item1.productCount):'0'}}
+ {{userType == 0 && isDownKH == false?((item1.discountAmount - item1.purchasePrice)*item1.productCount).toFixed(2):0}}
+
+
-
-
- 商品规格
- 数量
+
+
+
+
+
+
+
+
+
+ Hi
+
+
+
+ {{shopName+'对账单'}}
+
+
+
+
+
+ 欢迎查看客户:{{duizhangList.userName == null ?"" : duizhangList.userName}}的对账单
+
+
+
+ {{duizhangList.initialArrears >= 0?'期初欠款':'期初余额'}}
+ {{duizhangList.initialArrears == null ?"0" :Math.abs(duizhangList.initialArrears)}}
+
+
+ {{duizhangList.endArrears >= 0?'期末欠款':'期末余额'}}
+ {{duizhangList.endArrears == null ?"0" :Math.abs(duizhangList.endArrears)}}
+
+
+ {{duizhangList.arrears >= 0?'本期欠款':'本期余额'}}
+ {{duizhangList.arrears == null ?"0" :Math.abs(duizhangList.arrears)}}
+
+
+ 拿货总额
+ {{duizhangList.totalSale == null ?"0" :duizhangList.totalSale}}
+
+
+ 退货总额
+ {{duizhangList.totalReturn == null ?"0" :duizhangList.totalReturn}}
+
+
+
+
-
-
- {{data1.attributeList | sliceMsg}}
+
+
+
+
+
+ {{item.dealingsType == 0 ?"销售开单" :item.dealingsType == 1 ?"退货" :item.dealingsType == 2 ?"回款" :item.dealingsType == 3 && item.amount< 0?"初始余额" :item.dealingsType == 3 && item.amount>= 0?"初始欠款" :item.dealingsType == 4 ?"充值金额" :item.dealingsType == 5 ?"追加欠款" :item.dealingsType == 6 ?"撤销订单" :""}}
+
+
+
+ {{item.createTime | removeStr}}
+
+
+ 操作人:{{item.createByName == null ?"" :item.createByName}}
+
+
+
+
+ 拿货数据~请查收
+
+
+
+
+
+
+ 【销】
+
+ 货号
+
+ 数量
+ 销售价
+ 总价
+
+
+
+
+
+ {{item1.productSn == null ?"" :item1.productSn}}
+
+
+ {{item1.productCount == null ?"0" :item1.productCount}}
+ {{item1.discountAmount == null ?"0" :item1.discountAmount}}
+ {{item1.totalAmount == null ?"0" :item1.totalAmount}}
+
+
+
+
+
+
+
+
+ 【退】
+
+ 货号
+
+
+ 数量
+ 退货价
+ 总价
+
+
+
+
+
+ {{item1.productSn == null ?"" :item1.productSn}}
+
+
+ {{item1.productCount == null ?"0" :item1.productCount}}
+ {{item1.discountAmount == null ?"0" :item1.discountAmount}}
+ {{item1.totalAmount == null ?"0" :item1.totalAmount}}
+
+
+
+
+
+
+
+ 付款明细:
+
+
+
+
+ 销售金额:{{item.totalAmount == null ?"0" :item.totalAmount}}
+
+
+ 退货金额:{{item.returnSaleTotalAmount == null ?"0" :item.returnSaleTotalAmount}}
+
+
+
+ 欠款抵退货:{{item.debtDeductionAmount == null ?"0" :item.debtDeductionAmount}}
+ 销售抵退货:{{item.saleDeductionAmount == null ?"0" :item.saleDeductionAmount}}
+ 余额抵销售:{{item.balanceDeductionAmount == null ?"0" :item.balanceDeductionAmount}}
+
-
- {{data1.productCount}}
+
+ 本单实收:{{item.realAmount == null ?"0" :item.realAmount}}
+ 本单已收:{{item.alreadyEarn == null ?"0" :item.alreadyEarn}}
+
+
+
+
+ 之前欠款
+ {{item.lastDebtAmount == null ?"0" :item.lastDebtAmount}}
+
+
+ 之前余额
+ {{item.lastDebtAmount == null ?"0" :Math.abs(item.lastDebtAmount)}}
+
+
+ {{item.dealingsType == 5?'追加欠款':item.dealingsType == 4?'充值金额':item.dealingsType == 6?'撤销余额':'本单欠款'}}
+ {{item.amount == null ?"0" :item.dealingsType == 5?Math.abs(item.amount):item.amount}}
+
+
+ {{item.dealingsType == 4?'充值金额':item.dealingsType == 6?'撤销欠款':'本单余额'}}
+ {{item.amount == null ?"0" :Math.abs(item.amount)}}
+
+
+ {{item.dealingsType == 6?'撤销后欠款':'本单后欠款'}}
+ {{item.balanceDue == null ?"0" :item.balanceDue}}
+
+
+ {{item.dealingsType == 6?'撤销后余额':'本单后余额'}}
+ {{item.balanceDue == null ?"0" :Math.abs(item.balanceDue)}}
+
+
+
+
+ 对账时间:{{duizhangList.queryDate == null ?"" :duizhangList.queryDate}}
+
+
+ 用快衣店AI,入库、开单更方便
+
+
+
+
+
+
+ 货号:{{item.productSn}}
+
+
+ 名称:{{item.productName}}
+ 总数量:{{item.productCount == undefined ?'0':item.productCount}}
+
+
+
+
+
+ 日期
+ 数量
+ 拿货价
+ 采购价
+ 利润
+
+
+
+ {{item1.createTime | removeStr}}
+ {{item1.productCount}}
+ {{item1.customerBuyProductDetailLogVos[0].realPrice * item1.productCount}}
+ {{userType == 0 && isDownKH == false?item1.customerBuyProductDetailLogVos[0].purchasePrice * item1.productCount:0}}
+ {{userType == 0 && isDownKH == false?((item1.customerBuyProductDetailLogVos[0].realPrice - item1.customerBuyProductDetailLogVos[0].purchasePrice) * item1.productCount).toFixed(2):0}}
+
+
+
+
+
+
+
+
+
+ 日期:{{item.createTime | removeStr}}
+
+
+ 操作:{{item.createByName}}
+
+
+
+
+
+ 货号
+ 数量
+ 退货价
+ 采购价
+
+
+
+ {{items.productSn}}
+ {{item.productCount}}
+ {{items.discountAmount}}
+ {{userType == 0 && isDownKH == false?items.purchasePrice == null?0:items.purchasePrice:0}}
+
+
+
+
+
+
+
+ 采购价:{{item.purchaseDetails[0].purchasePrice?item.purchaseDetails[0].purchasePrice:'暂无'}} 总数量:{{item.purchase.totalAmount?item.purchase.totalAmount:'暂无'}}
+
+
+ 商品规格
+ 总数量
+
+
+
+
+ {{data.attributeList | sliceMsg}}
+
+
+ {{data.productCount}}
-
-
+
+
+
+
+
{{data.createTime}}
- 采购价:{{data.supplierBuyProductDetailLogVos[0].purchasePrice}}
+ 采购价:{{data.supplierBuyProductDetailLogVos[0].purchasePrice}}
@@ -45,9 +321,61 @@
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+ 规格数量详情
+
+
+
+
+ 规格
+ 数量
+
+
+
+ {{item.attributeList | sliceMsg}}
+ {{item.productCount}}
+
+
+
+
+
+
+
+
+
+
+
+ {{detailList.productName}}({{detailList.productSn}})
+
+
+
+
+ 规格
+ 数量
+
+
+
+ {{item.attributeList | sliceMsg}}
+ {{item.productCount}}
+
+
+
+
@@ -56,12 +384,22 @@
data() {
return {
list:[],
+ range:[],
+ GDList:[],
status: 'loadmore',
pages: 1,
pageNum: 1,
userId:'',
+ shopId:'',
+ duizhangRecords:[],
+ detailList:{},
+ duizhangList:{},
type:'',
- userType:''
+ isDownKH:false,
+ userType:uni.getStorageSync('type'),
+ items:['对账单', '拿货(按订单)','拿货(按商品)','退货明细'],
+ current: 1,
+ shopName:""
}
},
filters: {
@@ -74,21 +412,98 @@
}
}
return name;
+ },
+ removeStr(val) {
+ if(val == null){
+ return "";
+ }else{
+ var dotIndex = val.indexOf('.');
+ if (dotIndex !== -1) {
+ return val.substring(0, dotIndex);
+ }
+ return val;
+ }
}
+ },
+ onShareAppMessage() {
+ return {
+ title: '查看对账单详情',
+ imageUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/b28b3d46c21d4f60a334b25f56175cf3.jpg',
+ path: '/pages/index/customAndSupplierProductDetail?popleType=khName&id=' + this.userId + '&shopId=' + this.shopId+ '&shopName=' + this.shopName
+ }
},
onLoad(option) {
+ let that = this;
+ this.getMonth();
this.userId = option.id
- this.userType = uni.getStorageSync('type')
- this.type = option.popleType
+ this.type = option.popleType
+ this.shopName = option.shopName ?option.shopName : uni.getStorageSync('shopName')
+ this.shopId = option.shopId ?option.shopId : uni.getStorageSync('shopId')
+ if(option.shopId && option.shopId != uni.getStorageSync('shopId')){
+ this.isDownKH = true
+ }
this.getList()
},
onReachBottom() {
- if (this.pages >= this.pageNum) return;
+ if (this.pageNum >= this.pages) return;
this.status = 'loading';
- this.pages = ++this.pages;
- this.getList();
+ this.pageNum++;
+ if(this.current == 0){
+ this.duizhangdan()
+ }else{
+ this.getList();
+ }
},
- methods: {
+ methods: {
+ //获取当月1日到当前时间
+ getMonth() {
+ let date = new Date()
+ let year = date.getFullYear().toString() //'年'
+ let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1).toString():(date.getMonth()+1).toString() //'月'
+ let da = date.getDate() < 10 ? '0'+date.getDate().toString():date.getDate().toString() //'日'
+ let end = year + '-' + month + '-' + da //当天
+ let beg = year + '-' + month + '-01' //当月第一天
+ this.range = [beg,end]
+ },
+ duizhangdan(){
+ this.tui.request("/app/bill/getCustomerBill", "post", {
+ customerId:this.userId,
+ pageNum:this.pageNum,
+ pageSize:'10',
+ startDate:this.range[0],
+ endDate:this.range[1],
+ shopId:this.shopId
+ }, false, false).then((res) => {
+ if (res.code == 200) {
+ this.status = 'nomore';
+ if (this.pages == 1) {
+ this.duizhangList = res.result
+ this.duizhangRecords = res.result.customerBillSaleVos.records
+ } else {
+ for(let i=0;i {})
+ },
+ xiaoshouDetail(type,item){
+ if(item){
+ if(type == '1'){
+ this.GDList = item.stockLogList1
+ this.$refs.xsdetailPopup.open()
+ }else if(type == '2'){
+ this.GDList = item.customerBuyProductDetailLogVos
+ this.$refs.xsdetailPopup.open()
+ }else if(type == '3'){
+ this.GDList = item.stockLogList1
+ this.$refs.xsdetailPopup.open()
+ }
+ }
+ },
getList(id) {
this.status = 'loading';
var url,data
@@ -100,11 +515,37 @@
pageNum: this.pageNum
}
}else{
- url = "/app/sale/getCustomerBuyProductLog"
- data = {
- userId: this.userId,
- pageSize: 10,
- pageNum: this.pageNum
+ if(this.current == 1){
+ url = "/app/sale/listPages"
+ data = {
+ userId: this.userId,
+ pageVo: {pageSize: 10, pageNumber: this.pageNum},
+ searchStr: "",
+ startTime:this.range[0],
+ endTime:this.range[1],
+ shopId:this.shopId,
+ fromWhere:1
+ }
+ }else if(this.current == 2){
+ url = "/app/sale/getCustomerBuyProductLog"
+ data = {
+ userId: this.userId,
+ pageSize: 10,
+ startDate:this.range[0],
+ endDate:this.range[1],
+ pageNum: this.pageNum,
+ shopId:this.shopId
+ }
+ }else if(this.current == 3){
+ url = "/app/return/getReturnSaleListByUserId"
+ data = {
+ userId:this.userId,
+ startDate:this.range[0],
+ endDate:this.range[1],
+ pageNum:this.pageNum,
+ pageSize:"10",
+ shopId:this.shopId
+ }
}
}
this.tui.request(url, "post", data, false, false).then((res) => {
@@ -117,12 +558,83 @@
this.list = [...this.list, ...res.result.records]
}
- this.pageNum = res.result.pages
+ this.pages = res.result.pages
+ if(this.current == 1){
+ for(let i=0;i {})
- }
+ },
+ clickDetail(item){
+ this.detailList = item
+ this.$refs.detailPopup.open()
+ },
+ onClickItem(e) {
+ if (this.current !== e.currentIndex) {
+ this.current = e.currentIndex
+ }
+ if(e.currentIndex == 0){
+ this.duizhangList = []
+ this.pageNum = 1
+ this.pages = 1
+ this.duizhangdan()
+ }else if(e.currentIndex == 1){
+ this.list = []
+ this.pageNum = 1
+ this.getList()
+ }else if(e.currentIndex == 2){
+ this.list = []
+ this.pageNum = 1
+ this.getList()
+ }else if(e.currentIndex == 3){
+ this.list = []
+ this.pageNum = 1
+ this.getList()
+ }
+ },
+ searchList() {
+ if(this.current == 0){
+ this.duizhangList = []
+ this.pageNum = 1
+ this.pages = 1
+ this.duizhangdan()
+ }else if(this.current == 1){
+ this.list = []
+ this.pageNum = 1
+ this.getList()
+ }else if(this.current == 2){
+ this.list = []
+ this.pageNum = 1
+ this.getList()
+ }else if(this.current == 3){
+ this.list = []
+ this.pageNum = 1
+ this.getList()
+ }
+ },
},
}
@@ -135,14 +647,10 @@
font-weight: bold;
}
.container {
- padding-bottom: 118rpx;
-
+
.boxbg {
padding-top: 10rpx;
- background-color: #fff;
- margin: 30upx;
- border-radius: 10upx;
- box-shadow: 0px 1px 10px 2px #e2e2e2;
+ background-color: #FAF7F7;
}
.tui-order-item {
@@ -235,7 +743,6 @@
margin-right: 30rpx;
}
.shop-box {
- width: 95%;
margin: 0 auto;
position: relative;
}
@@ -314,10 +821,102 @@
padding-left: 20rpx;
border-bottom: 1px solid #088FEB;
}
+ .shareBtn{
+ background: rgba(255, 255, 255, 0);
+ width: 90rpx;
+ height: 50;
+ height: 80rpx;
+ line-height: 80rpx;
+ border: 1px solid #f3f4f6;
+ background-color: rgba(255,255,255,0);
+ }
+ .shareBtn::after{
+ border: none;
+ }
textarea {
margin: 20rpx;
border: 1px solid #eee;
height: 150rpx;
width: 500rpx;
}
+ .uni-table-scroll {
+ width: 100%;
+ overflow-x: auto;
+ border-radius: 10px;
+ }
+ .uni-table-th{
+ background: #FAE7B5 !important;
+ color: #000 !important;
+ }
+ .top1 {
+ width: 780rpx;
+ height: 390rpx;
+ opacity: 1;
+ background: linear-gradient(360deg, #FAF7F7 0%, rgba(255, 255, 255, 0) 100%);
+ }
+
+ .ai-bot {
+ position: absolute;
+ top: 200rpx;
+ right: 40rpx;
+ width: 90rpx;
+ height: 110rpx;
+ background-size: 100% !important;
+ background: url(https://jewel-shop.oss-cn-beijing.aliyuncs.com/66dc640d9e8f4749a234d9ef2af1b257.png) no-repeat;
+ }
+
+ .hello-box {
+ position: absolute;
+ left: 42rpx;
+ top: 205rpx;
+ width: 220rpx;
+ height: 56rpx;
+
+ .hello-left {
+ width: 102rpx;
+ height: 56rpx;
+ opacity: 1;
+ background: #fff;
+ border-radius: 3px;
+ text-align: center;
+ transform: skewX(8deg);
+ }
+
+ .hello-right {
+ position: absolute;
+ left: 5px;
+ bottom: 0rpx;
+ width: 220rpx;
+ height: 2px;
+ opacity: 1;
+ background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
+ }
+
+ .hello-name {
+ position: absolute;
+ left: 118rpx;
+ top: 0;
+ width: 400rpx;
+ height: 55rpx;
+ font-size: 32rpx;
+ line-height: 55rpx;
+ color: white;
+ overflow: hidden;
+ }
+ }
+
+ .hello-text {
+ position: absolute;
+ top: 275rpx;
+ left: 50rpx;
+ color: #fff;
+ font-size: 28rpx;
+ }
+ .top {
+ width: 780rpx;
+ height: 330rpx;
+ opacity: 1;
+ background: linear-gradient(90deg, #6484fa 0%, #66e8ff 100%);
+ overflow: hidden;
+ }
\ No newline at end of file
diff --git a/pages/index/dataStatistics.vue b/pages/index/dataStatistics.vue
index ff17033..79c71f8 100644
--- a/pages/index/dataStatistics.vue
+++ b/pages/index/dataStatistics.vue
@@ -1,8 +1,8 @@
-
+
-
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ {{item.name == '销售金额'?shopInfo.totalAmount:item.name == '实收金额'?shopInfo.totalAlreadyEarn:item.name == '利润' && type == 0?shopInfo.totalProfit:item.name == '进货金额' && type == 0?shopInfo.purchasingCost:item.name == '退货金额'?shopInfo.returnTotalAmount:item.name == '下单客户'?shopInfo.totalCCount:""}}
+
+
+
@@ -58,19 +72,45 @@
return {
range:[],
shopInfo:{},
- priceList:[],
- type:''
+ type:uni.getStorageSync('type'),
+ dataList:[{
+ name:'销售金额',
+ value:'xiaoshou',
+ icon:'cart',
+ },{
+ name:'实收金额',
+ value:'shishou',
+ icon:'auth'
+ },{
+ name:'利润',
+ value:'lirun',
+ icon:'wallet'
+ },{
+ name:'进货金额',
+ value:'jinhuo',
+ icon:'home'
+ },{
+ name:'退货金额',
+ value:'tuihuo',
+ icon:'refreshempty'
+ },{
+ name:'下单客户',
+ value:'xiadankehu',
+ icon:'staff'
+ }]
};
},
onShow(){
- this.getMonth();
+ if(this.range ==''){
+ this.getMonth();
+ }
this.getSaleInfo();
- this.getList();
- this.type = uni.getStorageSync('type')
},
methods: {
- maskPrice(){
- this.tui.toast('订单实收:' + this.shopInfo.totalAlreadyEarn +'回款:'+ this.shopInfo.totalPayAmount)
+ goDetail(item){
+ uni.navigateTo({
+ url:'/package1/index/statisticsDetail?value='+ item.value + '&range=' + JSON.stringify(this.range)
+ })
},
getSaleInfo() {
this.shopInfo = {}
@@ -90,18 +130,6 @@
})
},
- getList() {
- this.tui.request("/app/sale/getShopMonthData", "POST", {
- startDate:this.range[0],
- endDate:this.range[1]
- }, false, false).then((res) => {
- if (res.code == 200) {
- this.priceList = res.result
- } else {
- this.tui.toast(res.message)
- }
- })
- },
//获取当月1日到当前时间
getMonth() {
let date = new Date()
@@ -114,7 +142,6 @@
},
searchList() {
this.priceList = [];
- this.getList()
this.getSaleInfo()
},
}
@@ -222,4 +249,13 @@
.u-zidingyi:nth-child(4) {
background: linear-gradient(#84C1FF, #C4E1FF) !important;
}
+ .box{
+ width: 100%;
+ height: 100rpx;
+ padding-left: 20rpx;
+ display: flex;
+ line-height: 100rpx;
+ font-size: 34rpx;
+ border-bottom: 1px solid #eee;
+ }
\ No newline at end of file
diff --git a/pages/index/downStearmList.vue b/pages/index/downStearmList.vue
deleted file mode 100644
index 5927d46..0000000
--- a/pages/index/downStearmList.vue
+++ /dev/null
@@ -1,1285 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 暂无图片
-
-
- {{item.productName == null ?'暂无':item.productName}}
- {{item.productSn == null ?'暂无':item.productSn}}
-
-
- {{item.wholesalePrice == null ?'暂无':item.wholesalePrice}}
- 批发价
-
-
- {{item.price == null ?'暂无':item.price}}
- 零售价
-
-
-
-
-
-
-
-
-
-
-
- 已选择
-
- {{carList.length}}
-
-
- 开单
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/index/downarrears.vue b/pages/index/downarrears.vue
index 45d0e2f..af6c5c6 100644
--- a/pages/index/downarrears.vue
+++ b/pages/index/downarrears.vue
@@ -3,7 +3,7 @@
- -
+
-
销售员: {{item.createByName == null ?'暂无':item.createByName}}
@@ -14,7 +14,7 @@
订单状态:{{item.status == 0 ?'待抢单' :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 ?'待配货' :'挂单'}}
- 回款
+
diff --git a/pages/index/downstream.vue b/pages/index/downstream.vue
index 6ddf307..d12833a 100644
--- a/pages/index/downstream.vue
+++ b/pages/index/downstream.vue
@@ -2,20 +2,48 @@
-
-
-
- {{ item.nickname == null ?'暂无':item.nickname}}
-
-
- 欠款总金额:
-
- {{ item.no_earn == null ?'暂无':item.no_earn }}
-
+
+
+
+
+ {{ item.nickname == null ?'暂无':item.nickname}}
+
+
+ 欠款总金额:
+
+ {{ item.no_earn == null ?'暂无':item.no_earn }}
+
+
+
+
+
+ 查看详情
+
+
+ 回款
+
-
+
+
+
+
+
+
+ 充值金额
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
@@ -28,7 +56,9 @@
computed: mapState(['userId', 'shopIndex']),
data() {
return {
- choose: '1',
+ choose: '1',
+ userId:'',
+ showPrice:false,
options1: [{
text: '编辑金额',
style: {
@@ -37,13 +67,56 @@
}],
popupShow: false,
shopName: '',
- list: []
+ list: [],
+ keyboardNum:'',
}
},
onShow() {
this.getList()
},
- methods: {
+ methods: {
+ keyboardConfirm(){
+ this.showPrice = false
+ },
+ keyCancel(){
+ this.showPrice = false
+ this.keyboardNum = ''
+ },
+ // 按键被点击
+ valChange(val) {
+ this.keyboardNum += val
+ },
+ // 退格键被点击
+ backspace(val) {
+ this.keyboardNum = val
+ },
+ huicancel(){
+ this.$refs.inputDialog.close()
+ this.keyboardNum = ''
+ },
+ //回款按钮
+ receivePay(e){
+ this.tui.request('/app/debt/saveOrUpdateDebt', "post", {
+ userId:this.userId,
+ amountOwed:this.keyboardNum,
+ userType:'0'
+ }, false, false).then((res) => {
+ if (res.code == 200) {
+ this.getList()
+ this.tui.toast('操作成功')
+ this.keyboardNum = ''
+ this.$refs.inputDialog.close()
+ }else{
+ this.keyboardNum = ""
+ this.tui.toast(res.message)
+ }
+ })
+ },
+ //打开弹出层
+ toggle(item) {
+ this.userId = item.userId
+ this.$refs.inputDialog.open()
+ },
getList() {
this.tui.request("/app/customer/debt", "POST", {}, false, true).then((res) => {
if (res.code == 200) {
diff --git a/pages/index/home.vue b/pages/index/home.vue
index d6fabb4..bf55cf6 100644
--- a/pages/index/home.vue
+++ b/pages/index/home.vue
@@ -29,7 +29,7 @@
}
} else if(option.khid){
uni.reLaunch({
- url: '/pages/index/downStearmList?khid='+option.khid
+ url: '/package1/index/downStearmList?khid='+option.khid
})
}else {
uni.reLaunch({
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 843b04a..47f66e8 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -2,47 +2,51 @@
-
+
-
-
+
+
待退货
{{waitCount.waitReturnCount > 99 ? '99+' :waitCount.waitReturnCount}}
-
-
+
+
待配货
{{waitCount.waitAddProductCount > 99 ? '99+' :waitCount.waitAddProductCount}}
-
-
+
+
挂单
{{waitCount.registrationCount > 99 ? '99+' :waitCount.registrationCount}}
-
-
+
+
推款
-
-
-
- Ai入库
-
-
+
+
-
-
-
+
+
+
今日营收详情
@@ -52,10 +56,11 @@
销售总金额
-
-
- 今日实收
+
+
+ 今日实收
+
@@ -101,6 +106,9 @@
订单状态:{{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' ?'已完成' :'挂单'}}
+ 撤销
+ 撤销并复制
+
@@ -121,8 +129,8 @@
-
+
-
+
+
-
- -->
+
@@ -166,6 +177,18 @@
X
+
+
+ 今日收款方式统计
+
+
+
+ {{item.payType == 0?'现金收款:':item.payType == 1?'微信收款:':item.payType == 2?'支付宝收款:':item.payType == 3?'银行卡收款:':item.payType == 4?'收款码收款:':''}}{{item.payAmount}}元
+
+
+
@@ -183,8 +206,10 @@
src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
inventoryList: [],
settingShow: false,
- chartData: {},
+ chartData: {},
+ returnList:new Map(),
shopName: '',
+ showDayPrice: false,
opts: {
padding: [15, 10, 0, 15],
dataLabel: true,
@@ -233,36 +258,38 @@
return val;
}
},
- onLoad() {
- let that = this;
- wx.getLocation({
- type: 'gcj02',
- success(res) {
-
- }
- })
- uni.getStorage({
- key: 'shopName',
- success: function (res) {
- that.shopName = res.data
- }
- });
- uni.getStorage({
- key: 'type',
- success: function (res) {
- that.type = res.data
- }
- });
- var today = new Date();
+ onShow() {
+ this.getSaleInfo()
+ },
+ onLoad() {
+ let that = this;
+ wx.getLocation({
+ type: 'gcj02',
+ success(res) {
+
+ }
+ })
+ uni.getStorage({
+ key: 'shopName',
+ success: function(res) {
+ that.shopName = res.data
+ }
+ });
+ uni.getStorage({
+ key: 'type',
+ success: function(res) {
+ that.type = res.data
+ }
+ });
+ var today = new Date();
var day = today.getDate();
//宣传页
- if(uni.getStorageSync('publicize') == day){
-
- }else{
+ if (uni.getStorageSync('publicize') == day) {
+
+ } else {
uni.setStorageSync("publicize", day)
this.$refs.publicizepopup.open('center')
}
- this.getSaleInfo()
},
onTabItemTap(e) {
this.getSaleInfo()
@@ -271,8 +298,174 @@
popClose() {
this.$refs.publicizepopup.close()
},
- getSaleInfo() {
- this.shopInfo = {}
+ //退款接口
+ async getReturnOrder(id) {
+ let that = this;
+ await this.tui.request("/app/return/list", "post", {
+ remark: 3,
+ saleId: id
+ }, false, false).then((res) => {
+ if (res.code == 200 && res.result != null && res.result != undefined) {
+ if (res.result != '') {
+ res.result.forEach(item => {
+ this.tui.request("/app/return/get/" + item.id, "GET", null, false,false).then((res) => {
+ if (res.code == 200 && res.result != null && res.result != undefined) {
+ for(let i=0;i {})
+ })
+ }
+ } else {
+ this.tui.toast(res.message)
+ }
+ })
+ },
+ // 取消订单
+ async cancelOrder(item, type) {
+ let that = this;
+ await this.getReturnOrder(item.id)
+ await this.tui.modal("提示", "您确定要撤销订单吗?", true, (res) => {
+ if (res) {
+ that.cancelSale(item,type)
+ }
+ })
+ },
+ cancelSale(item,type){
+ this.tui.request('/app/sale/cancelSale', "POST", {
+ id:item.id
+ }, true, true).then((res1) => {
+ if (res1.code == 200) {
+ if (type == 'goPay') {
+ this.goSaleGoods(item)
+ } else {
+ this.getSaleInfo()
+ }
+ } else {
+ this.tui.toast(res.message)
+ }
+ }).catch((res1) => {})
+ },
+ // 取消订单
+ getOrderInfoList(item,type) {
+ let that = this;
+ // if(item.status == 0 || item.status == 1){
+ // this.tui.request('/app/sale/status', "POST", {
+ // status: 4,
+ // orderId: item.id
+ // }, true, true).then((res1) => {
+ // if (res1.code == 200) {
+ this.cancelSale(item,type)
+ // } else {
+ // this.tui.toast(res.message)
+ // }
+ // }).catch((res1) => {})
+ // }else{
+ // this.cancelSale(item,type)
+ // }
+ },
+ sliceMsg(val) {
+ var name = ''
+ if (typeof(val) == 'string') {
+ let newObj = JSON.parse(val)
+ for (let as in newObj) {
+ name += newObj[as] + '/'
+ }
+ }
+ return name;
+ },
+ //带参数跳转到开单页
+ goSaleGoods(item) {
+ let dataList = []
+ if(item.saleDetailDTOList == null || item.saleDetailDTOList == ''){
+ item.saleDetailDTOList = []
+ }
+ this.returnList.forEach(function(value, key) {
+ item.saleDetailDTOList.push(value)
+ })
+ if (item.saleDetailDTOList) {
+ for (let i = 0; i < item.saleDetailDTOList.length; i++) {
+
+ let obj = {}
+ let attrMap = new Map()
+ let newSaleDetailDTOList = []
+ let num = 0
+
+ for (let m = 0; m < item.saleDetailDTOList[i].stockLogList1.length; m++) {
+ if (attrMap.has(item.saleDetailDTOList[i].stockLogList1[m].attributeList) == true) {
+ let hasCount = attrMap.get(item.saleDetailDTOList[i].stockLogList1[m].attributeList)
+ newSaleDetailDTOList[hasCount].productCount = Number(newSaleDetailDTOList[hasCount]
+ .productCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount)
+ } else {
+ item.saleDetailDTOList[i].stockLogList1[m].name = this.sliceMsg(item.saleDetailDTOList[i]
+ .stockLogList1[m].attributeList)
+ newSaleDetailDTOList.push(item.saleDetailDTOList[i].stockLogList1[m])
+ attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList, num)
+ num++
+ }
+
+ }
+ obj.saleDetailQueryDTO = newSaleDetailDTOList
+ obj.num = 0
+ 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.productName = item.saleDetailDTOList[i].productName
+ obj.productPicture = item.saleDetailDTOList[i].productPicture + '?time=' + new Date().getTime()
+ obj.productSn = item.saleDetailDTOList[i].productSn
+ obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
+ obj.returnPrice = item.saleDetailDTOList[i].returnPrice
+ obj.saleId = item.id
+ obj.remark = item.remark
+ obj.xsyId = item.createBy
+ obj.createByName = item.createByName
+ dataList.push(obj)
+ }
+ } else {
+ let obj = {}
+ obj.num = 0
+ obj.price = 0
+ obj.saleId = item.id
+ obj.remark = item.remark
+ obj.xsyId = item.createBy
+ obj.createByName = item.createByName
+ dataList.push(obj)
+ }
+ console.log('lastDebtAmount',item.lastDebtAmount)
+ this.$nextTick(()=>{
+ this.tui.request("/app/customer/list", "post", {
+ notBuyDays: "",
+ pageNum: 1,
+ pageSize: 10,
+ searchStr: item.userName,
+ sort: "",
+ }, false, false).then((res) => {
+ if (res.code == 200) {
+ this.returnList = new Map()
+ uni.setStorageSync('khName', JSON.stringify(res.result.records[0]))
+ uni.setStorageSync('carList1', JSON.stringify(dataList))
+ uni.setStorageSync('hangOrder', true)
+ uni.switchTab({
+ url: '/pages/inventory/goodsList1'
+ })
+ }
+ })
+ })
+ },
+ getSaleInfo() {
+ this.shopInfo = {}
this.inventoryList = []
this.tui.request("/app/sale/getShopAll", "POST", {
pageVo: {
@@ -291,6 +484,7 @@
totalProfit: res.result.totalProfit,
returnTotalAmount: res.result.returnTotalAmount,
returnTotalCount: res.result.returnTotalCount,
+ totalAlreadyEarnDetail: res.result.totalAlreadyEarnDetail
}
let dataList = {
categories: this.getWeek(),
@@ -321,18 +515,24 @@
},
goToInfo() {
this.settingShow = true
- },
- //跳转外卖小程序
- quwaimai(){
- uni.openEmbeddedMiniProgram({
- appId: 'wxf5362b6e97ecee2f'
- })
+ },
+ //跳转外卖小程序
+ quwaimai() {
+ uni.openEmbeddedMiniProgram({
+ appId: 'wxf5362b6e97ecee2f'
+ })
},
gotoSearchData() {
uni.navigateTo({
url: '/pages/index/dataStatistics'
})
},
+ showPayType() {
+ this.showDayPrice = true
+ setTimeout(res => {
+ this.showDayPrice = false
+ }, 2000)
+ },
outLogin(e) {
let that = this;
uni.showModal({
@@ -377,7 +577,7 @@
url: '/package1/index/orderDetail?id=' + id
})
},
- //首页头部四个按钮的菜单
+ //首页头部五个按钮的菜单
goSonPage(url) {
if (url == '/pages/index/waitStorage?inStorageStatus=0') {
if (this.type != 0) {
@@ -473,12 +673,12 @@
}
.title-btn-sbtn {
- flex: 1;
- line-height: 40rpx;
- text-align: center;
- position: relative;
- display: flex;
- flex-direction: column;
+ flex: 1;
+ line-height: 40rpx;
+ text-align: center;
+ position: relative;
+ display: flex;
+ flex-direction: column;
font-size: 24rpx;
}
@@ -572,7 +772,7 @@
.publicize-content img {
width: 460rpx;
- height: 460rpx;
+ height: 460rpx;
border-radius: 50px;
}
@@ -595,22 +795,30 @@
.uni-tooltip-popup {
width: 180rpx;
- }
- .waimai{
- position: fixed;
- bottom: 0;
- right: 20rpx;
- background: url(https://jewel-shop.oss-cn-beijing.aliyuncs.com/cda1b75affd349118081f3880f815a0f.jpg) no-repeat;
- background-size: 100%;
- width: 130rpx;
- height: 130rpx;
- margin: 0 auto 10rpx;
- z-index: 999;
- }
-
- .title-img{
- width: 60rpx;
- height: 60rpx;
- margin: 0 auto;
+ }
+
+ .waimai {
+ position: fixed;
+ bottom: 0;
+ right: 20rpx;
+ background: url(https://jewel-shop.oss-cn-beijing.aliyuncs.com/cda1b75affd349118081f3880f815a0f.jpg) no-repeat;
+ background-size: 100%;
+ width: 130rpx;
+ height: 130rpx;
+ margin: 0 auto 10rpx;
+ z-index: 999;
+ }
+
+ .title-img {
+ width: 60rpx;
+ height: 60rpx;
+ margin: 0 auto;
+ }
+
+ .floatRight {
+ float: right;
+ padding: 14rpx;
+ color: $u-primary;
+ font-size: 26upx;
}
\ No newline at end of file
diff --git a/pages/index/shareStyle.vue b/pages/index/shareStyle.vue
index d8bf785..55b0fbf 100644
--- a/pages/index/shareStyle.vue
+++ b/pages/index/shareStyle.vue
@@ -1,57 +1,56 @@
-
+
-
-
-
- {{item.categoryName}}
-
+
+
+ {{item.categoryName}}
-
-
-
-
-
-
- 暂无图片
+
+
+
+
+
+
+
+ 暂无图片
+
+
+
+ {{item.productName}}
+ (已下架)
-
-
- {{item.productName}}
- (已下架)
+ {{item.productSn}}
+
+
+ {{item.purchasePrice?item.purchasePrice:'暂无'}}
+ 采购价
- {{item.productSn}}
-
-
- {{item.purchasePrice?item.purchasePrice:'暂无'}}
- 采购价
-
-
- {{item.wholesalePrice}}
- 批发价
-
-
- {{item.price}}
- 零售价
-
-
- {{item.stockCount}}
- 库存
-
+
+ {{item.wholesalePrice}}
+ 批发价
+
+
+ {{item.price}}
+ 零售价
+
+
+ {{item.stockCount}}
+ 库存
-
-
-
-
-
+
+
+
+
+
+
@@ -126,7 +125,8 @@
return {
indexList: [],
pageNum: 1, //分页的页码
- shopList: [],
+ shopList: [],
+ shopList1: [],
info: 0,
goodsList: [],
categoryId: '', //分类id
@@ -147,6 +147,13 @@
created() {
uni.hideHomeButton() //左上角HOME按钮
},
+ onReachBottom() {
+ console.log("触底")
+ if (this.pageNum >= this.pages) return;
+ // this.status = 'loading';
+ this.pageNum ++;
+ this.getShareList();
+ },
onShareTimeline() {
return {
title: '查看我的推荐',
@@ -162,15 +169,15 @@
}
},
onLoad(options) {
- wx.updateShareMenu({
- withShareTicket: true,
- isPrivateMessage:true,
- success () { }
- })
+ // wx.updateShareMenu({
+ // withShareTicket: true,
+ // isPrivateMessage:true,
+ // success () { }
+ // })
this.height = wx.getSystemInfoSync().windowHeight
if (options.khid != undefined) {
uni.redirectTo({
- url: "/pages/index/downStearmList?khid=" + options.khid
+ url: "/package1/index/downStearmList?khid=" + options.khid
})
}else{
this.type = uni.getStorageSync('type')
@@ -180,41 +187,39 @@
},
methods: {
//初始化获取分类列表
- async getGategoryList() {
- this.shopList = []
- this.indexList = []
- await this.tui.request("/app/productCategory/list", "get", {}, false, true).then((res) => {
- if (res.code == 200) {
- this.indexList = res.result;
- for (var i = 0; i < this.indexList.length; i++) {
- if (i == 0) {
- this.indexList[i].parentId = true
- } else {
- this.indexList[i].parentId = false
- }
- let data = {
- categoryId: this.indexList[i].id
+ getGategoryList() {
+ this.tui.request("/app/productCategory/list", "get", {
+ // shopId: 1,
+ }, false, true).then((res) => {
+ if (res.code == 200) {
+ this.indexList = res.result;
+ for (var i = 0; i < this.indexList.length; i++) {
+ if (i == 0) {
+ this.indexList[i].parentId = true
+ } else {
+ this.indexList[i].parentId = false
}
- this.shopList.push(data)
- this.categoryId = this.indexList[i].id
- this.getShareList(this.indexList[i].id)
-
- }
- } else {
- this.tui.toast(res.message)
+ }
+ this.categoryId = this.indexList[0].id
+ this.pageNum = 1
+ this.searchName = ""
+ this.shopList1 = []
+ this.shopList = []
+ this.getShareList();
+ } else {
+ this.tui.toast(res.message)
}
-
}).catch((res) => {})
},
//点击分类获取商品列表
- async getShareList(id) {
+ async getShareList(type) {
let that = this
this.goodsList = []
await this.tui.request("/app/product/getShareList", "POST", {
categoryId: this.searchName == ""?this.categoryId:"",
searchStr: this.searchName,
pageNum: this.pageNum,
- pageSize: '100'
+ pageSize: '10'
}, false, false).then((res) => {
if (res.code == 200) {
for(var i = 0; i < res.result.records.length; i++){
@@ -223,21 +228,25 @@
}
}
this.$nextTick(()=>{
- if(this.searchName == ""){
- for (var i = 0; i < that.shopList.length; i++) {
- if(res.result.records != []){
- if(that.shopList[i].categoryId == res.result.records[0].categoryId){
- that.shopList[i] = res.result.records
- }
- }else{
- that.shopList[i] = []
- }
-
+ if(type=='search'){
+ this.shopList = []
+ this.status = 'nomore';
+ if (this.pages == 1) {
+ this.shopList1 = res.result.records
+ } else {
+ this.shopList1 = [...this.shopList1, ...res.result.records]
}
+ this.pages = res.result.pages
}else{
- that.shopList.push(res.result.records)
+ this.shopList1 = []
+ this.status = 'nomore';
+ if (this.pages == 1) {
+ this.shopList = res.result.records
+ } else {
+ this.shopList = [...this.shopList, ...res.result.records]
+ }
+ this.pages = res.result.pages
}
- that.goodsList = that.shopList[0]
})
@@ -248,15 +257,14 @@
await this.getCheck()
},
//顶部搜索框
- search(res) {
- this.shopList = []
- this.indexList = []
- this.searchName = res.value
-
- if(res.value == ''){
- this.getGategoryList()
- }else{
+ search(e) {
+ if(e.value == ''){
+ this.searchName = ""
this.getShareList()
+ }else{
+ this.searchName = e.value
+ this.getShareList('search')
+
}
},
clearSearch(){
@@ -277,15 +285,16 @@
}else{
for (var i = 0; i < that.carList.length; i++) {
for (var m = 0; m < that.shopList.length; m++) {
- for (var j = 0; j < that.shopList[m].length; j++) {
- if(that.carList[i] == that.shopList[m][j].id){
- that.shopList[m][j].checked = true
+ // for (var j = 0; j < that.shopList[m].length; j++) {
+ if(that.carList[i] == that.shopList[m].id){
+ that.shopList[m].checked = true
}
- }
+ // }
}
}
}
}
+ console.log(this.shopList)
this.$forceUpdate()
},
//未入库遮罩
@@ -297,22 +306,23 @@
},
//点击左侧菜单切换
clickLeftBtn(index) {
- for (var i = 0; i < this.indexList.length; i++) {
- if (i == index) {
- this.indexList[i].parentId = true
- } else {
- this.indexList[i].parentId = false
- }
+ for (var i = 0; i < this.indexList.length; i++) {
+ if (i == index) {
+ this.indexList[i].parentId = true
+ } else {
+ this.indexList[i].parentId = false
+ }
}
- this.categoryId = this.shopList[index].id
- this.goodsList = this.shopList[index]
- this.getCheck()
+ this.categoryId = this.indexList[index].id
+ this.pageNum = 1
+ this.searchName = ""
+ this.shopList1 = []
+ this.shopList = []
+ this.getShareList(this.indexList[index].id)
},
//选中商品
checkboxChange(item) {
-
- item.checked = !item.checked
-
+ item.checked = !item.checked
if (this.carList.indexOf(item.id) != -1) {
this.carList.splice(this.carList.indexOf(item.id), 1)
} else {
@@ -334,10 +344,9 @@
}
}
- }
- console.log('点击',this.shopList)
- console.log('点击',this.carList)
- console.log('点击',this.gwcList)
+ }
+ console.log('gwcList',this.gwcList)
+ console.log('carList',this.carList)
},
//点击分享按钮
clickShareBtn(e) {
@@ -426,7 +435,7 @@
.page1 {
display: flex;
flex-direction: column;
- height: 92%;
+ height: 100%;
}
.uni-tab__dot {
@@ -543,7 +552,8 @@
}
.content-right {
- flex: 1;
+ flex: 1;
+ height: 100%;
overflow-y: scroll;
}
diff --git a/pages/index/upstream.vue b/pages/index/upstream.vue
index 7ebf9a2..6ce1b45 100644
--- a/pages/index/upstream.vue
+++ b/pages/index/upstream.vue
@@ -2,18 +2,48 @@
-
-
-
- {{ item.supplierName == null ?'暂无':item.supplierName }}
-
-
- 欠款总金额:
- {{ item.noPay == null ?'暂无':item.noPay }}
-
-
+
+
+
+
+ {{ item.supplierName == null ?'暂无':item.supplierName}}
+
+
+ 欠款总金额:
+
+ {{ item.noPay == null ?'暂无':item.noPay }}
+
+
+
+
+
+ 查看详情
+
+
+ 回款
+
+
+
-
+
+
+
+
+
+
+ 充值金额
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
@@ -26,7 +56,10 @@
computed: mapState(['userId', 'shopIndex']),
data() {
return {
- choose: '1',
+ choose: '1',
+ keyboardNum:'',
+ userId:'',
+ showPrice:false,
options1: [{
text: '编辑金额',
style: {
@@ -59,6 +92,48 @@
uni.navigateTo({
url: `/pages/index/uparrears?supplierId=${target.supplierId}&consigneeName=${target.supplierName}`
})
+ },
+ keyboardConfirm(){
+ this.showPrice = false
+ },
+ keyCancel(){
+ this.showPrice = false
+ this.keyboardNum = ''
+ },
+ // 按键被点击
+ valChange(val) {
+ this.keyboardNum += val
+ },
+ // 退格键被点击
+ backspace(val) {
+ this.keyboardNum = val
+ },
+ huicancel(){
+ this.$refs.inputDialog.close()
+ this.keyboardNum = ''
+ },
+ //回款按钮
+ receivePay(e){
+ this.tui.request('/app/debt/saveOrUpdateDebt', "post", {
+ userId:this.userId,
+ amountOwed:this.keyboardNum,
+ userType:'1'
+ }, false, false).then((res) => {
+ if (res.code == 200) {
+ this.getList()
+ this.tui.toast('操作成功')
+ this.keyboardNum = ''
+ this.$refs.inputDialog.close()
+ }else{
+ this.keyboardNum = ""
+ this.tui.toast(res.message)
+ }
+ })
+ },
+ //打开弹出层
+ toggle(item) {
+ this.userId = item.supplierId
+ this.$refs.inputDialog.open()
}
}
}
diff --git a/pages/index/waitStorage.vue b/pages/index/waitStorage.vue
index 58bdde9..0d1e772 100644
--- a/pages/index/waitStorage.vue
+++ b/pages/index/waitStorage.vue
@@ -1,7 +1,7 @@
-
+
@@ -79,6 +79,16 @@
}
},
methods: {
+ searchTime(res){
+ console.log(res)
+ if(res == ''){
+ this.range = []
+ }
+ this.pages = 1;
+ this.pageNum = 1;
+ this.list = [];
+ this.getList()
+ },
searchList(res) {
this.searchStr = res.value
this.pages = 1;
diff --git a/pages/index/waitStorageDetail.vue b/pages/index/waitStorageDetail.vue
index e0735ed..c2fdca4 100644
--- a/pages/index/waitStorageDetail.vue
+++ b/pages/index/waitStorageDetail.vue
@@ -9,22 +9,19 @@
暂无图片
- {{item.productName == null ?'暂无':item.productName}}
- 货号:{{item.productSn == null ?'暂无':item.productSn}}
+ {{item.productName == null ?'暂无':item.productName}}({{item.productSn == null ?'暂无':item.productSn}})
+
+ 采购价:
+
- 单价:{{item.purchasePrice == null ?'暂无':item.purchasePrice}}
- 数量:{{item.productCount == null ?'暂无':item.productCount}}
- 总价:{{(item.productCount*item.purchasePrice)== null?'暂无':(item.productCount*item.purchasePrice)}}
+ 数量: {{item.productCount == null ?'暂无':item.productCount}}
+ 总价:{{(item.productCount*item.purchasePrice)== null?'暂无':(item.productCount*item.purchasePrice)}}
-
- 批发价:
- 零售价:
+
+ 批发价:
+ 零售价:
-
- 维护采购价
-
@@ -128,7 +125,7 @@
-
@@ -191,14 +188,19 @@
if (res.code == 200) {
for(let i = 0;i
@@ -523,6 +550,7 @@
.shop-productName view {
height: 55rpx;
+ line-height: 55rpx;
}
.shop-collapse {
diff --git a/pages/inventory/.DS_Store b/pages/inventory/.DS_Store
index 46e298b..92d9e12 100644
Binary files a/pages/inventory/.DS_Store and b/pages/inventory/.DS_Store differ
diff --git a/pages/inventory/AIInventory.vue b/pages/inventory/AIInventory.vue
deleted file mode 100644
index c5dbed1..0000000
--- a/pages/inventory/AIInventory.vue
+++ /dev/null
@@ -1,2390 +0,0 @@
-
-
-
-
-
-
- 供应商
-
-
-
-
-
-
-
-
-
- 扫一扫
-
-
-
- 添加商品
-
-
-
-
-
-
-
-
- 新
-
-
-
-
-
-
-
- 删除
- 合并
-
-
-
-
-
-
- {{value[1].productCount}}
-
-
- 品名:
-
-
-
- 货号:
-
-
-
- 分类: {{value[1].categoryName==null?'':value[1].categoryName}}
-
-
-
- 单价:
-
-
- 批发价:
- 零售价:
-
-
- 添加规格
-
-
-
-
-
-
-
-
-
-
- {{numData(values[0])[0]}}
-
-
- {{numData(values[0])[1]}}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 应付金额
-
-
-
-
-
- 已付金额
-
-
-
-
-
- 欠款
-
-
-
-
-
- 其他费用
-
-
-
-
-
- 备注
-
-
-
-
-
-
-
-
-
-
- 合计:{{totalAmount}}
- ¥{{shouldPay}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/inventory/addinventory.vue b/pages/inventory/addinventory.vue
deleted file mode 100644
index cde66c4..0000000
--- a/pages/inventory/addinventory.vue
+++ /dev/null
@@ -1,1665 +0,0 @@
-
-
-
-
-
-
- 供应商
-
-
-
-
-
-
-
-
-
- 扫一扫
-
-
-
- 添加商品
-
-
-
-
-
-
-
-
-
- {{value[1].productName}} ({{value[1].productSn}})
- 单价:{{value[1].purchasePrice || 0}} 数量:{{value[1].productCount}}
- 总价:{{value[1].price}}
-
- 批发价:
- 零售价:
-
-
-
-
-
-
-
-
-
- {{values[0] | sliceMsg}}
-
-
- 数量:
-
-
-
- 添加规格
-
-
- 维护采购价
-
-
-
-
-
-
-
-
-
-
-
- 应付金额
-
-
-
-
-
- 已付金额
-
-
-
-
-
- 欠款
-
-
-
-
-
- 其他费用
-
-
-
-
-
- 备注
-
-
-
-
-
-
-
-
-
- 合计:{{totalAmount}}
- ¥{{shouldPay}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/inventory/changeGoods1.vue b/pages/inventory/changeGoods1.vue
index 873ef82..c447d0d 100644
--- a/pages/inventory/changeGoods1.vue
+++ b/pages/inventory/changeGoods1.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -9,78 +9,77 @@
@confirm="search" @blur="search" @clear="clearSearch" />
-
-
-
- {{item.categoryName}}
-
+
+
+ {{item.categoryName}}
-
-
-
-
-
-
- 暂无图片
-
-
- {{item.productName}}
- {{item.productSn}}
-
-
- {{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
- 采购价
-
-
- {{item.wholesalePrice}}
- 批发价
-
-
- {{item.price}}
- 零售价
-
-
- {{item.stockCount}}
- 库存
-
+
+
+
+
+
+
+
+ 暂无图片
+
+
+ {{item.productSn}}
+ {{item.productName}}
+
+
+ {{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
+ 采购价
+
+
+ {{item.wholesalePrice}}
+ 批发价
+
+
+ {{item.price}}
+ 零售价
+
+
+ {{item.stockCount}}
+ 库存
+
+
+
+
+
+
+
+ 暂无图片
-
-
-
-
-
- 暂无图片
-
-
- {{item.productName}}
- {{item.productSn}}
-
-
- {{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
- 采购价
-
-
- {{item.wholesalePrice}}
- 批发价
-
-
- {{item.price}}
- 零售价
-
-
- {{item.stockCount}}
- 库存
-
+
+ {{item.productName}}
+ {{item.productSn}}
+
+
+ {{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
+ 采购价
+
+
+ {{item.wholesalePrice}}
+ 批发价
+
+
+ {{item.price}}
+ 零售价
+
+
+ {{item.stockCount}}
+ 库存
-
-
+
+
+
@@ -155,7 +154,16 @@
{{item.name}} {{item.productNum==null?'无库存':item.productNum}}
-
+
+
+
+ -
+
+
+
+ +
+
+
@@ -201,8 +209,17 @@
{{item1.attributeList | sliceMsg}}
-
+
+
+
+ -
+
+
+
+ +
+
+
@@ -241,7 +258,8 @@
carList: [],
columns: [],
keyList: [],
- evalue: [],
+ evalue: [],
+ show: false,
attributeList: {},
purchasePrice: "",
zPrice: 0,
@@ -287,6 +305,12 @@
},
onShow() {
this.getGategoryList()
+ },
+ onReachBottom() {
+ if (this.pageNum >= this.pages) return;
+ // this.status = 'loading';
+ this.pageNum ++;
+ this.getShareList();
},
methods: {
//初始化获取分类列表
@@ -481,9 +505,9 @@
value.push(value1)
this.evalue.push(name)
}
-
if(jishuqi == 0){
this.oldTemList = []
+ this.temporaryList = this.pageOldTemList
}
if(this.temporaryList.length == 0){
if(jishuqi == this.goodsList.length){
@@ -556,7 +580,6 @@
}
}
})
-
if(jishuqi != this.goodsList.length){
if(this.oldTemList.length ==0 && this.pageOldTemList.length ==0){
this.newTemList = []
@@ -595,8 +618,8 @@
data = {
categoryId: "",
searchStr: this.searchName,
- pageNum: this.pageNum,
- pageSize: '100'
+ pageNum: 1,
+ pageSize: '10'
}
}else{
this.gateType = ''
@@ -604,17 +627,29 @@
categoryId: this.categoryId,
searchStr: this.searchName,
pageNum: this.pageNum,
- pageSize: '100'
+ pageSize: '10'
}
}
this.tui.request("/app/product/getShareList", "POST", data, false, false).then((res) => {
if (res.code == 200) {
if(type=='search'){
this.shopList = []
- this.shopList1 = res.result.records
+ this.status = 'nomore';
+ if (this.pages == 1) {
+ this.shopList1 = res.result.records
+ } else {
+ this.shopList1 = [...this.shopList1, ...res.result.records]
+ }
+ this.pages = res.result.pages
}else{
this.shopList1 = []
- this.shopList = res.result.records
+ this.status = 'nomore';
+ if (this.pages == 1) {
+ this.shopList = res.result.records
+ } else {
+ this.shopList = [...this.shopList, ...res.result.records]
+ }
+ this.pages = res.result.pages
}
} else {
this.tui.toast(res.message)
@@ -685,8 +720,8 @@
categoryId: this.goodsDetail.attrId
}, false, true).then((res1) => {
if (res1.code == 200) {
- if (typeof(res1.result) == 'string') {
- let newObj = JSON.parse(res1.result)
+ if (typeof(res1.result.attributeAndValue) == 'string') {
+ let newObj = JSON.parse(res1.result.attributeAndValue)
let newArr = []
let dataArr = []
for (let val in newObj) {
@@ -751,24 +786,23 @@
}
}
-
+ this.getKCList(res1.result.stock);
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
- this.getKCList(item.id);
},
//库存商品详情
- getKCList(id) {
- this.tui.request("/app/stock/productCount", "GET", {
- productId: id
- }, false, true).then((res) => {
- if (res.code == 200) {
- this.pecsList = res.result
- } else {
- this.tui.toast(res.message)
- }
- }).catch((res) => {})
+ getKCList(list) {
+ // this.tui.request("/app/stock/productCount", "GET", {
+ // productId: id
+ // }, false, true).then((res) => {
+ // if (res.code == 200) {
+ this.pecsList = list
+ // } else {
+ // this.tui.toast(res.message)
+ // }
+ // }).catch((res) => {})
setTimeout(res => {
uni.hideLoading();
}, 200)
@@ -789,20 +823,56 @@
this.searchName = ''
this.getShareList()
},
+ chenumChange(e,index,index1){
+
+ if(this.linshiPrice == e.target.value){
+ this.carList[index].saleDetailQueryDTO[index1].productCount = Number(e.target.value)
+ }else{
+ if(e.detail.value == ''){
+ this.carList[index].saleDetailQueryDTO[index1].productCount = Number(this.linshiPrice)
+ }else if(e.detail.value == 0){
+ this.carList[index].saleDetailQueryDTO[index1].productCount = 0
+ }else{
+ this.carList[index].saleDetailQueryDTO[index1].productCount = Number(e.detail.value);
+ }
+ this.$forceUpdate()
+ }
+ this.carChange()
+ },
+ numChange(e,index){
+ if(this.linshiPrice == e.target.value){
+ this.temporaryList[index].productCount = Number(e.target.value)
+ }else{
+ if(e.detail.value == ''){
+ this.temporaryList[index].productCount = Number(this.linshiPrice)
+ }else if(e.detail.value == 0){
+ this.temporaryList[index].productCount = 0
+ }else{
+ this.temporaryList[index].productCount = Number(e.detail.value);
+ }
+ this.$forceUpdate()
+ }
+ this.temporaryChange()
+ },
+ oneMinusNum(index){
+ this.temporaryList[index].productCount --
+ this.temporaryChange()
+ },
+ onePlusNum(index){
+ this.temporaryList[index].productCount ++
+ this.temporaryChange()
+ },
obtainPrice(e,type,index,index1){
- // console.log("获得焦点",e)
this.linshiPrice = e.target.value
- console.log('12121',this.linshiPrice)
if(type=='zongjishu'){
this.allChangeNum = ''
+ }else if(type=='danjishu'){
+ this.temporaryList[index].productCount = ''
+ this.$forceUpdate()
+ }else if(type=='chejishu'){
+ this.carList[index].saleDetailQueryDTO[index1].productCount = ''
+ this.$forceUpdate()
}
- // else if(type=='danjishu'){
- // this.temporaryList[index].productCount = ''
- // this.$forceUpdate()
- // }else if(type=='chejishu'){
- // this.carList[index].saleDetailQueryDTO[index1].productCount = ''
- // this.$forceUpdate()
- // }
},
//未入库遮罩
clickMask(item) {
@@ -1139,7 +1209,8 @@
}
.content-right {
- flex: 1;
+ flex: 1;
+ height: 100%;
overflow-y: scroll;
}
diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue
index 61d82f7..ee1b6ce 100644
--- a/pages/inventory/goodsList1.vue
+++ b/pages/inventory/goodsList1.vue
@@ -17,14 +17,19 @@
-
+
扫一扫
+
+
+
+ 新增商品
+ style="width: 33.33%;text-align: center;line-height: 70rpx;border-left: 1px solid #eee;">
- 添加商品
+ 选库存
@@ -37,8 +42,7 @@
AI开单
-
- 未入库规格不显示
+ 点击使用AI语音去开单
@@ -49,35 +53,117 @@
-
-
- 暂无图片
-
- {{value[1].productName}} ({{value[1].productSn}})
- ¥{{value[1].discountAmount}} * {{value[1].productCount}} 总价:{{value[1].price}}
-
- 供应商:{{value[1].supplierName}}
-
-
- 改价
-
-
- 添加规格
+
+ 新
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+ 上传多图
+
+ {{value[1].productPictures.length}}
+
+
-
-
-
-
-
+
+
+
+ 品名:
+
+
+ 货号:
+
+
+
+ 分类: {{value[1].categoryName==null?'':value[1].categoryName}}
+
+
+
+ 单价:
+
+
+ 数量:
+ {{value[1].productCount}}
+
+ 总价:
+ {{value[1].price}}
+
+
+
+
+
+
+
+ 语音录入
+
+
+ 添加规格
+
+
+ 上次价格
+
+
+
+ 暂无图片
+
+ {{value[1].productName == null?'':value[1].productName}} ({{value[1].productSn}})
+
+ 销售价:{{value[1].discountAmount}} 数量: {{value[1].productCount}}
+
+
+ 总价:{{value[1].price}}
+
+
+ 退货价:{{value[1].returnPrice}} 退货数: {{value[1].returnCount}}
+
+
+
+
+ 改价
+
+
+ 添加规格
+
+
+ 上次价格
+
+
+ 移除商品
+
@@ -129,9 +215,16 @@
{{values[1].productNum == null ?'无库存':values[1].productNum}}
-
-
+
+
+
+ -
+
+
+
+ +
+
+
@@ -178,7 +271,18 @@
-
+
+
+
+ 客户:{{khName.name?khName.name:''}}
+
+
+ 之前欠款:{{zhiqianqiankuan}}
+
+
+ 客户余额:{{Math.abs(zhiqianqiankuan)}}
+
+
支付类型
- 销售总额
+ 销售金额
-
+
-
- 退货金额
+
+ 退货金额
-
-
- 实收金额
-
-
-
-
-
- 已收金额
-
-
-
-
-
- 欠款
-
-
-
-
-
- 其他费用
-
-
-
+
+
+ 应收金额
+
+
+
+
+
+ 已收金额
+
+
+
+
+ 不退款
+
+
+
+ *已收金额为负,默认您已为客户退款,如不退款请更改已收金额
+
+
+ 查看更多
+
+
+
+
+
+ 欠款抵退货
+
+
+
+
+
+ 余额抵扣
+
+
+
+
+
+ 销售抵退货
+
+
+
+
+
+ 累计欠款
+
+
+
+
+
+ 累计余额
+
+
+
+
+
+
+ 本次欠款
+
+
+
+
+
+ 本次余额
+
+
+
+
+
+ 其他费用
+
+
+
+
备注
@@ -243,7 +397,7 @@
@@ -317,12 +471,13 @@
- 合计:{{totalAmount}}
- ¥{{shouldPay == null ?0:shouldPay}}
+ 销售:{{totalAmount}}件
+ 退货:{{returnTotalAmount}}件
+
-
-
+
+
@@ -337,24 +492,44 @@
-
-
+
+
+
+
@@ -373,21 +548,42 @@
@@ -465,15 +670,15 @@
-
-
+
+
+
+
@@ -566,22 +872,69 @@
{{item.value}}
+ @tap="changeSpec(item.value)">{{item.value}}
+
+
+
+
+
+
+ 确认修改
- 貌似没有检测到您上次的语音录入信息,正在反复识别中
+
+
+
+
+
+ 实收金额计算方式
+
+ {{methodText}}
+
+
+ 貌似没有检测到您上次的语音录入信息,正在反复识别中...
+
+
+
+
+
+
+
+
+
+
+
+
+ 更换图片
+
+