wangfukang 3 years ago
parent
commit
37f020c08e
  1. 149
      package1/AI/AIHangOrderList.vue
  2. 7
      package1/AI/AIInventoryList.vue
  3. 109
      package1/AI/AiChangeGoods.vue
  4. 20
      package1/AI/AiChat.vue
  5. 26
      package1/AI/addAiList.vue
  6. 4
      package1/inventory/batchPrint.vue
  7. 5
      package1/inventory/gategory.vue
  8. 24
      package1/other/custom.vue
  9. 87
      package1/other/customDetail.vue
  10. 115
      package1/other/logistics.vue
  11. 50
      package1/other/logisticsAddress.vue
  12. 109
      package1/stock/addStock.vue
  13. 37
      package1/stock/goodsStock.vue

149
package1/AI/AIHangOrderList.vue

@ -49,9 +49,9 @@
挂单列表
</view>
<view class="content-list" v-for="(item,index) in regList" :key="index">
<view class="image-box">
<view class="image" v-if="item.aiFlag == 1">AI</view>
<view class="image" v-else>扫</view>
<view class="image-box">
<view class="image" v-if="item.aiFlag == 0">扫</view>
<view class="image" v-else>AI</view>
</view>
<view class="content-text">
<view class="text" style="font-weight: bold;font-size: 32rpx;color: #000;margin-top:36rpx;">
@ -62,13 +62,18 @@
<view class="content-btn" v-if="item.aiFlag == 1">
<text class="blink">识别中...</text>
</view>
<view class="content-btn" v-if="item.aiFlag != 1">
<text style="position: absolute;top: 40rpx;right: 20rpx;">
{{item.aiFlag == 2?'识别成功':item.aiFlag == 3?'识别失败':''}}
</text>
</view>
<view style="width: 100%;height: 100rpx;float: left;border-top: 1px solid #eee;">
<view class="btn" @tap="clickCollapse(item)" style="width: 70rpx;">
<uni-icons type="down" size="11" color="#fff"></uni-icons>
</view>
<view class="btn" @tap.stop="toggle('center',item)" v-if="item.aiFlag == 0">语音备注</view>
<view class="btn" @tap.stop="scanCodeAdd(item)" v-if="item.aiFlag == 0">扫码选货</view>
<view class="btn" @tap.stop="goSaleGoods(item)">去开单</view>
<view class="btn" v-if="item.aiFlag != 1" @tap.stop="goGoods(item)">去开单</view>
<view class="btn" @tap.stop="delItem(item.id)" style="background: linear-gradient(90deg, #FF9797, #FFC1E0);">
删除
</view>
@ -280,7 +285,12 @@
onShow() {
this.khName = JSON.parse(JSON.stringify(this.khName)) || ''
if(uni.getStorageSync('hangOrderType') == 'scanCode'){
this.addReg()
if(this.khName != ''){
this.addReg()
}
uni.removeStorageSync('hangOrderType')
return;
}else if(uni.getStorageSync('hangOrderType') == 'changeGoods'){
uni.removeStorageSync('hangOrderType')
return;
}
@ -318,6 +328,7 @@
}).catch((res) => {
this.tui.toast(res)
})
uni.stopPullDownRefresh()
},
addReg() {
this.tui.request("/app/sale/saveOrder", "POST", {
@ -378,7 +389,7 @@
}else if(that.voiceText == null){
that.voiceText = res.result
}else{
res.result = '\n' + res.result
res.result = ' ' + res.result
that.voiceText += res.result
}
}
@ -396,6 +407,7 @@
//扫一扫功能
scanCodeAdd(item) {
let that = this;
uni.setStorageSync('hangOrderType','changeGoods')
uni.scanCode({
success: (res) => {
that.hangId = item.id
@ -604,6 +616,7 @@
productCount: this.zNum,
discountAmount: this.purchasePrice,
unitPrice:this.purchasePrice,
categoryId:this.goodsDetail.categoryId,
productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn,
productPicture: this.goodsDetail.productPicture,
@ -698,58 +711,95 @@
}
})
},
goGoods(item){
var that = this;
if(item.aiNotRecognition != '' && item.aiNotRecognition != null){
uni.showModal({
title: "提示",
content: item.aiNotRecognition + '确认去开单吗?',
success: function(res) {
if (res.confirm) {
that.goSaleGoods(item)
}
}
})
}else if(item.aiNotRecognition == '' && item.saleDetailDTOList == null){
uni.showModal({
title: "提示",
content: '未识别到商品,确认去开单吗?',
success: function(res) {
if (res.confirm) {
that.goSaleGoods(item)
}
}
})
}else{
that.goSaleGoods(item)
}
},
//带参数跳转到开单页
goSaleGoods(item) {
let dataList = []
if(item.aiNotRecognition != ''){
this.tui.toast(item.aiNotRecognition)
}
setTimeout(res => {
if(item.saleDetailDTOList){
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
let obj = {}
obj.saleDetailQueryDTO = item.saleDetailDTOList[i].stockLogList1
obj.num = 0
obj.id = item.saleDetailDTOList[i].productId
obj.price = item.saleDetailDTOList[i].price
obj.lsprice = item.saleDetailDTOList[i].price
obj.zPrice = item.saleDetailDTOList[i].discountAmount
obj.unitPrice = item.saleDetailDTOList[i].discountAmount
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.saleId = item.id
obj.remark = item.remark
obj.xsyId = item.createBy
obj.createByName = item.createByName
dataList.push(obj)
}
}else{
if(item.saleDetailDTOList){
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
let obj = {}
let attrMap = new Map()
let newSaleDetailDTOList = []
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)
let trueCount = hasCount.split('-')[0]
let lastConut = Number(trueCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount)
newSaleDetailDTOList[hasCount.split('-')[1]].productCount = lastConut
}else{
newSaleDetailDTOList.push(item.saleDetailDTOList[i].stockLogList1[m])
attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList,item.saleDetailDTOList[i].stockLogList1[m].productCount+'-'+m)
}
}
obj.saleDetailQueryDTO = newSaleDetailDTOList
obj.num = 0
obj.price = 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.saleId = item.id
obj.remark = item.remark
obj.xsyId = item.createBy
obj.createByName = item.createByName
dataList.push(obj)
}
let khName = {
name:item.userName,
id:item.userId,
area:item.area,
city:item.city,
address:item.receiveAddress,
province:item.province,
}
uni.setStorageSync('carList1', JSON.stringify(dataList))
uni.setStorageSync('khName', JSON.stringify(khName))
uni.setStorageSync('hangOrder', true)
uni.switchTab({
url: '/pages/inventory/goodsList1'
})
}, 1000)
}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)
}
let khName = {
name:item.userName,
id:item.userId,
area:item.area,
city:item.city,
address:item.receiveAddress,
province:item.province,
}
uni.setStorageSync('carList1', JSON.stringify(dataList))
uni.setStorageSync('khName', JSON.stringify(khName))
uni.setStorageSync('hangOrder', true)
uni.switchTab({
url: '/pages/inventory/goodsList1'
})
},
//点击切换折叠状态
clickCollapse(item) {
@ -970,7 +1020,7 @@
.top {
width: 780rpx;
height: 390rpx;
height: 330rpx;
opacity: 1;
background: linear-gradient(90deg, #6484fa 0%, #66e8ff 100%);
overflow: hidden;
@ -1167,7 +1217,8 @@
.banner {
height: 150rpx;
display: flex;
display: flex;
margin-top: 20rpx;
}
.banner-left,

7
package1/AI/AIInventoryList.vue

@ -82,12 +82,7 @@
uni.stopPullDownRefresh();
}, 500);
}).catch((res) => {})
// this.tui.request("/app/sale/buyAi", "POST", {
// aiMsg:'货号WhwBjn00001,x码黑色30件,s码儿,白色10件儿,双XL,x白色50件儿。 '
// }, false, true).then((res) => {
// this.aiList = res.result.records
// }).catch((res) => {})
uni.stopPullDownRefresh()
},
backPage(){
uni.navigateBack({

109
package1/AI/AiChangeGoods.vue

@ -6,12 +6,12 @@
</view>
<view class="title-box">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none"
@confirm="search" />
@confirm="search" @blur="search" @clear="clearSearch" />
</view>
</view>
<view class="content-box" :style="{height:height - 224 +'rpx'}">
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="item"
<view class="left-box" v-if="gateType == ''" v-for="(item, index) in indexList" :key="item"
: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>
@ -48,6 +48,37 @@
</view>
</view>
</view>
</view>
<view class="right-box" v-for="(item,index) in shopList1" :key="index" @tap="backPrevPage(item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || 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.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price">
<view class="price-box">
<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">
<text>{{item.stockCount}}</text>
<text>库存</text>
</view>
</view>
</view>
</view>
</view>
</view>
@ -61,10 +92,12 @@
return {
indexList: [],
pageNum: 1, //分页的页码
shopList: [],
shopList: [],
shopList1: [],
categoryId: '', //分类id
searchName: '', //搜索框输入值
height: 0
height: 0,
gateType:''
}
},
onLoad() {
@ -89,7 +122,7 @@
}
}
this.categoryId = this.indexList[0].id
this.getShareList(this.indexList[0].id);
this.getShareList();
} else {
this.tui.toast(res.message)
}
@ -107,19 +140,38 @@
})
},
//点击分类获取商品列表
getShareList(id) {
this.tui.request("/app/product/getShareList", "POST", {
categoryId: this.categoryId,
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '10'
}, false, false).then((res) => {
if (res.code == 200) {
this.shopList = res.result.records
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
getShareList(type) {
let data = {}
if(type=='search'){
this.gateType = 'search'
data = {
categoryId: "",
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '100'
}
}else{
this.gateType = ''
data = {
categoryId: this.categoryId,
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '100'
}
}
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
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
//跳转新增商品
goAddGoods() {
@ -127,10 +179,21 @@
url: "/package1/inventory/addGoods"
})
},
//顶部搜索框
search(res) {
this.searchName = res.value
this.getShareList()
//顶部搜索框
search(e) {
if(e.value == ''){
this.searchName = ""
this.getShareList()
}else{
this.searchName = e.value
this.getShareList('search')
}
},
//清空搜索条件
clearSearch(){
this.searchName = ''
this.getShareList()
},
//未入库遮罩
clickMask(item) {
@ -155,7 +218,7 @@
}
}
this.categoryId = this.indexList[index].id
this.getShareList(this.indexList[index].id)
this.getShareList()
}
}
}

