wangfukang 3 years ago
parent
commit
e7fee6fc32
  1. 14
      pages/billing/addUser.vue
  2. 1
      pages/index/checkShop.vue
  3. 53
      pages/index/home.vue
  4. 30
      pages/index/index.vue
  5. 3
      pages/index/order.vue
  6. 24
      pages/index/orderDetail.vue
  7. 8
      pages/index/peopleList.vue
  8. 28
      pages/inventory/AIInventory.vue
  9. 4
      pages/inventory/addinventory.vue
  10. 12
      pages/inventory/changeGoods1.vue
  11. 28
      pages/inventory/goodsList1.vue
  12. 5
      pages/inventory/inventory.vue
  13. 6
      pages/inventory/inventoryDetail.vue
  14. 22
      pages/rebate/rebate.vue
  15. 53
      pages/rebate/withdrawal.vue

14
pages/billing/addUser.vue

@ -122,16 +122,16 @@
methods: {
//获取手机通讯录
getUserPhone() {
console.log("aaaaa")
let that = this;
wx.chooseContact({
success: function(res) {
console.log(res)
that.formData.consigneeMobile = res.phoneNumber
that.formData.consigneeName = res.displayName
},
fail(res) {
console.log(res, '错误回调')
}
})
},
@ -188,11 +188,11 @@
this.openPicker()
} else if (res.authSetting['scope.userLocation'] === undefined) {
/* 用户未授权时走这里 */
console.log('没有授权')
this.handleOpenSetting()
} else {
/* 用户拒绝了授权后走这里 */
console.log('拒绝了授权 false')
this.handleOpenSetting()
}
},
@ -201,7 +201,7 @@
handleOpenSetting() {
wx.openSetting({
success: (res) => {
console.log('定位 openSetting', res)
if (res.authSetting["scope.userLocation"]) {
this.openPicker()
}
@ -224,7 +224,7 @@
}
},
fail: function(res) {
console.log(res)
}
});
},

1
pages/index/checkShop.vue

@ -188,7 +188,6 @@
},
//切换店铺
onActionItemClick(item) {
console.log(item)
if(this.type == 'wuliu'){
this.current = item.id
this.name = item.companyName

53
pages/index/home.vue

@ -1,33 +1,30 @@
<template>
</template>
<template>
<view></view>
</template>
<script>
export default {
data() {
return {
}
export default {
created(){
if (uni.getStorageSync('hiver_token')) {
if (uni.getStorageSync('wayValue') == 1) {
uni.reLaunch({
url: '/package1/other/logistics'
})
} else if (uni.getStorageSync('wayValue') == 0) {
uni.reLaunch({
url: '/pages/index/index'
})
} else if (uni.getStorageSync('wayValue') == 2) {
uni.reLaunch({
url: '/package1/other/custom'
})
}
}
},
onLoad(option) {
uni.showLoading({
title: '加载中...'
})
if (uni.getStorageSync('hiver_token')) {
if (uni.getStorageSync('wayValue') == 1) {
uni.reLaunch({
url: '/package1/other/logistics'
})
} else if (uni.getStorageSync('wayValue') == 0) {
uni.reLaunch({
url: '/pages/index/index'
})
} else if (uni.getStorageSync('wayValue') == 2) {
uni.reLaunch({
url: '/package1/other/custom'
})
}
} else if(option.khid){
if(option.khid){
uni.reLaunch({
url: '/pages/index/downStearmList?khid='+option.khid
})
@ -37,12 +34,6 @@
})
}
uni.hideLoading();
},
methods: {
}
}
</script>
<style>
</style>
</script>

30
pages/index/index.vue

@ -222,17 +222,29 @@
}
},
onShow() {
this.shopName = uni.getStorageSync('shopName')
this.type = uni.getStorageSync('type')
this.getSaleInfo()
wx.getLocation({
type: 'gcj02',
success(res) {
console.log(res)
}
})
},
onLoad() {
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
}
});
//宣传页
// if(uni.getStorageSync('publicize')){

3
pages/index/order.vue

