wangfukang 2 years ago
parent
commit
3a6ecaa09f
  1. 54
      package1/AI/AIHangOrderList.vue
  2. 113
      package1/AI/addAiList.vue
  3. 1912
      package1/AI/voiceInventory.vue
  4. 2
      package1/index/order.vue
  5. 785
      package1/index/orderDetail.vue
  6. 42
      package1/index/peopleList.vue
  7. 2163
      package1/inventory/addGoods.vue
  8. 39
      package1/inventory/inventoryConfirm.vue

54
package1/AI/AIHangOrderList.vue

@ -918,8 +918,9 @@
}
this.returnList.forEach(function(value, key) {
item.saleDetailDTOList.push(value)
})
if (item.saleDetailDTOList) {
})
if (item.saleDetailDTOList.length>0) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
let obj = {}
@ -940,7 +941,8 @@
num++
}
}
}
obj.attrId = item.saleDetailDTOList[i].attrId
obj.saleDetailQueryDTO = newSaleDetailDTOList
obj.num = 0
obj.id = item.saleDetailDTOList[i].productId
@ -954,7 +956,7 @@
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].discountAmount || item.saleDetailDTOList[i].wholesalePrice
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
obj.returnPrice = item.saleDetailDTOList[i].returnPrice
obj.saleId = item.id
obj.remark = item.remark
@ -962,7 +964,7 @@
obj.createByName = item.createByName
dataList.push(obj)
}
} else {
} else {
let obj = {}
obj.num = 0
obj.price = 0
@ -971,26 +973,28 @@
obj.xsyId = item.createBy
obj.createByName = item.createByName
dataList.push(obj)
}
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'
})
}
})
})
}
setTimeout(res11=>{
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()
console.log('dataList',dataList)
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'
})
}
})
},500)
},
//点击切换折叠状态
clickCollapse(item,index) {

113
package1/AI/addAiList.vue

@ -2,7 +2,7 @@
<template>
<view class="page1" style="overflow: scroll;padding-bottom: 150rpx;">
<view class="box">
<view style="display: flex;height: 80rpx;line-height: 80rpx;">
<view @tap="getData" style="display: flex;height: 80rpx;line-height: 80rpx;">
<view class="circle">
寄
</view>
@ -186,6 +186,7 @@
<view class="voice-text">语音识别中...</view>
</view>
<view class="mask-model" v-if="isVoice">貌似没有检测到您上次的语音录入信息,正在反复识别中</view>
<canvas canvas-id="myCanvas" style="width: 1700px; height: 2200px;"></canvas>
</view>
</template>
@ -200,7 +201,10 @@
voiceData: {},
recordState: false,
productPicture: [],
messages:['消息1', '消息2', '消息3']
canvas: null,
tempFilePath: '',
messages: ['消息1', '消息2', '消息3'],
base64:''
}
},
onShow() {
@ -215,8 +219,113 @@
})
},
onLoad(option) {
this.getUserData()
},
methods: {
getUserData(){
console.log(__wxConfig.envVersion)
uni.request({
url: 'https://api.weixin.qq.com/cgi-bin/token',
data: {
grant_type: 'client_credential',
appid: 'wx6d7d4fb58d1502db',
secret: '3a2c8cd00926764bbd12fd7361e01f1d'
},
method: 'GET',
dataType: 'json',
success: (res) => {
console.log('access_token',res.data.access_token)
uni.request({
url: 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=' + res.data
.access_token,
data: {
page: 'package1/index/downStearmList',
scene:'khid=1833763951914127361',
env_version: "develop",
},
responseType: 'arraybuffer',
method: 'POST',
dataType: 'json',
success: (res1) => {
let base64 = wx.arrayBufferToBase64(res1.data)
console.log('base64',base64)
const time = new Date().getTime();
const imgPath = wx.env.USER_DATA_PATH + "/poster" + time + "share" + ".png";
const file = wx.getFileSystemManager();
file.writeFileSync(imgPath, base64, "base64");
this.base64 = imgPath
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
})
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
})
},
getData() {
let that = this
uni.showLoading({
title:'生成中...'
})
const ctx = uni.createCanvasContext('myCanvas', this);
//背景图
let imgA = 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/0f96ca9700b741d486dd23bbe4e0f970.jpg';
uni.downloadFile({
url: imgA,
success: (res2) => {
if (res2.statusCode === 200) {
// // 绘制第一张图片
ctx.drawImage(res2.tempFilePath, 0, 0, 1700, 2200);
ctx.draw()
// 绘制第二张图片
ctx.drawImage(that.base64, 650, 850, 400, 400);
ctx.draw(true);
// 设置字体样式
ctx.font = 'bold 200px SimSun';
// 设置文字颜色
ctx.fillStyle = '#088FEB';
var text = '天逸的店';
var textWidth = ctx.measureText(text).width;
console.log(textWidth)
// 计算居中位置
var x = (1700 - textWidth) / 2;
// 绘制文字
ctx.fillText(text, x, 700);
ctx.draw(true)
setTimeout(ress=>{
uni.canvasToTempFilePath({
x: 0,
y: 0,
width: 1700,
height: 2200,
destWidth: 1701,
destHeight: 2200,
canvasId: 'myCanvas',
success: (res3) => {
uni.previewImage({
urls: [res3.tempFilePath]
})
uni.hideLoading()
// uni.saveImageToPhotosAlbum({
// filePath: res3.tempFilePath,
// success: function () {
// console.log('save success');
// }
// });
}
});
},500)
}
}
});
},
//按住语音识别,开始
kaishi() {
if (this.isVoice == false) {

1912
package1/AI/voiceInventory.vue

File diff suppressed because it is too large

2
package1/index/order.vue

@ -306,7 +306,7 @@
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].discountAmount?item.saleDetailDTOList[i].discountAmount:item.saleDetailDTOList[i].wholesalePrice
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
obj.returnPrice = item.saleDetailDTOList[i].returnPrice
obj.saleId = item.id
obj.remark = item.remark

785
package1/index/orderDetail.vue

File diff suppressed because it is too large

42
package1/index/peopleList.vue

@ -11,11 +11,11 @@
</view>
<view class="title-box" v-if="popleType=='wlName' || popleType=='dbName' || popleType=='fcName'">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="请输入名称或发货地查询" cancelButton="none"
@confirm="search" />
@confirm="search" @clear="clearSearch" />
</view>
<view class="title-box" v-else>
<uni-search-bar class="uni-mt-10" radius="5" placeholder="请输入名称查询" cancelButton="none"
@confirm="search" />
@confirm="search" @clear="clearSearch" />
</view>
<view v-if="popleType=='khName'">
<view class="shaixuan-box">
@ -61,11 +61,16 @@
</view>
</view>
</view>
<view style="overflow:scroll;" :style="{'margin-top':popleType == 'khName'? '350rpx':popleType == 'gysName'?'260rpx' :'110rpx'}">
<view style="overflow:scroll;" :style="{'margin-top':popleType == 'khName'? '350rpx':popleType == 'gysName'?'274rpx' :'110rpx'}">
<view v-if="popleType== 'khName' || popleType== 'gysName'" style="overflow:scroll;">
<view style="display: flex;width: 100%;line-height: 100rpx;text-align: center;background: #C6E2FF;color: #777;">
<view style="width: 50%;">欠款人数:<text style="color:red">{{allData.personCount?allData.personCount:0}}</text></view>
<view style="width: 50%;">欠款总金额:<text style="color:red">{{allData.amountOwed?allData.amountOwed:0}}</text></view>
<view v-if="popleType== 'gysName'" style="display: flex;width: 100%;line-height: 50rpx;text-align: center;background: #C6E2FF;color: #777;">
<view style="width: 33%;display: flex;flex-direction: column;"><text style="color:red">{{allData.personCount?allData.personCount:0}}</text><text>欠款人数</text></view>
<view style="width: 33%;display: flex;flex-direction: column;"><text style="color:red">{{allData.amountOwed?allData.amountOwed:0}}</text><text>欠款总额</text></view>
<view style="width: 33%;display: flex;flex-direction: column;"><text style="color:red">{{allData.purchasingCount?allData.purchasingCount:0}}</text><text>今日入库件数</text></view>
</view>
<view v-if="popleType== 'khName'" style="display: flex;width: 100%;line-height: 100rpx;text-align: center;background: #C6E2FF;color: #777;">
<view style="width: 50%;">欠款人数:<text style="color:red">{{allData.personCount?allData.personCount:0}}</text></view>
<view style="width: 50%;">欠款总额:<text style="color:red">{{allData.amountOwed?allData.amountOwed:0}}</text></view>
</view>
<!-- 供应商、客户走这一套 -->
<view class="list-1" v-for="item in popleList" :key="item" @tap="clickList(item)" :style="{'min-height': item.name == '散客' || item.consigneeName == '默认供应商' ?'80rpx':'240rpx'}"
@ -75,8 +80,13 @@
<text>{{item.consigneeMobile != 'undefined' &&item.consigneeMobile != null &&item.consigneeMobile != undefined ?item.consigneeMobile:'-'}}</text>
</view>
<view class="name-tel" style="width: 100%;" v-else>
<text style="line-height: 75rpx;">{{item.name}}<text v-if="item.notBuyDays!=null && item.name != '散客'">({{item.notBuyDays+'天未拿货'}})</text> </text>
<text v-if="item.name != '散客'">{{item.phone}}</text>
<text style="line-height: 75rpx;">
{{item.name}}
<text v-if="item.categoryName != null">({{item.categoryName}})</text>
</text>
<text v-if="item.name != '散客'">
{{item.phone}}
</text>
</view>
<view class="name-tel" style="width: 100%;display: flex;flex-direction: column;height:auto;font-size: 30rpx;">
<text>{{(item.name == '散客' || item.consigneeName == '默认供应商') && item.city != null && item.city != undefined?'-':item.province + item.city + item.area}}</text>
@ -93,7 +103,10 @@
</view>
<view v-if="popleType== 'gysName' && item.noEarn < 0 && userType == 0" style="color: red;position: absolute;top: 20rpx;right: 180rpx;font-size: 28rpx;">
余额:{{item.noEarn?Math.abs(item.noEarn) :0}}
</view>
</view>
<view v-if="item.notBuyDays!=null && item.name != '散客'" style="position: absolute;top: 70rpx;right: 180rpx;font-size: 28rpx;">
{{item.notBuyDays+'天未拿货'}}
</view>
<view class="name-edit" @tap.stop="toggle('huikuan',item)" style="top: 27rpx;">
充值
</view>
@ -572,6 +585,12 @@
this.popleList = []
this.getPeopleType()
},
clearSearch(){
this.pages = 1
this.searchName = ""
this.popleList = []
this.getPeopleType()
},
//查询拉包工和快递人员的列表
kdyOrlbgList() {
this.status = 'loading';
@ -615,7 +634,8 @@
if (res.code == 200) {
this.pages = 1
this.popleList = []
this.khOrGysList()
this.khOrGysList()
this.getAllPeople()
this.tui.toast('充值成功')
this.keyboardNum = ''
this.$refs.inputDialog.close()
@ -639,7 +659,7 @@
},
goDetail(data){
uni.navigateTo({
url: "/pages/index/customAndSupplierProductDetail?popleType="+this.popleType+'&id='+data.id
url: "/package1/index/customAndSupplierProductDetail?popleType="+this.popleType+'&id='+data.id
})
},
//打开弹出层

2163
package1/inventory/addGoods.vue

File diff suppressed because it is too large

39
package1/inventory/inventoryConfirm.vue

@ -30,56 +30,63 @@
<view class="tui-price-large">{{zhiqianqiankuan == null ?'暂无':Math.abs(zhiqianqiankuan) }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="userType == 0&&zhiqianqiankuan < 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="userType == 0&&zhiqianqiankuan < 0 && aiinventory != 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">客户余额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{zhiqianqiankuan == null ?'暂无':Math.abs(zhiqianqiankuan) }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="userType == 0 && aiinventory != 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">应付金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ purchase.shouldPay == null ?'暂无':purchase.shouldPay }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="userType == 0 && aiinventory != 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">已付金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ purchase.alreadyPay == null ?'暂无':purchase.alreadyPay }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="yuedikou != 0 && userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="userType == 0 && aiinventory == 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">退货金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ purchase.alreadyPay == null ?'暂无':purchase.alreadyPay }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="yuedikou != 0 && userType == 0 && aiinventory != 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">余额抵扣</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{yuedikou == null ?'暂无':yuedikou }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="leijiqiankuan > 0 && userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="leijiqiankuan > 0 && userType == 0 && aiinventory != 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">累计欠款</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{leijiqiankuan == null ?'暂无':leijiqiankuan }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="leijiqiankuan < 0 && userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="leijiqiankuan < 0 && userType == 0 && aiinventory != 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">累计余额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{leijiqiankuan == null ?'暂无':Math.abs(leijiqiankuan) }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="purchase.noPay >= 0 && userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="purchase.noPay >= 0 && userType == 0 && aiinventory != 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">本次欠款</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{purchase.noPay == null ?'暂无':purchase.noPay }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="purchase.noPay < 0 && userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="purchase.noPay < 0 && userType == 0 && aiinventory != 2" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">本次余额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
@ -97,7 +104,7 @@
<view class="tui-flex-shrink">备注</view>
<view class="tui-goods-price">
<uni-tooltip :content="purchase.remark == null ?'暂无':purchase.remark">
<view style="font-size: 13px;width: 200px;height: 40rpx;overflow: hidden;text-align: right;">{{ sales.remark == null ?'':sales.remark}}</view>
<view style="font-size: 13px;width: 200px;height: 40rpx;overflow: hidden;text-align: right;">{{ purchase.remark == null ?'':purchase.remark}}</view>
<text style="color: blue;">查看更多</text>
</uni-tooltip>
</view>
@ -115,7 +122,7 @@
export default {
data() {
return {
purchase:'',
purchase:{},
purchaseDetails:'',
aiinventory:0, //1是AI入库 0是普通入库 2采购退货
userType:1,
@ -136,8 +143,16 @@
return name;
}
},
onLoad(option) {
onLoad(option) {
this.aiinventory = option.aiinventory
if(option.aiinventory == 2){
uni.setNavigationBarTitle({
title:'采购退货确认'
});
}
this.purchaseDetails = JSON.parse(option.purchaseDetails)
console.log('purchase',option.purchase)
console.log('purchaseDetails',this.purchaseDetails)
if(this.purchaseDetails != '' && uni.getStorageSync('type') == 0){
for(let i=0;i<this.purchaseDetails.length;i++){
@ -155,7 +170,7 @@
}
}
this.purchase = JSON.parse(option.purchase)
this.aiinventory = option.aiinventory
this.userType = uni.getStorageSync('type')
this.yuedikou = option.yuedikou

Loading…
Cancel
Save