20
package1/AI/AiChat.vue

@ -125,12 +125,26 @@
close(){
this.$refs.popup.close()
},
spliceMsg(res){
let regex = /嗯|啊|儿|各|阿|恩/g;
return res.replace(regex, '')
},
convertChineseToArabic(str) {
const chineseNumToArabic = {
'零': 0, '一': 1, '二': 2, '两': 2, '三': 3,
'四': 4, '五': 5, '六': 6, '七': 7, '八': 8, '九': 9
};
const regex = /(零|一|二|两|三|四|五|六|七|八|九)/g;
return str.replace(regex, match => chineseNumToArabic[match]);
},
inputSaveText(){
let convertedStr = this.convertChineseToArabic(this.editText);
let getMsg = this.spliceMsg(convertedStr)
if(this.editText == ''){
return;
}
let data = {
text:this.editText
text:getMsg
}
this.msgList.push(data)
this.editText = ''
@ -164,7 +178,7 @@
}
console.log('语音',res)
let data = {
text:res.result
text:this.spliceMsg(res.result)
}
that.msgList.push(data)
that.$forceUpdate()
@ -209,7 +223,7 @@
let text = ' '
for(let i=0;i<this.msgList.length;i++){
this.msgList[i].text
text += this.msgList[i].text + '\n'
text += this.msgList[i].text + ' '
}
console.log(text)
this.tui.request("/app/sale/buyAiSync", "POST", {

26
package1/AI/addAiList.vue

@ -28,20 +28,24 @@
},
methods: {
submit(){
console.log(this.address)
this.tui.request("/app/sale/buyAi","post", {
aiMsg: this.address
}, false, true).then((res) => {
if (res.code == 200) {
this.res = JSON.stringify(res.result)
} else {
this.res = JSON.stringify(res.result)
this.tui.toast(res.message)
}
this.tui.request("/app/problemFeedback/getProblemFeedbackList", "POST", {
problemContent:'',
pageNum:1,
pageSize:10
}, false, false).then((res1) => {
}).catch((res) => {
this.res = JSON.stringify(res.result)
this.tui.toast(res)
})
},
convertChineseToArabic(str) {
const chineseNumToArabic = {
'零': 0, '一': 1, '二': 2, '两': 2, '三': 3,
'四': 4, '五': 5, '六': 6, '七': 7, '八': 8, '九': 9
};
const regex = /(零|一|二|两|三|四|五|六|七|八|九)/g;
return str.replace(regex, match => chineseNumToArabic[match]);
},
goList(type){
if(type == 1){
uni.navigateTo({

4
package1/inventory/batchPrint.vue

@ -20,7 +20,7 @@
</view>
<view class="price-box">
<text>{{item.lsprice}}</text>
<tclass售价</text>
<text>零售价</text>
</view>
</view>
</view>
@ -340,7 +340,7 @@
}
if(this.multipleList.indexOf('零售价') != -1){
console.log(this.multipleList.indexOf('零售价'))
strCmd += blesdk.addCPCLText('0', '230', '24', '0', 0, '零售价:'+(this.purchase !=''?item.lsprice:item.price))
strCmd += blesdk.addCPCLText('0', '230', '24', '0', 0, '零售价:'+(item.lsprice || item.price))
}
strCmd += blesdk.addCPCLQRCode(200, 140, 'H', '1', 6, [item.id,item.shopId]) //二维码
strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中

5
package1/inventory/gategory.vue

@ -38,9 +38,8 @@
<view>
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加分类,如没有想要的快捷项,可以手动输入</text>
</view>
<textarea name="" id="" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding: 12px;margin:20rpx 0;" v-model="typeText"
placeholder="请输入分类名称"></textarea>
<input type="text" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;" v-model="typeText"
placeholder="请输入分类名称">
<ul>
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">

24
package1/other/custom.vue

@ -11,27 +11,25 @@
<uni-data-select style="width: 100%" v-model="shopId" :localdata="shopList" @change="change"></uni-data-select>
</view>
</uni-section>
<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
<!-- <u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection> -->
<view class="ulList" v-if="bList.length > 0">
<ul>
<li v-for="(item,index ) in bList" :key="index">
<uni-card :title="item.id" :sub-title="item.createTime" :extra="item.totalAmount== null ?'暂无': '¥'+item.totalAmount "
thumbnail="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c09dfa8c61c949f8b0dbb8f041d5a501.png">
<view class="uni-body">
<text class="cardText">销售员:</text>
{{ item.createByName== null ?'暂无': item.createByName }}
<text class="cardText">店铺:</text>
{{ item.shopName== null ?'暂无': item.shopName }}
</view>
<view class="uni-body">
<text class="cardText"> 营业额:</text>
<text class="cardText"> 采购额:</text>
<text class="priceText"> {{ item.realAmount== null ?'暂无': item.realAmount}}</text>
<text decode class="cardText"> {{ '&nbsp;&nbsp;&nbsp;&nbsp; 欠款: ' }}</text>
<text class="priceText">{{ item.noEarn== null ?'暂无': item.noEarn}}</text>
</view>
<view class="uni-body">
<text class="cardText"> 订单状态:</text>
{{
item.status == 1 ? '拣货中' : item.status == 2 ? '已预定' : item.status == 3 ? '已作废' : item.status == 4 ? '已取货' :item.status == 6 ? '待配货': '已送达'
}}
{{ item.status == '0' ?'待抢单' :item.status == '1' ?'待取货' :item.status == '2' ?'作废':item.status == '3' ?'待送达' :item.status == '4' ?'已完成' :item.status == '5' ?'下游客户待退货' :item.status == '00' ?'退货待抢单' :item.status == '01' ?'退货待取货' :item.status == '03' ?'退货待送达' :item.status == '04' ?'待确认退货' :item.status == '6' ?'待配货' :'挂单'}}
</view>
<!-- <view class="floatRight"> 采购退货</view> -->
<view class="floatRight" @tap="kehuList(item.id)">查看详情</view>
@ -85,8 +83,16 @@
// this.query.startDate = date
// this.query.endDate = date
// this.range = [date, date]
this.getShopList()
this.getAllList()
},
onShow(){
this.getShopList()
this.getAllList()
},
onLoad(option){
if(option.saleId !='' && option.userId == uni.getStorageSync('userId')){
this.kehuList(option.saleId)
}
},
methods: {
sectionChange(index) {

87
package1/other/customDetail.vue

@ -1,7 +1,7 @@
<template>
<view class="container">
<uni-card :title="sales.userName == null ?'暂无':sales.userName+'('+order.phone+')'" thumbnail="/static/images/dingdan/dd0.png">
<view class="uni-body" v-if="sales.province != null">{{sales.province + sales.area + sales.city + sales.receiveAddress}} </view>
<uni-card :title="shopData.shopName == null ?'暂无':shopData.shopName" thumbnail="/static/images/dingdan/dd0.png">
<view class="uni-body" v-if="shopData.shopAddress != null">{{shopData.shopAddress}} </view>
</uni-card>
<view class="tui-order-item boxbg">
@ -90,12 +90,8 @@
<u-collapse-item v-for="(item,index) in shopList" :key="index" :title="item.productName"
:name="item.saleId">
<view class="u-collapse-content" v-for="(val, index2) in item.stockLogList1" :key="index2">
<!-- <u-icon name="checkmark-circle" color="#5fd9ee" size="20" v-if="isReturn"></u-icon>
<u-icon name="checkmark-circle" color="#999" size="20" v-if="isReturn"></u-icon> -->
{{ val.attributeList.substr(1).substring(0,val.attributeList.substr(1).length-1).replace(/\"/g, "") }}
* {{val.productCount}}
<!-- <u-number-box integer v-if="isReturn" :max="val.productCount" :min="0"
v-model="val.returnCount"></u-number-box> -->
</view>
</u-collapse-item>
</u-collapse>
@ -131,7 +127,6 @@
</view>
<view class="tui-order-flex">
<view class="tui-item-title">物流单:</view>
<!-- <view class="tui-item-content">{{ order.kdOrderId }}</view> -->
<image show-menu-by-longpress
:src="orderXd.orderPicture"
@tap="showImage"></image>
@ -161,7 +156,7 @@
<view class="tui-order-flex">
<view class="tui-item-title">配送状态:</view>
<view class="tui-item-content">
{{ sales.status == 0 ?'待抢单' :sales.status == 1 ?'待取货' :sales.status == 2 ?'作废':sales.status == 3 ?'待送达' :sales.status == 4 ?'已完成' :sales.status == 5 ?'下游客户待退货' :sales.status == 00 ?'退货待抢单' :sales.status == 01 ?'退货待取货' :sales.status == 03 ?'退货待送达' :sales.status == 04 ?'待确认退货' :sales.status == 6 ?'待配货' :'挂单'}}
{{ sales.status == '0' ?'待抢单' :sales.status == '1' ?'待取货' :sales.status == '2' ?'作废':sales.status == '3' ?'待送达' :sales.status == '4' ?'已完成' :sales.status == '5' ?'下游客户待退货' :sales.status == '00' ?'退货待抢单' :sales.status == '01' ?'退货待取货' :sales.status == '03' ?'退货待送达' :sales.status == '04' ?'待确认退货' :sales.status == '6' ?'待配货' :'挂单'}}
</view>
</view>
</view>
@ -237,6 +232,82 @@
},false,true).then(res => {
this.collection = res.result
}).catch(res => {});
},
//退款接口
getReturnOrder(id) {
let that = this;
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 != '') {
this.inventoryList = res.result
let returnDat = new Map();
this.inventoryList.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) {
that.returnList.push(res.result)
that.shopList.push(...res.result.saleDetailDTOList);
var data = res.result.saleDetailDTOList
for (let i = 0; i < data.length; i++) {
for (let m = 0; m < data[i].stockLogList1
.length; m++) {
if (returnDat.has(data[i].productId + '-' + data[i]
.stockLogList1[m].attributeList) == true) {
returnDat.set(data[i].productId + '-' + data[i]
.stockLogList1[m].attributeList,
returnDat.get(data[i].productId + '-' +
data[i].stockLogList1[m]
.attributeList) + data[i]
.stockLogList1[m].productCount)
} else {
returnDat.set(data[i].productId + '-' + data[i]
.stockLogList1[m].attributeList, data[
i].stockLogList1[m].productCount)
}
}
}
this.zReturnNum = 0
this.$nextTick(()=>{
for (let i = 0; i < that.list.length; i++) {
for (let z = 0; z < that.list[i].stockLogList1.length; z++) {
that.zReturnNum += that.list[i].stockLogList1[z].productCount
if (returnDat.has(that.list[i].productId + '-' + that.list[i].stockLogList1[z].attributeList) == true) {
that.list[i].stockLogList1[z].maxNum = that.list[i].stockLogList1[z].productCount -
returnDat.get(that.list[i].productId + '-' + that.list[i].stockLogList1[z].attributeList)
}else{
that.list[i].stockLogList1[z].maxNum = that.list[i].stockLogList1[z]
.productCount
}
}
}
})
console.log(returnDat);
returnDat.forEach(function(value, key) {
that.zReturnNum -= value
})
console.log('退货',that.zReturnNum)
}
}).catch((res) => {})
})
} else {
for (let i = 0; i < that.list.length; i++) {
for (let z = 0; z < that.list[i].stockLogList1.length; z++) {
that.list[i].stockLogList1[z].maxNum = that.list[i].stockLogList1[z]
.productCount
}
}
}
} else {
this.tui.toast(res.message)
}
})
console.log('刷新',that.list)
},
//点击图片放大
showImage() {

115
package1/other/logistics.vue

@ -7,10 +7,10 @@
<view class="title">
<i class="iconfont icon-huaban">
今日订单
<text style="color:red;text-decoration-line: underline;padding-left:30rpx;">({{waitUpDoorNum}}个待上门取货)</text>
<view class="btn" @tap="gotoSearchData">
<text @tap="toggle" style="color:red;text-decoration-line: underline;padding-left:30rpx;">({{waitUpDoorNum}}个待上门取货)</text>
<!-- <view class="btn" @tap="gotoSearchData">
历史订单 >
</view>
</view> -->
</i>
</view>
</view>
@ -43,7 +43,39 @@
<u-loadmore :status="status" />
<u-modal :show="modalShow" title="详细地址" :content='content' @confirm="modalShow = false"></u-modal>
<uni-fab ref="fab" :content="content" :horizontal="horizontal"
@trigger="trigger" />
@trigger="trigger" />
<!-- 待上门订单弹窗 -->
<uni-popup ref="popup" background-color="#fff" :is-mask-click="true">
<view class="type-popup" style="margin-bottom: 0;border-radius: 0;">
<view style="height: 80rpx;font-size: 36rpx;font-weight: bold;line-height: 80rpx;text-align: center;">
待上门订单
</view>
<view class="ulList">
<ul>
<li v-for="(item,index) in upDoorList" :key="index">
<uni-card :title="'店铺名称:'+item.shopName" :sub-title="item.shopAddress+'('+item.createByPhone+')'">
<view class="uni-body">
<text class="cardText">{{item.province + item.city + item.area}}</text>
</view>
<view class="uni-body">
<text class="cardText"> 下单时间:</text>
<text class="priceText"> {{item.createTime}}</text>
</view>
<view class="uni-body" v-if="current != 3">
<text class="cardText"> 客户姓名:</text>
<text class="priceText"> {{item.userName}}</text>
</view>
<view style="display: flex;height: 80rpx;line-height: 80rpx;">
<view class="copy-text" @tap="upDoorCopyAddress(item,'fa')">复制发货人地址</view>
<view class="copy-text" @tap="upDoorCopyAddress(item,'shou')">复制收货人地址</view>
</view>
<view class="popup-btn" @tap="getSale(item)">确认取件</view>
</uni-card>
</li>
</ul>
</view>
</view>
</uni-popup>
</view>
</template>
@ -90,7 +122,8 @@
type:'',
companyName:'',
current:0,
waitUpDoorNum:0
waitUpDoorNum:0,
upDoorList:[]
}
},
created() {
@ -140,6 +173,7 @@
dataType: 'json',
success: (res) => {
if (res.data.code == 200){
this.upDoorList = res.data.result.records
this.waitUpDoorNum = res.data.result.total
}
},
@ -148,6 +182,35 @@
}
})
},
toggle(){
this.$refs.popup.open()
},
getSale(item){
uni.request({
url: this.tui.interfaceUrl() + '/app/sale/companyGetSale',
data: {
saleId:item.saleId
},
header: {
'content-type': 'application/x-www-form-urlencoded',
'appWLToken': this.tui.getToken()
},
method: 'POST', //'GET','POST'
dataType: 'json',
success: (res) => {
if (res.data.code == 200){
this.tui.toast("确认取货成功")
setTimeout(res => {
this.waitPickUp()
}, 1000)
}
},
fail: (res) => {
this.tui.toast("网络不给力,请稍后再试~")
}
})
},
upOrDown(){
var url
if(this.type == 1){ //上线状态
@ -208,6 +271,27 @@
}
});
}
},
//复制地址
upDoorCopyAddress(item,type){
console.log(item);
if(type=='fa'){
var data = item.shopName + item.createByPhone +'河北省沧州市运河区明珠商贸城' + item.shopAddress
uni.setClipboardData({
data: data,
success: function () {
console.log('复制成功');
}
});
}else{
var data = item.userName +item.userPhone + item.province+item.city+item.area + item.receiveAddress
uni.setClipboardData({
data: data,
success: function () {
console.log('复制成功');
}
});
}
},
sectionChange(index) {
this.current = index
@ -445,5 +529,26 @@
font-size: 28rpx;
margin-bottom: 26rpx;
}
}
.type-popup{
width: 600rpx;
height: 1200rpx;
overflow: scroll;
background: #fff;
border-radius: 10px;
position: relative;
margin-bottom: 40rpx;
}
.popup-btn{
width: 120rpx;
height: 60rpx;
border-radius: 10px;
color: #fff;
font-size: 24rpx;
line-height: 60rpx;
text-align: center;
background: linear-gradient(90deg, #60F3FF, #088FEB);
float: right;
margin: 0 10rpx 20rpx 0;
}
</style>

50
package1/other/logisticsAddress.vue

@ -6,9 +6,15 @@
<view class="list-1" style="display: flex;flex-direction: column;height: 150rpx;" v-for="(item, index) in standardList" :key="index">
<view class="name-tel" style="width: 75%;overflow: hidden;">
<text style="line-height: 75rpx;">{{item.province +'-'+ item.city+'-'+item.area}}</text>
</view>
<view class="name-tel" style="width: 75%;overflow: hidden;">
<text style="line-height: 75rpx;">{{item.network == null ?'':item.network}}</text>
</view>
<view class="name-tel" style="width: 75%;overflow: hidden;">
<!-- <view class="name-tel" style="width: 75%;overflow: hidden;">
<text style="line-height: 75rpx;">{{item.chargingStandard}}</text>
</view> -->
<view class="name-edit" style="height: 50%;position: absolute;bottom: 0;right: 20%;">
<text @tap.stop="priceDetail(item)" style='line-height: 75rpx;color: #088FEB;'>费用说明</text>
</view>
<view class="name-edit">
<text @tap.stop="addAddress(item)" v-if="type!='kaidan'" style='line-height: 75rpx;color: #088FEB;'>编辑</text>
@ -35,6 +41,20 @@
</uni-forms>
<view class="address-btn" @tap="setAddress">确认</view>
</view>
</uni-popup>
<!-- 费用说明 -->
<uni-popup ref="payDialog" background-color="#fff">
<view class="popup-content">
<view class="popup-title">
<text>费用说明</text>
</view>
<view v-if="chargingStandard != undefined" style="margin-top: 20rpx;">
{{chargingStandard}}
</view>
<view v-if="chargingStandard == null || chargingStandard == undefined || chargingStandard == ''" style="height:300rpx;line-height: 300rpx;">
暂无此线路费用明细
</view>
</view>
</uni-popup>
</view>
</template>
@ -50,7 +70,8 @@
city: '',
area: '',
id: ''
},
},
chargingStandard:'',
show: false,
standardList:[],
status: 'loadmore',
@ -90,6 +111,11 @@
this.getList();
},
methods: {
priceDetail(item){
console.log(item)
this.chargingStandard = item.chargingStandard
this.$refs.payDialog.open()
},
//获取列表
getList(){
let that = this;
@ -298,18 +324,20 @@
.popup-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
height: 700rpx;
background-color: #fff;
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
height: auto;
background-color: #fff;
min-height: 500rpx;
text-align: center;
}
.popup-title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
font-size: 36rpx;
font-weight: bold;
text-align: center;
position: relative;
}

