wangfukang 2 years ago
parent
commit
7fdebe5a27
  1. 2
      package1/AI/AIHangOrderList.vue
  2. 689
      package1/AI/addAiList.vue
  3. 13
      package1/AI/voiceInventory.vue
  4. 5
      package1/index/order.vue
  5. 1135
      package1/index/orderDetail.vue
  6. 52
      package1/index/peopleList.vue
  7. 21
      package1/inventory/addGoods.vue
  8. 201
      package1/stock/addStock.vue
  9. 43
      package1/stock/addStockList.vue

2
package1/AI/AIHangOrderList.vue

@ -1004,6 +1004,8 @@
this.returnList = new Map()
console.log('dataList',dataList)
res.result.name = res.result.userName
res.result.id = res.result.userId
res.result.noEarn = res.result.amountOwed
uni.setStorageSync('khName', JSON.stringify(res.result))
uni.setStorageSync('carList1', JSON.stringify(dataList))
uni.setStorageSync('discountAll', item.discount != null ?item.discount:10)

689
package1/AI/addAiList.vue

@ -1,499 +1,116 @@
<!-- 新增库存页 -->
<!-- 管理员登录页 -->
<template>
<view class="page1" style="overflow: scroll;padding-bottom: 150rpx;">
<view class="box">
<view @tap="getData" style="display: flex;height: 80rpx;line-height: 80rpx;">
<view class="circle">
寄
</view>
<view style='width: 80%;padding-left: 5px;'>
<text>{{voiceData.senderName}}</text>
<text style="padding-left: 5px;">{{voiceData.senderPhone}}</text>
</view>
<view style="font-size: 26rpx;font-weight: bold;">
地址簿
</view>
</view>
<view style="display: flex;height: 80rpx;line-height: 80rpx;border-top: 1px solid #eee;">
<view class="circle" style="background:red;color: #fff;">
收
</view>
<view style='width: 80%;padding-left: 5px;'>
<text>{{voiceData.receiverName}}</text>
<text style="padding-left: 5px;">{{voiceData.receiverPhone}}</text>
</view>
<!-- <view style="font-size: 26rpx;font-weight: bold;">
地址簿
</view> -->
</view>
<view class="page1" style="overflow: scroll;">
<view @tap="addList" style="width: 90%;height:80rpx;margin:20rpx auto;background: #088FEB;color: #fff;border-radius: 20rpx;text-align: center;line-height: 80rpx;font-size: 32rpx;">
新增
</view>
<view class="box">
<view class="content">
<view class="name-box">出发站</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入到达站点" class="input-box" value="沧州" disabled>
</view>
</view>
<view class="content">
<view class="name-box">到达站</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入到达站点" v-model="voiceData.arrivalStation" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">重量(KG)</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入重量" v-model="voiceData.weight" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">数量</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入数量" v-model="voiceData.count" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">运费</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入运费" v-model="voiceData.freight" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">结算方式</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入结算方式" v-model="voiceData.methodOfSettlement" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">小费</view>
<view style="width: 80%;">
<input type="text" placeholder="没有小费可不输入" v-model="voiceData.tips" class="input-box">
</view>
</view>
<view class="content" style="height:150rpx;">
<view class="name-box">图片上传</view>
<view class="upload-img" @tap="pictureAdd"
style="background: #eee;text-align: center;line-height: 160rpx;">
<uni-icons type="camera" size="28" color="#777"></uni-icons>
</view>
<view style="overflow-x: scroll;display: flex;width: 350rpx;">
<view v-if="productPicture !=''" v-for="(item,index) in productPicture" :key="index"
style="width: 160rpx;height: 160rpx;margin-left: 20rpx;">
<img :src="item" alt="" class="upload-img">
</view>
</view>
</view>
</view>
<view class="box">
<view class="content">
<view class="name-box">包装形式</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入货物包装形式" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">运输费用</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入运输费用" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">保价</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入保价" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">代收货款</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入代收货款" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">手续费</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入手续费" class="input-box">
</view>
</view>
<view class="content">
<view class="name-box">备注</view>
<view style="width: 80%;">
<input type="text" placeholder="请输入备注" class="input-box">
<button @tap="getQRCode">生成</button>
<uqrcode ref="uqrcode" canvas-id="qrcode" hide="true" start="false" auto="true" queue="true" :value="QrUrl"></uqrcode>
<img v-for="(item,index) in newQRList" :src="item" alt="" />
<view> <!-- -->
<view v-for="(item,index) in QrList1" :key="index" style="background: #fff;height: 100rpx;display: flex;line-height: 100rpx;">
<input type="text" :value="item.name" @blur="addItemName($event,index)" placeholder="输入名称" style="width: 30%;display: block;height: 100rpx;text-align: center;font-size: 32rpx;" />
<input type="text" disabled @tap="scanCodeAdd(index)" :value="item.path" placeholder="点击扫描二维码" style="width: 58%;display: block;height: 80rpx;border: 1px solid #eee;padding-left: 20rpx;margin-top: 10rpx;" />
<view @tap="delItem(index)" style="width:12%;margin-left: 20rpx;">
<uni-icons color="red" type="minus" size="26"></uni-icons>
</view>
</view>
</view>
<view class="bottom-btn">
<view @tap="toggle"
style="background: linear-gradient(90deg, #FF9797, #FFC1E0);margin: 10rpx auto;height: 80rpx;width: 45%;border-radius: 10px;text-align: center;line-height: 80rpx;">
语音录入
</view>
<view
style="background: linear-gradient(90deg, #60F3FF, #088FEB);margin: 10rpx auto;height: 80rpx;width: 45%;border-radius: 10px;text-align: center;line-height: 80rpx;">
确定
</view>
<view style="width: 90%;height:80rpx;position: fixed;bottom: 40rpx;left:5%;background: #088FEB;color: #fff;border-radius: 20rpx;text-align: center;line-height: 80rpx;font-size: 32rpx;">
提交
</view>
<!-- 语音识别弹出层 -->
<uni-popup ref="popup" background-color="#fff" @change="yuyinChange">
<view class="voice-popup-content">
<view class="voice-popup-title">
<text>语音录入</text>
<uni-icons @tap='$refs.popup.close()' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view>
<view style="width: 100%;line-height: 40rpx;font-size: 11px;color: #777;">
示例:
</view>
<view
style="width: 100%;line-height: 40rpx;font-size: 11px;color: #777;display: flex;text-align: center;">
<view style="flex: 1;">发货人:</view>
<view style="flex: 1;">发货电话:</view>
</view>
<view
style="width: 100%;line-height: 40rpx;font-size: 11px;color: #777;display: flex;text-align: center;">
<view style="flex: 1;">收货人:</view>
<view style="flex: 1;">收货电话:</view>
</view>
<view
style="width: 100%;line-height: 40rpx;font-size: 11px;color: #777;display: flex;text-align: center;">
<view style="flex: 1;">重量:</view>
<view style="flex: 1;">数量:</view>
</view>
<view
style="width: 100%;line-height: 40rpx;font-size: 11px;color: #777;display: flex;text-align: center;">
<view style="flex: 1;">小费:</view>
<view style="flex: 1;">到达站:</view>
</view>
<view class="voice-popup-container">
<textarea name="" id="" style="width:100%;height:240rpx;border:1px solid #eee;margin:0;"
v-model="voiceText" placeholder="请按照事例要求录入信息"></textarea>
<view>
<text style="color:red;font-size:22rpx;">*长按“语音”按钮录入,系统将自动识别</text>
</view>
<view class="voice-popup-bottom">
<view class="voice-popup-btn" @tap="clearText">清空</view>
<view class="voice-popup-btn" @tap="getVoiceData">确认</view>
</view>
</view>
<view class="voice-btn" @touchstart="kaishi" @touchend="jieshu">
<img src="/static/images/maikefeng.png" style="width: 80%;height: 80%;margin: 10%;" alt="">
</view>
</view>
</uni-popup>
<view class="voice-model" v-if="recordState == true">
<img src="/static/images/maikefeng.png" alt="">
<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>
<script>
var plugin = requirePlugin("WechatSI")
let manager = plugin.getRecordRecognitionManager()
export default {
data() {
return {
voiceText: '',
isVoice: false,
voiceData: {},
recordState: false,
productPicture: [],
canvas: null,
tempFilePath: '',
messages: ['消息1', '消息2', '消息3'],
base64:''
//旧的二维码路径
QRList:[
'wxp://f2f0egWTC-6-dnZPjtxrXAnLQemXglhjQB92wtNu01tRoeE',
'https://u.wechat.com/MINRIYDQnbErEZEUAAhuOL0',
'https://u.wechat.com/ELXU0g00OAM8huehO8nDQMQ',
'https://qr.alipay.com/fkx11051559cgeldh61dyf6'
],
QrUrl:'', //二维码临时存放
newQRList:[], // 生成的二维码临时路径的数组
QrList1:[] // 点击新增按钮,新增一条数据
}
},
onShow() {
uni.authorize({
scope: 'scope.record',
success() {
},
fail() {
this.tui.toast("您未授权,语音功能可能会出现错误")
}
})
},
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) {
this.recordState = true
uni.vibrateShort();
manager.start({
duration: 60000,
lang: "zh_CN"
});
addList(){
if(this.QrList1.length>=4){
uni.showToast({
title: '最多只能添加4个二维码',
icon: 'none'
})
return
}
let data = {
name:'',
path:''
}
this.QrList1.push(data)
},
//松开语音识别,结束
jieshu() {
this.recordState = false
manager.stop()
},
extractInfo(str) {
const info = {};
const regexes = [{
name: 'senderName',
regex: /发货人:(.*?),/
},
{
name: 'senderPhone',
regex: /发货电话:(.*?),/
},
{
name: 'receiverName',
regex: /收货人:(.*?),/
},
{
name: 'receiverPhone',
regex: /收货电话:(.*?),/
},
{
name: 'weight',
regex: /重量:(.*?),/
},
{
name: 'count',
regex: /数量:(.*?),/
},
{
name: 'methodOfSettlement',
regex: /结算方式:(.*?),/
},
{
name: 'tips',
regex: /小费:(.*?),/
},
{
name: 'arrivalStation',
regex: /到达站:(.*)/
}
];
regexes.forEach(({
name,
regex
}) => {
const match = str.match(regex);
if (match && match[1]) {
// 去除可能的前后空格
info[name] = match[1].trim();
}
});
return info;
},
yuyinChange() {
console.log("yuyin")
this.isVoice = false
},
getVoiceData() {
this.$refs.popup.close()
},
spliceMsg(res) {
let regex = /嗯|啊|儿|阿|恩/g;
return res.replace(regex, '')
},
//弹出
toggle(type, id) {
this.initRecord();
this.voiceText = ''
this.$refs.popup.open('center')
getQRCode(){
for(let i=0;i<=this.QRList.length;i++){
setTimeout(res=>{
this.QrUrl = this.QRList[i]
this.$refs.uqrcode.toTempFilePath({
success: res => {
this.newQRList.push(res.tempFilePath)
}
});
},1000*(i+1))
}
},
//清空语音输入的文字
clearText() {
this.voiceText = ''
addItemName(e,index){
this.QrList1[index].name = e.detail.value
console.log(this.QrList1)
},
//语音识别功能初始化
initRecord() {
scanCodeAdd(index) {
let that = this;
manager.stop()
// 识别结束事件
manager.onStop = (res) => {
that.voiceText = res.result
}
// 识别错误事件
manager.onError = (res) => {
if (res.retcode == '-30011') {
that.isVoice = true
}
if (res.retcode == '-30004') {
// uni.hideLoading()
that.isVoice = false
uni.hideToast()
uni.showToast({
title: "未识别到声音信息,请重新录入",
icon: 'none'
})
}
if (res.retcode == '-40001') {
uni.scanCode({
success: (res) => {
if(res.result != ''){
console.log(res.result)
this.QrList1[index].path = res.result
}else{
uni.showToast({
title: '扫描失败',
icon: 'none'
})
}
},
fail: (res) => {
uni.showToast({
title: '使用次数超限制,请联系管理员!',
title: '扫描失败',
icon: 'none'
})
}
}
},
pictureAdd() {
let that = this
uni.chooseMedia({
count: 9,
mediaType: ['image'],
sourceType: ['album', 'camera'],
success(res) {
uni.showLoading({
title: '加载中...',
mask: true
})
for (let i = 0; i < res.tempFiles.length; i++) {
that.upLoadFile(res.tempFiles[i].tempFilePath)
}
}
})
},
async upLoadFile(path) {
delItem(index){
let that = this;
let hiver_token = uni.getStorageSync("hiver_token")
await uni.uploadFile({
url: that.tui.interfaceUrl() + '/upload/file',
filePath: path,
name: 'file',
header: {
"content-type": "multipart/form-data",
'accessToken': hiver_token
},
formData: {},
success: (uploadFileRes) => {
let pathData = JSON.parse(uploadFileRes.data)
that.productPicture.push(pathData.result)
that.$forceUpdate()
},
fail: (err) => {
uni.hideLoading();
uni.showToast({
title: JSON.stringify(err),
icon: 'none'
})
uni.showModal({
title: "提示",
content: "确定要删除吗?",
success: function(res) {
if (res.confirm) {
that.QrList1.splice(index, 1)
}
}
});
await setTimeout(res => {
uni.hideLoading();
}, 1000)
},
})
}
}
}
</script>
@ -504,150 +121,4 @@
background: #eee;
height: 100%;
}
.box {
width: 95%;
margin: 20rpx auto 0;
background: #fff;
border-radius: 10px;
padding: 10px;
}
.bottom-btn {
position: fixed;
bottom: 0;
height: 100rpx;
background: #fff;
width: 100%;
font-size: 36rpx;
color: #fff;
display: flex;
z-index: 99
}
.circle {
width: 40rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 40rpx;
background: blue;
color: #fff;
font-size: 22rpx;
margin-top: 20rpx;
}
.content {
display: flex;
height: 80rpx;
line-height: 80rpx;
}
.input-box {
width: 100%;
height: 60rpx;
line-height: 60rpx;
display: inline-block;
margin-top: 5px;
border-bottom: 1px solid #eee;
padding-left: 10px;
}
.name-box {
width: 20%;
}
.voice-popup-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
border-radius: 10px;
height: 720rpx;
background-color: #fff;
}
.voice-popup-title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
position: relative;
}
.voice-popup-container {
margin-top: 20rpx;
}
.voice-popup-bottom {
display: flex;
height: 80rpx;
color: #fff;
line-height: 80rpx;
margin-top: 30rpx;
}
.voice-popup-btn {
flex: 1;
text-align: center;
background: linear-gradient(90deg, #FF9797, #FFC1E0);
}
.voice-popup-btn:last-child {
background: linear-gradient(90deg, #60F3FF, #088FEB);
}
.voice-model {
width: 300rpx;
height: 300rpx;
display: flex;
justify-content: center;
flex-flow: column;
position: fixed;
top: 50%;
left: 50%;
background: rgba(0, 0, 0, 0.5);
border-radius: 20rpx;
color: #fff;
text-align: center;
margin-left: -150rpx;
z-index: 999;
}
.voice-model img {
width: 200rpx;
height: 200rpx;
margin: 0 auto;
}
.voice-btn {
position: absolute;
bottom: -250rpx;
left: 30%;
width: 180rpx;
height: 180rpx;
background: #eee;
border-radius: 50%;
}
.mask-model {
width: 60%;
height: 100rpx;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
text-align: center;
background: rgba(0, 0, 0, 0.7);
color: #eee;
padding: 5px;
border-radius: 5px;
z-index: 99;
}
.upload-img {
width: 160rpx;
height: 160rpx;
}
</style>

13
package1/AI/voiceInventory.vue

@ -459,7 +459,7 @@
<view style="height: 60rpx;line-height: 60rpx;">
{{item.categoryName}}
</view>
<input type="number" v-model='item.categoryPrice' placeholder="请输入客户价格"
<input type="digit" v-model='item.categoryPrice' placeholder="请输入客户价格"
style="height: 60rpx;padding-left: 20rpx;border: 1px solid #eee;border-radius: 10rpx;">
</view>
<view @tap="updateCate"
@ -7189,6 +7189,11 @@
that.temporaryList = []
if (that.carList.size > 0) {
let isArgin = false
if(that.carList.get(id.productId).stockLogList.size == 1){
if(that.carList.get(id.productId).stockLogList.get('{"颜色":"均色","尺码":"均码"}') != null && that.carList.get(id.productId).stockLogList.get('{"颜色":"均色","尺码":"均码"}') != undefined){
that.carList.get(id.productId).stockLogList.get('{"颜色":"均色","尺码":"均码"}').productCount = 0
}
}
that.carList.forEach(function(value, key) {
value.stockLogList1 = []
if (isArgin == false) {
@ -7250,6 +7255,7 @@
}
})
that.zNum = 0
// that.$nextTick(() => {
// that.carList.forEach(function(value, key) {
@ -7400,6 +7406,11 @@
})
that.zNum = 0
if(that.carList.get(id).stockLogList1.length == 1){
if(that.carList.get(id).stockLogList1[0].attributeList == '{"颜色":"均色","尺码":"均码"}'){
that.carList.get(id).stockLogList1[0].productCount = 0
}
}
// that.$nextTick(() => {
// that.carList.forEach(function(value, key) {

5
package1/index/order.vue

@ -206,7 +206,8 @@
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<res.result.saleDetailDTOList.length;i++){
for(let i=0;i<res.result.saleDetailDTOList.length;i++){
res.result.saleDetailDTOList[i].returnPrice = res.result.saleDetailDTOList[i].discountAmount
res.result.saleDetailDTOList[i].stockLogList = new Map()
that.returnList.set(res.result.saleDetailDTOList[i].productId,res.result.saleDetailDTOList[i])
for(let m=0;m<res.result.saleDetailDTOList[i].stockLogList1.length;m++){
@ -317,7 +318,7 @@
obj.customerCategoryRule = item.saleDetailDTOList[i].customerCategoryRule != null ?JSON.parse(item.saleDetailDTOList[i].customerCategoryRule):null
obj.id = item.saleDetailDTOList[i].productId
obj.price = item.saleDetailDTOList[i].price
obj.buyCount = item.saleDetailDTOList[i].buyCount
obj.buyCount = item.saleDetailDTOList[i].buyCount - 1
obj.lsprice = item.saleDetailDTOList[i].price
obj.categoryId = item.saleDetailDTOList[i].categoryId
obj.zPrice = item.saleDetailDTOList[i].discountAmount

1135
package1/index/orderDetail.vue

File diff suppressed because it is too large

52
package1/index/peopleList.vue

@ -50,9 +50,12 @@
</view>
</view>
<view class="nahuo-mask" v-if="noDaysort">
<view style="width: 100%;margin: 0 auto;background: #fff;height: 200rpx;border: 1px solid #eee;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;">
<view style="width: 100%;margin: 0 auto;background: #fff;height: 300rpx;border: 1px solid #eee;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;">
<view @tap="paixuChange('no_earn')" class="paixu-content" style="border-bottom: 1px solid #eee;">
根据欠款金额倒序
</view>
<view @tap="paixuChange('balance')" class="paixu-content" style="border-bottom: 1px solid #eee;">
根据客户余额倒序
</view>
<view @tap="paixuChange('not_buy_days')" class="paixu-content">
根据未拿货天数倒序
@ -69,20 +72,25 @@
<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 style="width: 50%;">
欠款人数:<text style="margin-right: 10px;">{{allData.personCount?allData.personCount:0}} </text>
欠款总额:<text style="color: red;">{{allData.amountOwed?allData.amountOwed:0}}</text></view>
<view style="width: 50%;">
余额人数:<text style="margin-right: 10px;">{{allBalanceData.personCount?allBalanceData.personCount:0}} </text>
总余额:<text style="color: red;">{{allBalanceData.amountOwed?Math.abs(allBalanceData.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'}"
style="display: flex;flex-direction: column;height: auto;min-height: 240rpx;padding-bottom: 20rpx;">
<view class="name-tel" style="width: 100%;" v-if="popleType=='gysName'">
<text style="line-height: 75rpx;">{{item.consigneeName}}</text>
<text style="width: 360rpx;margin: 10px 0;">{{item.consigneeName}}</text>
<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;">
<text style="width: 360rpx;margin: 10px 0;">
{{item.name}}
<text v-if="item.categoryName != null">({{item.categoryName}})</text>
<text v-if="item.categoryName != null && item.categoryName != 'null'">({{item.categoryName }})</text>
</text>
<text v-if="item.name != '散客'">
{{item.phone}}
@ -92,19 +100,19 @@
<text>{{(item.name == '散客' || item.consigneeName == '默认供应商') && item.city != null && item.city != undefined?'-':item.province + item.city + item.area}}</text>
<text style="width:75%;font-size: 26rpx;color:#747474;height: auto;line-height: 30rpx;">{{(item.name == '散客' || item.consigneeName == '默认供应商')?'-':item.address}}</text>
</view>
<view v-if="popleType== 'khName' && item.noEarn > 0 && userType == 0" style="color: red;position: absolute;top: 20rpx;right: 180rpx;font-size: 28rpx;">
<view v-if="popleType== 'khName' && item.noEarn > 0 && userType == 0" style="color: red;position: absolute;top: 70rpx;right: 180rpx;font-size: 28rpx;">
欠款:{{item.noEarn?item.noEarn :0}}
</view>
<view v-if="popleType== 'gysName' && item.noEarn > 0 && userType == 0" style="color: red;position: absolute;top: 20rpx;right: 180rpx;font-size: 28rpx;">
<view v-if="popleType== 'gysName' && item.noEarn > 0 && userType == 0" style="color: red;position: absolute;top: 70rpx;right: 180rpx;font-size: 28rpx;">
欠款:{{item.noEarn?item.noEarn :0}}
</view>
<view v-if="popleType== 'khName' && item.noEarn < 0 && userType == 0" style="color: red;position: absolute;top: 20rpx;right: 180rpx;font-size: 28rpx;">
<view v-if="popleType== 'khName' && item.noEarn < 0 && userType == 0" style="color: red;position: absolute;top: 70rpx;right: 180rpx;font-size: 28rpx;">
余额:{{item.noEarn?Math.abs(item.noEarn) :0}}
</view>
<view v-if="popleType== 'gysName' && item.noEarn < 0 && userType == 0" style="color: red;position: absolute;top: 20rpx;right: 180rpx;font-size: 28rpx;">
<view v-if="popleType== 'gysName' && item.noEarn < 0 && userType == 0" style="color: red;position: absolute;top: 70rpx;right: 180rpx;font-size: 28rpx;">
余额:{{item.noEarn?Math.abs(item.noEarn) :0}}
</view>
<view v-if="item.notBuyDays!=null && item.name != '散客'" style="position: absolute;top: 70rpx;right: 180rpx;font-size: 28rpx;">
<view v-if="item.notBuyDays!=null && item.name != '散客'" style="position: absolute;top: 20rpx;right: 180rpx;font-size: 28rpx;">
{{item.notBuyDays+'天未拿货'}}
</view>
<view class="name-edit" @tap.stop="toggle('huikuan',item)" style="top: 27rpx;">
@ -285,7 +293,8 @@
}],
userId:'',
noDaysort:false,
allData:{},
allData:{},
allBalanceData:{},
sort:'',
notBuyDays:'',
nahuoDay:false,
@ -434,7 +443,7 @@
this.notBuyDays = ""
this.noDaysort = false
this.nahuoDay = false
this.khOrGysList()
this.getPeopleType()
},
changeSort(type){
if(type == 'nahuo'){
@ -585,12 +594,7 @@
this.popleList = []
this.getPeopleType()
},
clearSearch(){
this.pages = 1
this.searchName = ""
this.popleList = []
this.getPeopleType()
},
//查询拉包工和快递人员的列表
kdyOrlbgList() {
this.status = 'loading';
@ -654,6 +658,16 @@
this.allData = res.result
}else{
}
})
this.tui.request('/app/debt/getAllBalanceByShopId', "post", {
shopId:uni.getStorageSync('shopId'),
userType:this.popleType == 'khName'?'0':this.popleType == 'gysName'?'1':""
}, false, false).then((res) => {
if (res.code == 200) {
this.allBalanceData = res.result
}else{
}
})
},

21
package1/inventory/addGoods.vue

@ -234,7 +234,7 @@
<view style="height: 60rpx;line-height: 60rpx;">
{{item.categoryName}}
</view>
<input type="number" v-model='item.categoryPrice' placeholder="请输入客户价格" style="height: 60rpx;padding-left: 20rpx;border: 1px solid #eee;border-radius: 10rpx;">
<input type="digit" v-model='item.categoryPrice' placeholder="请输入客户价格" style="height: 60rpx;padding-left: 20rpx;border: 1px solid #eee;border-radius: 10rpx;">
</view>
<view @tap="updateCate" style="text-align:center;margin-top:20rpx;width: 100%;height: 60rpx;line-height: 60rpx;background: #088FEB;color: #fff;">
确认
@ -930,14 +930,14 @@
}
}
}
await setTimeout(res => {
for (var i = 0; i < that.defaultList.length; i++) {
for (var m = 0; m < that.defaultList[i].list.length; m++) {
console.log("222")
that.defaultList[i].list[m].checked = false
}
}
}, 400)
// await setTimeout(res => {
// for (var i = 0; i < that.defaultList.length; i++) {
// for (var m = 0; m < that.defaultList[i].list.length; m++) {
// console.log("222")
// that.defaultList[i].list[m].checked = false
// }
// }
// }, 400)
that.$refs.addTypeDialog.close()
},
changessPrice(e, type) {
@ -1064,6 +1064,7 @@
}
},
ejectRuleSelect() {
console.log('defaultList',this.defaultList)
if (this.dataList.id) {
//颜色
for (let m = 0; m < this.multipleList[0].productAttributeValueVoList.length; m++) {
@ -1100,7 +1101,7 @@
}
this.$nextTick(() => {
this.oldMultipleList = this.multipleList
if (this.dataList.id) {
if (this.dataList == '') {
this.multipleList = []
}
this.$refs.addTypeDialog.open('bottom')

201
package1/stock/addStock.vue

@ -1,93 +1,92 @@
<template>
<view class="page1">
<view class="title-box">
<view class="title-box" style="height:8%;">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none"
@blur="search" @clear="clearSearch" />
</view>
<view class="content-box" :style="{height:(height - 240) + 'rpx'}">
<view class="content-left">
<view class="left-box" v-if="gateType == ''" v-for="(item, index) in indexList" :key="index"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;"
:class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
<view class="content-left" style="height: 84%;float: left;position: fixed;top: 8%;">
<view class="left-box" v-if="gateType == ''" v-for="(item, index) in indexList" :key="index"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;"
:class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
<view class="content-right">
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask(item)"></view>
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="content-right" style="width: 570rpx;background: #fff;margin:0 0 120rpx 170rpx;padding-top: 16%;">
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask(item)"></view>
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">
{{item.productSn==null?'':item.productSn}}
<text v-if="item.productName">({{item.productName == null ?'':item.productName}})</text>
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right">
<view class="box-right-name">
{{item.productSn==null?'':item.productSn}}
<text v-if="item.productName">({{item.productName == null ?'':item.productName}})</text>
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
<view class="box-right-num">{{item.supplierName == null ?'':item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="storageType== 0">
<text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
<text>采购价</text>
</view>
<view class="box-right-num">{{item.supplierName == null ?'':item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="storageType== 0">
<text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
<text>采购价</text>
</view>
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
</view>
<view class="price-box">
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box" @tap.stop="seeStockCount(item.stockCount,item.minusStockCount)">
<text>{{item.stockCount + item.minusStockCount}}</text>
<view>
库存
<uni-icons type="help" size="15"></uni-icons>
</view>
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
</view>
<view class="price-box">
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box" @tap.stop="seeStockCount(item.stockCount,item.minusStockCount)">
<text>{{item.stockCount + item.minusStockCount}}</text>
<view>
库存
<uni-icons type="help" size="15"></uni-icons>
</view>
</view>
</view>
</view>
</view>
<view class="right-box" v-for="(item,index) in shopList1" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask(item)"></view>
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="right-box" v-for="(item,index) in shopList1" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask(item)"></view>
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">
{{item.productSn}}
<text v-if="item.productName">({{item.productName == null ?'':item.productName}})</text>
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num">{{item.supplierName == null ?'':item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="storageType== 0">
<text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
<text>采购价</text>
</view>
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
</view>
<view class="price-box">
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box" @tap.stop="seeStockCount(item.stockCount,item.minusStockCount)">
<text>{{item.stockCount + item.minusStockCount}}</text>
<view>
库存
<uni-icons type="help" size="15"></uni-icons>
</view>
</view>
<view class="box-right">
<view class="box-right-name">
{{item.productSn}}
<text v-if="item.productName">({{item.productName == null ?'':item.productName}})</text>
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num">{{item.supplierName == null ?'':item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="storageType== 0">
<text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
<text>采购价</text>
</view>
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
</view>
<view class="price-box">
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box" @tap.stop="seeStockCount(item.stockCount,item.minusStockCount)">
<text>{{item.stockCount + item.minusStockCount}}</text>
<view>
库存
<uni-icons type="help" size="15"></uni-icons>
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore :status="status" />
</view>
<view class="bottom-box">
<view class="bottom-left" @tap="toggle('carPopup')">
@ -102,6 +101,7 @@
<view class="bottom-btn" @tap="backPrevPage">选好了</view>
</view>
</view>
<!-- 购物车弹出层 -->
<uni-popup ref="carPopup" background-color="#fff">
<view class="popup-content">
@ -144,8 +144,7 @@
<view class="popup-bottom-right">
<view class="bottom-btn" @tap="this.$refs.carPopup.close()">关闭</view>
</view>
</view>
<u-loadmore :status="status" />
</view>
</view>
</uni-popup>
<!-- 显示正负库存弹窗 -->
@ -237,10 +236,14 @@
}
},
onReachBottom() {
if (this.pages >= this.totalPages) return;
if (this.pageNum >= this.pages) return;
this.status = 'loading';
this.pages = ++this.pages;
this.stockSelect();
this.pageNum ++
if(this.gateType == 'search'){
this.getShareList('search');
}else{
this.getShareList();
}
},
onShow(){
let that = this;
@ -337,7 +340,7 @@
categoryId: "",
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '100'
pageSize: '10'
}
}else{
this.gateType = ''
@ -345,17 +348,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
}else{
this.shopList1 = []
this.shopList = res.result.records
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 {
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
}
} else {
this.tui.toast(res.message)
@ -506,7 +521,7 @@
.page1 {
display: flex;
flex-direction: column;
height: 92%;
height: 100%;
}
.uni-tab__dot {
@ -571,6 +586,10 @@
.title-box {
background: #fff;
position: fixed;
top: 0;
width: 100%;
z-index: 99;
}
.bottom-box {
@ -616,12 +635,13 @@
background: #fff;
flex: 1;
display: flex;
height: 93%;
}
.content-left {
width: 170rpx;
background: #eee;
height: 100%;
height: 89%;
overflow: scroll;
}
@ -651,6 +671,7 @@
.content-right {
flex: 1;
overflow-y: scroll;
height: 100%;
}
.right-box {

43
package1/stock/addStockList.vue

@ -23,7 +23,7 @@
style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
<view class="shop-productName">
<view style="color:#FF5809;">品名:{{item.productName}}</view>
<view style="color:#FF5809;" v-if="item.productName!=null">品名:{{item.productName}}</view>
<view style="color:#FF5809;">货号:{{item.productSn}}</view>
<view style="position: absolute;top: 30rpx;right: 30rpx;" @tap.stop="delShop(item)">
<uni-icons color="red" type="trash" size="26"></uni-icons>
@ -59,7 +59,7 @@
</view>
</view>
</view>
<view class="content-box" style="margin-bottom:110rpx;">
<view class="content-box" style="margin-bottom:60rpx;">
<view class="content-list" v-if="stock.delFlag == 1">
<view class="list-name">备注:{{stock.remark == null ?'':stock.remark}}</view>
</view>
@ -67,22 +67,22 @@
<view class="content-list">
<view class="list-name">备注</view>
<view class="">
<textarea maxlength="-1" v-model="remark" />
<textarea v-model="remark" />
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore :status="status" />
<view class="bottom-box">
<view class="bottom-left">
<text>共盘点:{{stockList.length}}款</text>
<text>共盘点:{{znum}}款</text>
</view>
<view class="bottom-right" v-if="stock.delFlag == 0">
<button class="bottom-btn" @tap='inventorySubmit'>确认盘点</button>
</view>
</view>
<!-- <u-loadmore :status="status" /> -->
</view>
</template>
@ -102,7 +102,8 @@
status: 'loadmore',
pages: 1,
totalPages: 0,
remark: ''
remark: '',
znum:0,
}
},
filters: {
@ -117,35 +118,38 @@
return name;
}
},
onShow() {
onShow() {
this.pages = 1;
this.stockList = []
this.getStockList();
},
onLoad() {
this.stockId = uni.getStorageSync('stockId')
},
// onReachBottom() {
// if (this.pages >= this.totalPages) return;
// this.status = 'loading';
// this.pages = ++this.pages;
// this.getStockList();
// },
onReachBottom() {
if (this.pages >= this.totalPages) return;
this.status = 'loading';
this.pages ++
this.getStockList();
},
methods: {
// 获取
getStockList() {
this.stockList = []
this.tui.request("/app/checkStock/getCheckStock", "POST", {
checkStockId: this.stockId,
pageNum: this.pages,
pageSize: 10
}, false, false).then((res) => {
if (res.code == 200) {
this.stock = res.result
this.stock = res.result
this.znum=res.result.checkStockDetailVoList.total
this.status = 'nomore';
if (this.pages == 1) {
this.stockList = res.result.checkStockDetailVoList.records
} else {
this.stockList = [...this.stockList, ...res.result.checkStockDetailVoList.records]
}
this.totalPages = res.result.pages
this.totalPages = res.result.checkStockDetailVoList.pages
this.carType = this.stockList.length
} else {
this.tui.toast(res.message)
@ -309,8 +313,7 @@
.content {
border-top: 1px solid #eee;
overflow-y: scroll;
max-height: 100vh;
margin-bottom: 100rpx;
height: 100%;
}
.content-box {
@ -449,7 +452,7 @@
.bottom-box {
width: 100%;
position: absolute;
position: fixed;
bottom: 0rpx;
display: flex;
background: #fff;

Loading…
Cancel
Save