@ -124,7 +124,6 @@
//带参数跳转到开单页
goSaleGoods(item) {
let dataList = []
console.log('11',item);
if(item.saleDetailDTOList){
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
@ -196,7 +195,7 @@
this.btnStatus = !this.btnStatus
},
// checkboxChange(e){
// console.log(JSON.parse(e.detail.value))
// },
delItemModal(item) {

24
pages/index/orderDetail.vue

@ -449,7 +449,7 @@
uni.getSystemInfo({
success(res) {
that.deviceType = res.osName
console.log('设备类型', res.osName)
}
})
},
@ -704,7 +704,7 @@
} else {
that.$emit('onPrint');
}
console.log('查看数据是否正确', that.bufferData)
that.$nextTick(() => {
var dataStr = ''
for (let m = 0; m < that.bufferData.length; m++) {
@ -730,19 +730,19 @@
characteristicId: uni.getStorageSync('characteristicId'),
value: buffer,
success(res) {
console.log('打印buffer', buffer)
console.log('writeBLECharacteristicValue success', res)
},
fail(res) {
console.log('writeBLECharacteristicValue fail', res)
wx.closeBLEConnection({
deviceId: uni.getStorageSync('deviceId'),
success(res) {
console.log(res)
}
})
if (uni.getStorageSync('deviceId')) {
console.log("111")
that.xierushuju()
} else {
that.jiantingshebei()
@ -762,11 +762,11 @@
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
that.goPrint('confirm');
}
if(res.cancel){
console.log('用户点击取消');
that.goPrint('cancel');
}
}
@ -938,11 +938,11 @@
}
})
console.log(returnDat);
returnDat.forEach(function(value, key) {
that.zReturnNum -= value
})
console.log('退货', that.zReturnNum)
}
}).catch((res) => {})
})
@ -958,7 +958,7 @@
this.tui.toast(res.message)
}
})
console.log('刷新', that.list)
},
checkBoxChange() {
if (this.radio1 == 2) {

8
pages/index/peopleList.vue

@ -43,7 +43,7 @@
</view>
<!-- 物流、发车、大巴走这一套 -->
<view class="" v-if="popleType== 'wlName' || popleType== 'fcName' || popleType== 'dbName'">
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="(item,index) in popleList[0]" :key="index">
<view class="list-1" v-for="(item,index) in popleList[0]" :key="index" v-if="user!='13521030702' && item.shippingMethod != '测试勿选'" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)">
<!-- <view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<view style="width: 100%;height: 100%;line-height: 120rpx;text-align: center;color: red;" @tap.stop="clickPhone(item.mobile)">
此{{popleType== 'wlName'?'物流公司': popleType== 'fcName'?'厢货车': popleType== 'dbName'?'大巴车':'公司'}}已下线,点击可拨打电话
@ -69,7 +69,7 @@
<view>以上结果根据客户地址自动匹配得出</view>
<view>↓↓下方为区域内所有物流公司↓↓</view>
</view>
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[1]" :key="item">
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[1]" :key="item" v-if="user!='13521030702' && item.companyName != '测试勿选'">
<!-- <view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<view style="width: 100%;height: 100%;line-height: 120rpx;text-align: center;color: red;" @tap.stop="clickPhone(item.mobile)">
此{{popleType== 'wlName'?'物流公司': popleType== 'fcName'?'厢货车': popleType== 'dbName'?'大巴车':'公司'}}已下线,点击可拨打电话
@ -154,7 +154,8 @@
pages: 1,
totalPages: 0,
noClick:0,
hour:0
hour:0,
user:''
}
},
onReachBottom() {
@ -174,6 +175,7 @@
this.noClick = options.noClick || 0
this.companyType = options.companyType || ''
uni.setStorageSync('clearMsg','1')
this.user = uni.getStorageSync('username')
if(options.khName){
this.khName = JSON.parse(options.khName) || ''
}

28
pages/inventory/AIInventory.vue

@ -341,6 +341,7 @@
attributeValue:[],
specifications:'',
currentAnchor: '',
temporaryNum:0,
temporary:[] //修改单个规格值临时存放要修改的对象
}
},
@ -469,8 +470,7 @@
// that.carList.get(id).productCount;
}
this.carList1 = []
} else { //当前页有数据
console.log('111')
} else { //当前页有数据
for (let i = 0; i < this.carList1.length; i++) {
let id = this.carList1[i].isNew == true ? this.carList1[i].id : this.carList1[i].productId
if (this.carList.has(this.carList1[i].id) == true) { //商品相同
@ -484,8 +484,7 @@
uuid:'A'+generateUUID()
}
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, data1)
console.log('aaaaaa',this.carList)
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, data1)
} else { //规格不同
var data1 = {
@ -655,14 +654,12 @@
}else{
that.currentAnchor = '#'+value.uuid;
}
console.log(that.currentAnchor)
}, 200)
})
that.$nextTick(()=>{
setTimeout(res => {
that.currentAnchor = ""
similar = ''
console.log(that.currentAnchor)
}, 1000)
})
}
@ -1012,7 +1009,7 @@
}
this.attributeList = {
attributeList: value[i],
productCount: newProductCount,
productCount: newProductCount || 0,
productNum: this.productNum,
name: evalue[i],
price: this.purchasePrice
@ -1118,7 +1115,6 @@
this.$refs.mergePopup.close()
},
AiAddSpec(value){
console.log(value)
if(value.categoryId == '' || value.categoryId == null){
this.tui.toast('请先选择商品分类')
return;
@ -1131,7 +1127,6 @@
uni.showLoading({
title: '加载中...'
})
console.log(id)
if(current == 1){
that.goodsDetail = id;
}else{
@ -1272,7 +1267,7 @@
that.$forceUpdate()
uni.hideLoading();
this.$refs.shopPopup.open('bottom')
}, 1000)
}, 200)
},
temporaryChange(val) {
this.zNum = 0
@ -1315,8 +1310,6 @@
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
console.log('carList1',carList1)
console.log('这里',this.carList)
if (this.carList.size == 0) { //当前页没有数据
for (let i = 0; i < carList1.length; i++) {
let obj = {
@ -1478,8 +1471,7 @@
},
//删除商品下的某一个规格
delShopSpec(id, name) {
var that = this;
console.log(that.carList)
var that = this;
uni.showModal({
title: "提示",
content: "确定删除此条商品吗?",
@ -1533,8 +1525,7 @@
supplierName: this.khName.consigneeName
}
let purchaseDetails = [];
let jishuqi = 0
console.log(this.carList)
let jishuqi = 0
this.carList.forEach(function(value, key) {
if(value.price == null){
value.price = 0
@ -1579,8 +1570,6 @@
},
goInventory(purchase,purchaseDetails){
console.log('走之前',purchaseDetails)
uni.navigateTo({
url: '/package1/inventory/inventoryConfirm?aiinventory=1&purchase=' + JSON.stringify(purchase) + '&purchaseDetails=' + JSON.stringify(purchaseDetails)
})
@ -1608,7 +1597,8 @@
this.carList.forEach(function(value, key) {
that.shouldPay = that.shouldPay + value.price1
that.totalAmount = that.totalAmount + value.productCount
})
})
that.shouldPay = that.shouldPay.toFixed(2)
this.alreadyPay = this.shouldPay
that.noPay = this.shouldPay - this.alreadyPay
this.$forceUpdate()

4
pages/inventory/addinventory.vue

@ -1031,9 +1031,7 @@
}
let isTrue = false;
if (this.storageType == 0) {
this.carList.forEach(function(value, key) {
// console.log('这里',value)
console.log('这里',value.purchasePrice == '' || value.purchasePrice == 0)
this.carList.forEach(function(value, key) {
if (value.purchasePrice == '' || value.purchasePrice == 0) {
uni.showToast({
title: value.productName + "的价格必须维护!",

12
pages/inventory/changeGoods1.vue

@ -630,7 +630,7 @@
}
}
console.log('弹唱',this.carList)
this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", {
categoryId: this.goodsDetail.categoryId
}, false, true).then((res1) => {
@ -671,9 +671,9 @@
value: valueObj
})
}
console.log(that.dataObj)
this.goodsDetail.attributeList = newArr;
console.log('看看看看',this.goodsDetail.attributeList)
for (var i = 0; i < this.goodsDetail.attributeList.length; i++) {
let oldCheck = false
let oldValue = []
@ -699,7 +699,7 @@
oldCheck = false
oldValue = []
}
console.log(this.goodsList)
}
} else {
@ -821,7 +821,7 @@
}
}
this.$refs.popup.close()
console.log(this.carList)
},
//删除整条商品
delShop(item) {
@ -848,7 +848,7 @@
},
//选商品的时候能删除规格
delCarData(index) {
console.log(index)
this.temporaryList.splice(index, 1);
this.temporaryChange()
// uni.showModal({

28
pages/inventory/goodsList1.vue

@ -712,7 +712,7 @@
this.carList1 = this.carList1
}
// const uuid = generateUUID();
// console.log('uuid',uuid);
this.handleData()
},
filters: {
@ -735,7 +735,7 @@
methods: {
handleData(){
let that = this;
console.log('出加载',this.carList1)
for (let i = 0; i < this.carList1.length; i++) {
if (this.carList1[i].saleDetailQueryDTO) {
@ -766,7 +766,7 @@
productNum:this.carList1[i].saleDetailQueryDTO[m].productNum != undefined?this.carList1[i].saleDetailQueryDTO[m].productNum : this.carList1[i].saleDetailQueryDTO[m].stockCount,
uuid:'A'+generateUUID()
}
console.log('data1',this.carList1[i].saleDetailQueryDTO[m].productNum);
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, data1)
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
}
@ -889,9 +889,9 @@
}
},
invenRadio(){
console.log('isInventory',this.isInventory)
this.isInventory = !this.isInventory
// console.log(e)
},
AiHandleData(){
let that = this;
@ -933,7 +933,7 @@
} else { //当前页有数据
if (this.carList.has(this.carList1[i].productId) == true) { //商品相同
for (let m = 0; m < this.carList1[i].stockLogList1.length; m++) {
console.log('stockLogList1',this.carList1[i].stockLogList1[m])
if (this.carList.get(this.carList1[i].productId).stockLogList.has(this.carList1[i]
.stockLogList1[
m].attributeList) == true) { //规格相同
@ -1133,14 +1133,14 @@
}else{
that.currentAnchor = '#'+value.uuid;
}
console.log(that.currentAnchor)
}, 200)
})
that.$nextTick(()=>{
setTimeout(res => {
that.currentAnchor = ""
similar = ''
console.log(that.currentAnchor)
}, 1000)
})
}
@ -1452,7 +1452,7 @@
this.noList.push(res.result.data[i].productName+'-'+ res.result.data[i].stockLogList1[m].attributeList)
}
}
console.log(res.result.data[i].productCount)
res.result.data[i].stockLogList1 = newList
if(newList.length > 0){
newData.push(res.result.data[i])
@ -1463,7 +1463,7 @@
}else{
this.carList1 = res.result.data
}
console.log(this.noList);
if(this.noList !='' || res.result.aiNotRecognition !=''){
this.$refs.AiNoPopup.open()
}
@ -1560,7 +1560,7 @@
this.priceType = e
that.priceCurrent = index
this.carList.forEach(function(value, key) {
console.log('麻烦',value)
that.index = value.productId || value.id
@ -1579,14 +1579,14 @@
},
//商品上选择是零售价还是批发价
checkPay(price) {
console.log(price)
if (price == undefined || price == null) {
this.tui.toast("暂无拿货记录")
return
}
let that = this;
let num = this.carList.get(this.index)
// console.log(num)
num.discountAmount = price
num.unitPrice = price;
num.price = price * num.productCount;
@ -1693,7 +1693,7 @@
}
that.$nextTick(() => {
console.log('oldTemList', that.oldTemList)
console.log('temporaryList', that.temporaryList)
console.log('pageOldTemList', that.pageOldTemList)
})

5
pages/inventory/inventory.vue

@ -164,17 +164,16 @@
},
onLoad(){
let that = this
this.type=uni.getStorage({key:'type'})
uni.getSystemInfo({
success: function (info) {
console.log(info.windowHeight)
that.windowHeight = info.windowHeight
}
});
},
onShow() {
this.getGategoryList()
this.getWarnMsg()
this.type=uni.getStorageSync('type')
this.getWarnMsg()
},
methods: {
//初始化获取分类列表

6
pages/inventory/inventoryDetail.vue

@ -208,7 +208,7 @@
},
changeText(){
console.log(this.dataList)
},
changeNumBtn(item){
if(this.printList.has(item.attributeList) == true){ // map中已经有当前值
@ -220,7 +220,7 @@
}else{
this.printList.set(item.attributeList,item)
}
console.log('打印的数组',this.printList)
},
printBtn(){
this.$refs.payDialog.open('center')
@ -258,7 +258,7 @@
}
}
}
console.log(this.multipleList)
},
//去新增商品页编辑
goToAddGoods(){

22
pages/rebate/rebate.vue

@ -148,8 +148,26 @@
if(this.type != 0){
this.tui.toast("您暂无提现权限!")
}else{
uni.navigateTo({
url: `/pages/rebate/withdrawal?balance=${this.rebateAmount}`
this.tui.request('/app/operatingArea/getByArea', "post", {
province:'',
city:'',
area:'',
shippingType:0,
seachParams:"测试"
}, false, true).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
this.isOnLine = res.result.operatingAreaList[0].isOnLine
if(res.result.operatingAreaList[0].isOnLine == '0'){
this.tui.toast("功能测试中,暂未开放")
}else{
uni.navigateTo({
url: `/pages/rebate/withdrawal?balance=${this.rebateAmount}`
})
}
}else{
this.tui.toast(res.message)
}
})
}
}