109
package1/stock/addStock.vue

@ -2,11 +2,11 @@
<view class="page1">
<view class="title-box">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none"
@confirm="search" />
@confirm="search" @blur="search" @clear="clearSearch" />
</view>
<view class="content-box" :style="{height:(height - 240) + 'rpx'}">
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="index"
<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>
@ -42,6 +42,36 @@
</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"></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.productName}}</view>
<view class="box-right-num">{{item.productSn}}</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">
<text>{{item.stockCount}}</text>
<text>库存</text>
</view>
</view>
</view>
</view>
</view>
</view>
@ -116,6 +146,7 @@
status: 'loadmore',
pageNum: 1, //分页的页码
shopList: [],
shopList1: [],
pages: 1,
totalPages: 0,
info: 0,
@ -131,7 +162,8 @@
productId:'',
pdList:[],
stockList:[],
height:0
height:0,
gateType:''
}
},
filters: {
@ -218,7 +250,7 @@
}
}
this.categoryId = this.indexList[0].id
this.getShareList(this.indexList[0].id);
this.getShareList();
} else {
this.tui.toast(res.message)
}
@ -241,21 +273,38 @@
delta: 1
})
},
//点击分类获取商品列表
getShareList(id) {
this.tui.request("/app/product/getShareList", "POST", {
categoryId: this.categoryId,
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '10'
}, false, false).then((res) => {
if (res.code == 200) {
this.shopList = res.result.records
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
getShareList(type) {
let data = {}
if(type=='search'){
this.gateType = 'search'
data = {
categoryId: "",
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '100'
}
}else{
this.gateType = ''
data = {
categoryId: this.categoryId,
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '100'
}
}
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
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
//弹出购物车或者商品规格选择弹窗
toggle(type, item) {
@ -323,10 +372,21 @@
}
})
},
//顶部搜索框
search(res) {
this.searchName = res.value
this.getShareList()
//顶部搜索框
search(e) {
if(e.value == ''){
this.searchName = ""
this.getShareList()
}else{
this.searchName = e.value
this.getShareList('search')
}
},
//清空搜索条件
clearSearch(){
this.searchName = ''
this.getShareList()
},
//点击左侧菜单切换
clickLeftBtn(index) {
@ -338,7 +398,7 @@
}
}
this.categoryId = this.indexList[index].id
this.getShareList(this.indexList[index].id)
this.getShareList()
},
//删除整条商品
delShop(item) {
@ -652,7 +712,6 @@
line-height: 140rpx;
color: #777;
background: #eee;
margin-top:20rpx;
}
button {
color: #ffffff !important;

37
package1/stock/goodsStock.vue

@ -67,42 +67,7 @@
this.tui.toast(res.message)
}
})
// this.tui.request("/purchaseOcrPicture/multiRoundConversationCall", "POST", {
// picturePath:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/c6b429d82cc445dc836ea1e6d7a5f6f2.jpg',
// secondQuestionMsg:'',
// firstQuestionMsg:'这是一个入库小票,JSON格式为:{ "productSn": "货号", "productName": "商品名称","price": "单价", "productCount": "数量", "attributeList": "{"颜色":"红色","尺码":"均码"}" }, 请帮我返回46条不同商品或规格的json数据'
// }, false, true).then((res) => {
// this.status = 'nomore';
// if (res.code == 200) {
// if (this.pages == 1) {
// this.stockList = res.result.records
// } else {
// this.stockList = [...this.stockList, ...res.result.records]
// }
// this.totalPages = res.result.pages
// } else {
// this.tui.toast(res.message)
// }
// })
// this.tui.request("/purchaseOcrPicture/invoicingAi", "POST", {
// questionMsg:'货号87654335,S码天空蓝70件,M码儿,白色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654336,S码所有颜色80件,M码儿,白色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654337,S码黑色30件,M码儿,白色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654338,S码粉红色40件,M码儿,玫瑰色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654339,S码奶奶灰50件,M码儿,绿色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654340,S码卡其色60件,M码儿,王浩伟色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654341,S码天空蓝70件,M码儿,白色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654342,S码天空蓝70件,M码儿,白色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654343,S码天空蓝70件,M码儿,白色50件儿,XL码儿,天蓝色50件儿。\n" + "货号87654344,S码天空蓝70件,M码儿,白色50件儿,XL码儿,天蓝色50件儿。\n" + " 这是客户要货信息,json格式为:[{ "productSn": "货号", "attributeList": "[{"颜色":"红色","尺码":"均码","productCount": "数量"}]" }],请帮我返回10条不同商品或规格的json数据'
// }, false, true).then((res) => {
// this.status = 'nomore';
// if (res.code == 200) {
// if (this.pages == 1) {
// this.stockList = res.result.records
// } else {
// this.stockList = [...this.stockList, ...res.result.records]
// }
// this.totalPages = res.result.pages
// } else {
// this.tui.toast(res.message)
// }
// })
})
},
searchList(res) {
this.pages = 1;

Loading…
Cancel
Save