53
pages/rebate/withdrawal.vue

@ -1,17 +1,18 @@
<template>
<view>
<view>
<view v-if="isOnLine == '0'" style="width: 100%;height: 100%;position: absolute;top: 0;background: #fff;z-index:99;"></view>
<uni-card title="提现">
<view style="color: red;font-size: 12px;">*支付宝实名和手机号必须一致并经过实名认证</view>
<view v-if="user== '13521030702'?' ':'*支付宝实名和手机号必须一致并经过实名认证'" style="color: red;font-size: 12px;"></view>
<view class="zhifubao">
<view class="name">支付宝手机号:</view>
<view class="name">{{user== '13521030702'?'账号':'支付宝手机号'}}:</view>
<view class="zfb-data">
<input type="number" v-model='zfbAccount' placeholder="支付宝手机号">
<input type="number" v-model='zfbAccount' placeholder="请输入手机号">
</view>
</view>
</view>
<view class="zhifubao">
<view class="name">支付宝实名:</view>
<view class="name">{{user== '13521030702'?'昵称':'支付宝实名'}}:</view>
<view class="zfb-data">
<input type="text" v-model='zfbName' placeholder="支付宝认证的实名">
<input type="text" v-model='zfbName' placeholder="请输入认证过的实名">
</view>
</view>
<view class="zhifubao">
@ -23,7 +24,7 @@
<view class="yue-box">
<view class="yue">
可提现余额:
<text>{{canbalance?canbalance:'0'}}</text>
<text>{{canbalance == "null"?'0':canbalance}}</text>
</view>
<view class="quanbu" @click="onQuanbuClick">
全部提现
@ -46,18 +47,50 @@
zfbName: '',
realBalance:'',
shopId:'',
isClick:false
isClick:false,
user:'',
isOnLine:'0'
}
},
created(){
this.user = uni.getStorageSync('username')
this.getArea();
},
onLoad(options) {
this.canbalance = options.balance
this.shopId = uni.getStorageSync('shopId')
},
methods: {
methods: {
getArea(){
this.tui.request('/app/operatingArea/getByArea', "post", {
province:'',
city:'',
area:'',
shippingType:0,
seachParams:"测试"
}, false, true).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
this.isOnLine = res.result.operatingAreaList[0].isOnLine
if(res.result.operatingAreaList[0].isOnLine == '0'){
uni.setNavigationBarTitle({
title: '测试页面'
});
}
}else{
this.tui.toast(res.message)
}
})
},
onQuanbuClick() {
this.realBalance = this.canbalance
},
onSubmit() {
if(this.user == '13521030702'){
this.tui.toast("测试账户不能提现!")
return
}
this.isClick = true;
if(Number(this.realBalance) > Number(this.canbalance)){
this.tui.toast("提现金额不能大于账户余额!")

Loading…
Cancel
Save