Browse Source

8-7代码迭代更新

lmy
zhangsiyu 2 years ago
parent
commit
eb014e3ed1
  1. 24
      api/user.js
  2. 8
      config/host.js
  3. 235
      pages/index/index.vue
  4. 2
      pages/login/login.vue
  5. 27
      pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue
  6. 6
      pagesHome/pages/CustomerSign/CustomerSign.vue
  7. 30
      pagesHome/pages/DeliveryCustomerScan/DeliveryCustomerScan.vue
  8. 1
      pagesHome/pages/LoadingDetails/LoadingDetails.vue
  9. 14
      pagesHome/pages/LoadingScan/LoadingScan.vue
  10. 6
      pagesHome/pages/SelfPScanList/SelfPScanList.vue
  11. 20
      pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue
  12. 20
      pagesHome/pages/SelfPickupScan/SelfPickupScan.vue
  13. 37
      pagesHome/pages/SignDetailScan/SignDetailScan.vue
  14. 20
      pagesHome/pages/StockUplistScandetails/StockUplistScandetails.vue
  15. 27
      pagesHome/pages/pickingScan/pickingScan.vue
  16. 20
      pagesHome/pages/setbarcode/setbarcode.vue
  17. 5
      pagesHome/pages/signinScan/signinScan.vue
  18. 489
      unpackage/dist/dev/app-plus/app-service.js
  19. 2
      unpackage/dist/dev/app-plus/pages/login/login.css
  20. 16
      unpackage/dist/dev/mp-weixin/api/user.js
  21. 4
      unpackage/dist/dev/mp-weixin/common/vendor.js
  22. 2
      unpackage/dist/dev/mp-weixin/config/host.js
  23. 158
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  24. 2
      unpackage/dist/dev/mp-weixin/pages/login/login.wxss
  25. 27
      unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.js
  26. 13
      unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerSign/CustomerSign.js
  27. 2
      unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerSign/CustomerSign.wxml
  28. 58
      unpackage/dist/dev/mp-weixin/pagesHome/pages/DeliveryCustomerScan/DeliveryCustomerScan.js
  29. 2
      unpackage/dist/dev/mp-weixin/pagesHome/pages/DeliveryCustomerScan/DeliveryCustomerScan.wxml
  30. 1
      unpackage/dist/dev/mp-weixin/pagesHome/pages/LoadingDetails/LoadingDetails.js
  31. 13
      unpackage/dist/dev/mp-weixin/pagesHome/pages/LoadingScan/LoadingScan.js
  32. 6
      unpackage/dist/dev/mp-weixin/pagesHome/pages/SelfPScanList/SelfPScanList.js
  33. 20
      unpackage/dist/dev/mp-weixin/pagesHome/pages/SelfPickupDetails/SelfPickupDetails.js
  34. 26
      unpackage/dist/dev/mp-weixin/pagesHome/pages/SelfPickupScan/SelfPickupScan.js
  35. 2
      unpackage/dist/dev/mp-weixin/pagesHome/pages/SelfPickupScan/SelfPickupScan.wxml
  36. 29
      unpackage/dist/dev/mp-weixin/pagesHome/pages/SignDetailScan/SignDetailScan.js
  37. 2
      unpackage/dist/dev/mp-weixin/pagesHome/pages/SignDetailScan/SignDetailScan.wxml
  38. 4
      unpackage/dist/dev/mp-weixin/pagesHome/pages/SignDetailScan/SignDetailScan.wxss
  39. 20
      unpackage/dist/dev/mp-weixin/pagesHome/pages/StockUplistScandetails/StockUplistScandetails.js
  40. 45
      unpackage/dist/dev/mp-weixin/pagesHome/pages/pickingScan/pickingScan.js
  41. 2
      unpackage/dist/dev/mp-weixin/pagesHome/pages/pickingScan/pickingScan.wxml
  42. 16
      unpackage/dist/dev/mp-weixin/pagesHome/pages/setbarcode/setbarcode.js
  43. 5
      unpackage/dist/dev/mp-weixin/pagesHome/pages/signinScan/signinScan.js
  44. 7
      unpackage/dist/dev/mp-weixin/utils/cacheimg.js
  45. 6
      unpackage/dist/dev/mp-weixin/utils/request.js
  46. 82
      utils/cacheimg.js
  47. 8
      utils/request.js

24
api/user.js

@ -399,3 +399,27 @@ export function billLadingscan(data) {
data
});
}
/**
* 获取工作台图标
* @param {Object} data
*/
export function appMenuroutes(data) {
return request({
url: `blade-system/app/routes`,
method: "get",
data
});
}
/**
* 按钮权限
* @param {Object} data
*/
export function appbuttons(data) {
return request({
url: `blade-system/app/buttons`,
method: "get",
data
});
}

8
config/host.js

@ -4,13 +4,15 @@
* 测试域名
* */
// const devhost='http://192.168.10.51:8888/'
// const devhost='http://192.168.10.126:8889/'
const devhost='http://192.168.10.73:8777/'
const devhost='http://192.168.10.126:8889/'
// const devhost='http://192.168.10.73:8777/'
// const devhost='http://192.168.10.200:9999/'
// const devhost='http://192.168.10.200:9999/'
// const host='http://192.168.1.5:9503/api'
/**
* 正式域名
* */
const prohost='http://192.168.10.100:9999/'
const prohost='http://192.168.10.200:9999/'
/**
* 图片域名
* */

235
pages/index/index.vue

@ -1,10 +1,5 @@
<template>
<u-navbar
title="工作台"
placeholder
border=true
leftIcon=''
></u-navbar>
<u-navbar title="工作台" placeholder border=true leftIcon=''></u-navbar>
<view class="mabox" v-for="item in tablist">
<view class="boxtitl">
{{item.name}}
@ -28,11 +23,22 @@
</template>
<script lang="ts" setup>
import {
onLoad,
onShow,
onHide,
onUnload
} from '@dcloudio/uni-app'
import {
appMenuroutes,
appbuttons
} from "@/api/user.js"
import { getImageCache } from '@/utils/cacheimg.js'
import { listtype } from '@/interfaces/home/index'
// import Tabber from '@/compoment/Tabber/Tabber.vue'
import { reactive , toRefs } from "vue";
let details=reactive<listtype>({
tablist:[
import { inject, reactive, toRefs, watchEffect } from "vue";
let details = reactive<listtype>({
tablist: [
// {
// type:1,
// name:'',
@ -44,62 +50,160 @@
// },
// ]
// },
{
type:1,
name:'出库',
minilist:[
{
icon:'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
name:'拣货扫描',
router:'/pagesHome/pages/pickingScan/pickingScan',
},
{
icon:'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
name:'自提扫描',
router:'/pagesHome/pages/SelfPickupScan/SelfPickupScan',
},
]
},
{
type:1,
name:'配送',
minilist:[
{
icon:'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
name:'装车扫描',
router:'/pagesHome/pages/LoadingScan/LoadingScan',
},
{
icon:'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
name:'签收扫描',
router:'/pagesHome/pages/signinScan/signinScan',
},
]
},
{
type:1,
name:'离线上传',
minilist:[
{
icon:'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
name:'离线上传',
router:'/pagesHome/pages/OfflineUpload/OfflineUpload',
},
]
},
// {
// type: 1,
// name: '',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/pickingScan/pickingScan',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/SelfPickupScan/SelfPickupScan',
// },
// ]
// },
// {
// type: 1,
// name: '',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/LoadingScan/LoadingScan',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '',
// router: '/pagesHome/pages/signinScan/signinScan',
// },
// ]
// },
// {
// type: 1,
// name: '线',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '线',
// router: '/pagesHome/pages/OfflineUpload/OfflineUpload',
// },
// ]
// },
]
})
function gopathpage(path:string){
function gopathpage(path : string) {
uni.navigateTo({
url:path
url: path
})
}
const { tablist }=toRefs(details)
async function init(){
let tabber=uni.getStorageSync('homerouter')
if(tabber){
details.tablist=tabber
return
}
let res=await appMenuroutes({})
console.log(res,'-------------');
if(res.code==200){
getimgcache(res.data[0])
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
}
async function initbuts(){
let authbut=uni.getStorageSync('authbuts')
if(authbut){
return
}
let butres=await appbuttons({})
console.log(butres.data);
let qxan=[]
butres.data.map(item=>{
item.children.map(ite=>{
qxan.push(ite.name)
})
})
uni.setStorageSync('authbuts',qxan)
}
onShow(()=>{
init()
initbuts()
})
watchEffect(()=>{
if(details.tablist.length>0){
uni.setStorageSync('homerouter',details.tablist)
}
})
function getimgcache(list) {
let maxarr=[]
list.children.map(async item=>{
let arr={
type:1,
name:item.name,
minilist:[]
}
await item.children.map(async ite=>{
let result = await getImageCache('http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png')
console.log("image cache", result);
let obj={
icon:result,
name:ite.name,
router:ite.path
}
arr.minilist.push(obj)
})
maxarr.push(arr)
})
details.tablist=maxarr
// details.tablist.map((item,index)=>{
// item.minilist.map(async (ite,inde)=>{
// let result = await getImageCache('http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png')
// console.log("image cache", result);
// if (result) {
// details.tablist[index].minilist[inde].icon=result
// } else {
// details.tablist[index].minilist[inde].icon=ite.icon
// }
// })
// })
// setTimeout(()=>{
// console.log(details.tablist);
// },3500)
}
// #ifdef APP
// const util=(inject('utils') as any)
// let text='! 0 200 200 500 1\r\n'
// text+='SETBOLD 2\r\n'
// text+=`T 56 0 200 0 :${'2023-01-12'}\r\n`
// text+=`T 5 3 145 15 ${1}\r\n`
// text+='LINE 5 110 360 110 4\r\n'
// text+=`T 56 3 5 120 ${1+'-'+15}\r\n`
// text+=`T 56 0 5 170 ${1231}\r\n`
// // text+='FORM\r\n'
// text+='PRINT\r\n'
// let sylist=util.initbl()
// console.log(sylist);
// sylist.map(item=>{
// console.log(item);
// if(item.uuids){
// util.getbl(item,text)
// }
// })
// #endif
const { tablist } = toRefs(details)
</script>
<style lang="scss">
.mabox{
.mabox {
display: flex;
flex-direction: column;
padding: 20upx 0;
@ -111,7 +215,8 @@
margin-top: 10upx;
border-radius: 10upx;
box-shadow: 0rpx 2rpx 10rpx 0rpx #e2e2e380;
.boxtitl{
.boxtitl {
font-size: 34upx;
font-weight: 500;
margin-bottom: 10upx;
@ -121,22 +226,26 @@
padding-bottom: 20upx;
color: #092C4D;
}
.minboxlist{
.minboxlist {
display: grid;
grid-template-columns: 25% 25% 25% 25%;
padding-top: 10upx;
>view{
>view {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 10upx;
>image{
>image {
width: 60upx;
}
>view{
>view {
font-size: 26upx;
}
}
}
}
</style>
</style>

2
pages/login/login.vue

@ -165,7 +165,7 @@
background-color: #ffffff;
border-radius: 10upx;
box-shadow: 0upx 2upx 10upx 0upx #e2e2e380;
margin-top: 20%;
margin-top: 110upx;
padding-bottom: 40upx;
padding-top: 30upx;
.title{

27
pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue

@ -140,8 +140,8 @@
tiplists.value.setdetails({
isshow:true,
tipstate:1,
title:'请输入签收的包条',
placeholder:'请输入签收的包条',
title:'请输入扫描的码',
placeholder:'请输入扫描的码',
inputtext:'',
success:(detail)=>{
details.scancode=detail.inputtext
@ -201,6 +201,18 @@
}
let res=await deliveryloadingscan(data)
console.log(res);
if(res.code==200){
uni.showToast({
title:res.msg,
icon:'none'
})
initpage()
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
}else if(details.orderStatus==2){
let data={
reservationId:details.items.id,
@ -211,6 +223,17 @@
}
let res=await deliveryloadinginventory(data)
console.log(res);
if(res.code==200){
uni.showToast({
title:res.msg,
icon:'none'
})
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
}
initpage()

6
pagesHome/pages/CustomerSign/CustomerSign.vue

@ -59,7 +59,7 @@
<view @click.stop="gosinorderscan(item)">签到扫描</view>
<view @click="uplodimg(item)">上传签收图片</view>
</view>
<view @click="allclick(item)">
<view @click="allclick(item)" v-if="authbuts.indexOf('批量签收')!=-1&&item.deliveryStatus!='完成配送'">
批量签收
</view>
</view>
@ -87,7 +87,7 @@
items:{} as any,
id:'',
datalist:[] as any,
authbuts:uni.getStorageSync('authbuts')
})
const tiplists=ref(null)
onLoad((op)=>{
@ -233,7 +233,7 @@
url:'/pagesHome/pages/signOrderScan/signOrderScan?item='+JSON.stringify(item)+'&deliveryId='+details.id
})
}
const { items,datalist }=toRefs(details)
const { authbuts,items,datalist }=toRefs(details)
</script>
<style lang="scss">

30
pagesHome/pages/DeliveryCustomerScan/DeliveryCustomerScan.vue

@ -34,7 +34,7 @@
</view>
<scroll-view class="scoolv" scroll-y="true">
<view class="minbx">
<view class="its" @click="showsdqs" v-for="item in datalist">
<view class="its" v-for="item in datalist">
<view class="titl">
客户{{item.consignee}}
</view>
@ -58,7 +58,7 @@
</view>
</view>
</view>
<view class="bts">
<view class="bts" v-if="authbuts.indexOf('一键装车')!=-1&&item.isload!='是'">
<view @click.stop="ckoneloading(item)">一键装车</view>
</view>
</view>
@ -91,6 +91,7 @@
datalist:[],
items:{} as any,
scancode:'',
authbuts:uni.getStorageSync('authbuts')
})
const tip=ref(null)
const tiplists=ref(null)
@ -113,8 +114,8 @@
tiplists.value.setdetails({
isshow:true,
tipstate:1,
title:'请输入签收的包条',
placeholder:'请输入签收的包条',
title:'请输入扫描的码',
placeholder:'请输入扫描的码',
inputtext:'',
success:(detail)=>{
details.scancode=detail.inputtext
@ -140,11 +141,17 @@
let loadingId=uni.getStorageSync('checkvehicle').id
let data={
reservationId:item.id,
loadingId
loadingId,
deliveryId:details.id
}
let response=await deliveryoneloading(data)
if(response.code==200){
}else{
uni.showToast({
title:response.msg,
icon:'none'
})
}
tip.value.setisshow(false)
},
@ -167,6 +174,17 @@
}
let res=await deliveryloadingscan(data)
console.log(res);
if(res.code==200){
uni.showToast({
title:res.msg,
icon:'none'
})
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
}
async function initpage(){
let data={
@ -185,7 +203,7 @@
url:'/pagesHome/pages/LoadingDetails/LoadingDetails?id='+item.id
})
}
const { items,datalist }=toRefs(details)
const { authbuts,items,datalist }=toRefs(details)
</script>
<style lang="scss">

1
pagesHome/pages/LoadingDetails/LoadingDetails.vue

@ -121,6 +121,7 @@
initpage()
}
async function initpage(){
details.dataList=[]
let data={
current:details.current,
size:details.size,

14
pagesHome/pages/LoadingScan/LoadingScan.vue

@ -147,7 +147,19 @@
}
let response=await deliverypage(data)
console.log(response);
details.recordsList=response.data.records
if(details.current==1){
details.recordsList=response.data.records
}else{
if(response.data.records.lngth==0){
uni.showToast({
title:'已经到底了。',
icon:'none'
})
return
}
details.recordsList=details.recordsList.concat(response.data.records)
}
// details.recordsList=response.data.records
}
function checktime(event : any) {
console.log(event);

6
pagesHome/pages/SelfPScanList/SelfPScanList.vue

@ -131,8 +131,8 @@
tiplists.value.setdetails({
isshow:true,
tipstate:1,
title:'请输入签收的包条',
placeholder:'请输入签收的包条',
title:'请输入扫描的码',
placeholder:'请输入扫描的码',
inputtext:'',
success:(detail)=>{
details.scancode=detail.inputtext
@ -157,7 +157,7 @@
console.log(res);
if(res.code==200){
uni.showToast({
title:'签收成功',
title:res.msg,
icon:'none'
})
initpage()

20
pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue

@ -142,8 +142,8 @@
tiplists.value.setdetails({
isshow:true,
tipstate:1,
title:'请输入签收的包条',
placeholder:'请输入签收的包条',
title:'请输入扫描的码',
placeholder:'请输入扫描的码',
inputtext:'',
success:(detail)=>{
details.scancode=detail.inputtext
@ -166,10 +166,18 @@
}
let res=await billLadingscan(data)
console.log(res);
uni.showToast({
title:res.msg,
icon:'none'
})
if(res.code==200){
uni.showToast({
title:res.msg,
icon:'none'
})
initpage()
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
}
async function initpage(){
if(details.orderType==1){

20
pagesHome/pages/SelfPickupScan/SelfPickupScan.vue

@ -13,7 +13,7 @@
查询
</view>
</view>
<scroll-view scroll-y="true" class="scvbx">
<scroll-view scroll-y="true" class="scvbx" @scrolltolower="jiazai">
<view class="mabxslist">
<view class="item" v-for="item in recordsList">
<view class="headtop">
@ -115,6 +115,10 @@
details.current=1
initpage()
}
function jiazai(){
details.current++
initpage()
}
async function initpage(){
let data={
current:details.current,
@ -123,7 +127,19 @@
pickUpTimeEnd:date.value[1],
}
let response=await billLadingpageList(data)
details.recordsList=response.data.records
// details.recordsList=response.data.records
if(details.current==1){
details.recordsList=response.data.records
}else{
if(response.data.records.lngth==0){
uni.showToast({
title:'已经到底了。',
icon:'none'
})
return
}
details.recordsList=details.recordsList.concat(response.data.records)
}
}
function checktime(event : any) {
console.log(event);

37
pagesHome/pages/SignDetailScan/SignDetailScan.vue

@ -52,14 +52,14 @@
</view>
<scroll-view class="scbx" scroll-y="true">
<view class="mabox">
<view class="item" v-for="item in datalist">
<view class="item" v-if="orderStatus==1" v-for="item in datalist">
<view class="toptitl">
<view class="toplft">
订单号{{item.orderCode}}
</view>
<view :class="item==3?'tis bf':'tis'">
<!-- <view :class="item==3?'tis bf':'tis'">
整托备货
</view>
</view> -->
</view>
<view class="boxcontt">
<view>
@ -67,14 +67,35 @@
<view><text style="color: #90A0AF;">货物名称</text>{{item.materialName}}</view>
</view>
<view>
<view :class="item>=2?'scanstateerr':'scanstatesucc'"><text style="color: #90A0AF;">扫描状态</text>{{item>=2?'未扫码':'已扫码'}}</view>
<view :class="item.signforState==1?'scanstateerr':'scanstatesucc'">
<text style="color: #90A0AF;">扫描状态</text>
{{item.signforState==1?'未扫码':'已扫码'}}
</view>
<!-- <view><text style="color: #90A0AF;">完成件数</text>12</view> -->
</view>
</view>
<view class="buttts">
<!-- <view class="buttts">
<view class="anj">
异常上报
</view>
</view> -->
</view>
<view class="item" v-if="orderStatus==2" v-for="item in datalist">
<view class="toptitl">
<view class="toplft">
SKU{{item.sku}}
</view>
</view>
<view class="boxcontt">
<view>
<view><text style="color: #90A0AF;">物品</text>{{item.descriptionGoods}}</view>
<view><text style="color: #90A0AF;">规格</text>{{item.specification}}</view>
</view>
<view>
<view><text style="color: #90A0AF;">单位</text>{{item.logpmUnit}}</view>
<!-- <view><text style="color: #90A0AF;">自提数</text>{{item.quantity}}</view> -->
</view>
</view>
</view>
</view>
@ -142,6 +163,7 @@
initpage()
}
async function initpage(){
details.datalist=[]
let data={
id:details.id,
signforState:details.signforState
@ -275,11 +297,11 @@
padding: 32upx 24upx;
box-sizing: border-box;
font-size: 28upx;
border-bottom: 2upx solid #EEEEEE;
>view{
width: 100%;
display: flex;
align-items: center;
align-items: flex-start;
justify-content: space-between;
&:nth-of-type(1){
margin-bottom: 20upx;
@ -302,6 +324,7 @@
justify-content: space-around;
width: 100%;
box-sizing: border-box;
border-top: 2upx solid #EEEEEE;
.antu{
border: 2upx solid #0086F1;
color: #0086F1;

20
pagesHome/pages/StockUplistScandetails/StockUplistScandetails.vue

@ -151,8 +151,8 @@
tiplists.value.setdetails({
isshow:true,
tipstate:1,
title:'请输入签收的包条',
placeholder:'请输入签收的包条',
title:'请输入扫描的码',
placeholder:'请输入扫描的码',
inputtext:'',
success:(detail)=>{
details.scancode=detail.inputtext
@ -175,8 +175,20 @@
stockupArea:details.stockupArea,
reservationId:details.reservationId,
}
let response=await distributionStockupstockupScan(data)
console.log(response);
let res=await distributionStockupstockupScan(data)
console.log(res);
if(res.code==200){
uni.showToast({
title:res.msg,
icon:'none'
})
initpage()
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
}
async function initpage(){
let data={

27
pagesHome/pages/pickingScan/pickingScan.vue

@ -9,7 +9,7 @@
<u-icon @click.stop="cleartime" style="margin-right: 10rpx;" v-else name="close-circle" color="#999999" size="40"></u-icon>
</view>
</view>
<view>
<view @click="init">
查询
</view>
</view>
@ -21,7 +21,7 @@
<view :class="status==1?'xz':''">完成</view>
</view>
</view>
<scroll-view class="sccv" scroll-y="true">
<scroll-view class="sccv" scroll-y="true" @scrolltolower="jiazai">
<view class="mabx">
<view v-for="item in dataList">
<view class="topbox">
@ -122,6 +122,14 @@
date.value[1]=(uni as any).$u.timeFormat((new Date().valueOf()), 'yyyy-mm-dd')
initpage()
})
function init(){
details.currentPage=1
initpage()
}
function jiazai(){
details.currentPage++
initpage()
}
async function initpage(){
let data={
current:details.currentPage,
@ -129,13 +137,24 @@
stockupDateStart:date.value[0],
stockupDateEnd:date.value[1],
status:details.status,
}
// for(let i=0;i<=1900;i++){
// await distributionStockuppageList(data)
// }
let response=await distributionStockuppageList(data)
details.dataList=response.data.records
if(details.currentPage==1){
details.dataList=response.data.records
}else{
if(response.data.records.lngth==0){
uni.showToast({
title:'已经到底了。',
icon:'none'
})
return
}
details.dataList=details.dataList.concat(response.data.records)
}
// details.dataList=response.data.records
}
function checktime(event:timeType){

20
pagesHome/pages/setbarcode/setbarcode.vue

@ -80,8 +80,8 @@
tips.value.setdetails({
isshow:true,
tipstate:1,
title:'请输入签收的包条',
placeholder:'请输入签收的包条',
title:'请输入扫描的码',
placeholder:'请输入扫描的码',
inputtext:'',
success:(detail)=>{
// details.scancode=
@ -176,8 +176,20 @@
stockupArea:details.goodsAreaName,
reservationId:details.reservationId,
}
let response=await distributionStockupstockupScan(data)
console.log(response);
let res=await distributionStockupstockupScan(data)
console.log(res);
if(res.code==200){
uni.showToast({
title:res.msg,
icon:'none'
})
initpage()
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
}
const { items,codelist,printlist }=toRefs(details)
</script>

5
pagesHome/pages/signinScan/signinScan.vue

@ -97,7 +97,7 @@
taskTime_end:'',
datalist:[] as any,
current:1,
size:10,
size:5,
})
const date = ref<number|string[]>([])
function showCalendar(){
@ -108,6 +108,7 @@
date.value[0]=e.startDate
date.value[1]=e.endDate
details.datatime=date.value[0]+' 至 '+date.value[1]
init()
// details.datatime=(uni as any).$u.timeFormat(date.value[0], 'yyyy-mm-dd')+' '+(uni as any).$u.timeFormat(date.value[1], 'yyyy-mm-dd')
}
onLoad(()=>{
@ -127,7 +128,7 @@
async function initpage(){
let data={
current:details.current,
size:3,
size:details.size,
taskTime_start:date.value[0],
taskTime_end:date.value[1],
}

489
unpackage/dist/dev/app-plus/app-service.js vendored

@ -2406,147 +2406,6 @@ if (uni.restoreGlobal) {
]);
}
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$e], ["__scopeId", "data-v-f631659b"], ["__file", "F:/物流/logPm/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
__name: "index",
setup(__props) {
let details = vue.reactive({
tablist: [
// {
// type:1,
// name:'库内',
// minilist:[
// {
// icon:'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name:'下架扫描',
// router:'/pagesHome/pages/DownScan/DownScan',
// },
// ]
// },
{
type: 1,
name: "出库",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "拣货扫描",
router: "/pagesHome/pages/pickingScan/pickingScan"
},
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "自提扫描",
router: "/pagesHome/pages/SelfPickupScan/SelfPickupScan"
}
]
},
{
type: 1,
name: "配送",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "装车扫描",
router: "/pagesHome/pages/LoadingScan/LoadingScan"
},
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "签收扫描",
router: "/pagesHome/pages/signinScan/signinScan"
}
]
},
{
type: 1,
name: "离线上传",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "离线上传",
router: "/pagesHome/pages/OfflineUpload/OfflineUpload"
}
]
}
]
});
function gopathpage(path) {
uni.navigateTo({
url: path
});
}
const { tablist } = vue.toRefs(details);
return (_ctx, _cache) => {
const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0);
const _component_saomiao = vue.resolveComponent("saomiao");
const _component_saomiao1 = vue.resolveComponent("saomiao1");
const _component_saomiao2 = vue.resolveComponent("saomiao2");
const _component_saomiao3 = vue.resolveComponent("saomiao3");
const _component_saomiao4 = vue.resolveComponent("saomiao4");
return vue.openBlock(), vue.createElementBlock(
vue.Fragment,
null,
[
vue.createVNode(_component_u_navbar, {
title: "工作台",
placeholder: "",
border: "true",
leftIcon: ""
}),
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList(vue.unref(tablist), (item) => {
return vue.openBlock(), vue.createElementBlock("view", { class: "mabox" }, [
vue.createElementVNode(
"view",
{ class: "boxtitl" },
vue.toDisplayString(item.name),
1
/* TEXT */
),
vue.createElementVNode("view", { class: "minboxlist" }, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList(item.minilist, (ite) => {
return vue.openBlock(), vue.createElementBlock("view", {
onClick: ($event) => gopathpage(ite.router)
}, [
vue.createElementVNode("image", {
mode: "widthFix",
src: ite.icon
}, null, 8, ["src"]),
vue.createElementVNode(
"view",
null,
vue.toDisplayString(ite.name),
1
/* TEXT */
)
], 8, ["onClick"]);
}),
256
/* UNKEYED_FRAGMENT */
))
])
]);
}),
256
/* UNKEYED_FRAGMENT */
)),
vue.createVNode(_component_saomiao),
vue.createVNode(_component_saomiao1),
vue.createVNode(_component_saomiao2),
vue.createVNode(_component_saomiao3),
vue.createVNode(_component_saomiao4),
vue.createCommentVNode(" <tiplist></tiplist> "),
vue.createCommentVNode(" <Tabber checkstate='home'></Tabber> ")
],
64
/* STABLE_FRAGMENT */
);
};
}
});
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "F:/物流/logPm/pages/index/index.vue"]]);
function getDevtoolsGlobalHook() {
return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
@ -3959,7 +3818,7 @@ if (uni.restoreGlobal) {
}
return card;
}
const Base64 = function() {
const Base64$1 = function() {
let _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
this.encode = function(input) {
var output = "";
@ -4049,8 +3908,8 @@ if (uni.restoreGlobal) {
return string2;
};
};
const base64 = new Base64();
const devhost = "http://192.168.10.73:8777/";
const base64 = new Base64$1();
const devhost = "http://192.168.10.200:9999/";
const imghost = "";
const host = devhost;
const APPKEY = "h5u:h5u_secret";
@ -4400,12 +4259,18 @@ if (uni.restoreGlobal) {
api.error("接口出错,请联系后端开发人员");
utils.ttsspke("接口出错,请联系后端开发人员");
return;
} else if (res.statusCode == 401) {
uni.navigateTo({
url: "/pages/login/login"
});
api.error("请登录");
return;
}
api.error("连接服务器失败");
utils.ttsspke("连接服务器失败");
}
}).catch((err) => {
formatAppLog("log", "at utils/request.js:99", err);
formatAppLog("log", "at utils/request.js:105", err);
api.error("请检查是否连接到无线网络");
utils.ttsspke("请检查是否连接到无线网络");
uni.hideLoading();
@ -4645,6 +4510,225 @@ if (uni.restoreGlobal) {
data
});
}
function appMenuroutes(data) {
return service({
url: `api/blade-system/appMenu/routes`,
method: "get",
data
});
}
function getImageCache(filePath, fileMd51) {
return new Promise((resolve, reject) => {
let fileMd5 = "";
try {
fileMd5 = Base64.encode(filePath);
} catch (e) {
fileMd5 = filePath;
}
let storageKey = "IMAGE_CACHE_INFO_" + fileMd5;
const cacheFileInfo = uni.getStorageSync(storageKey);
if (cacheFileInfo) {
resolve(cacheFileInfo);
return;
} else {
uni.downloadFile({
url: filePath,
success: (res) => {
if (res.statusCode === 200) {
uni.saveFile({
tempFilePath: res.tempFilePath,
success: function(res2) {
var t0 = plus.io.convertLocalFileSystemURL(res2.savedFilePath);
var t0 = res2.savedFilePath;
uni.setStorageSync(storageKey, t0);
resolve(t0);
return;
},
fail: function(res2) {
resolve(filePath);
return;
}
});
} else {
formatAppLog("log", "at utils/cacheimg.js:58", "下载临时文件失败");
resolve(filePath);
return;
}
},
fail: (res) => {
formatAppLog("log", "at utils/cacheimg.js:65", res);
resolve(filePath);
return;
}
});
}
});
}
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
__name: "index",
setup(__props) {
let details = vue.reactive({
tablist: [
// {
// type:1,
// name:'库内',
// minilist:[
// {
// icon:'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name:'下架扫描',
// router:'/pagesHome/pages/DownScan/DownScan',
// },
// ]
// },
{
type: 1,
name: "出库",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "拣货扫描",
router: "/pagesHome/pages/pickingScan/pickingScan"
},
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "自提扫描",
router: "/pagesHome/pages/SelfPickupScan/SelfPickupScan"
}
]
},
{
type: 1,
name: "配送",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "装车扫描",
router: "/pagesHome/pages/LoadingScan/LoadingScan"
},
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "签收扫描",
router: "/pagesHome/pages/signinScan/signinScan"
}
]
},
{
type: 1,
name: "离线上传",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "离线上传",
router: "/pagesHome/pages/OfflineUpload/OfflineUpload"
}
]
}
]
});
function gopathpage(path) {
uni.navigateTo({
url: path
});
}
async function init() {
let res = await appMenuroutes({});
formatAppLog("log", "at pages/index/index.vue:102", res, "-------------");
}
onShow(() => {
init();
});
function getimgcache() {
details.tablist.map((item, index2) => {
item.minilist.map(async (ite, inde) => {
var result = await getImageCache(ite.icon);
formatAppLog("log", "at pages/index/index.vue:111", "image cache", result);
if (result) {
details.tablist[index2].minilist[inde].icon = result;
} else {
details.tablist[index2].minilist[inde].icon = ite.icon;
}
});
});
setTimeout(() => {
formatAppLog("log", "at pages/index/index.vue:121", details.tablist);
}, 3500);
}
getimgcache();
const { tablist } = vue.toRefs(details);
return (_ctx, _cache) => {
const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0);
const _component_saomiao = vue.resolveComponent("saomiao");
const _component_saomiao1 = vue.resolveComponent("saomiao1");
const _component_saomiao2 = vue.resolveComponent("saomiao2");
const _component_saomiao3 = vue.resolveComponent("saomiao3");
const _component_saomiao4 = vue.resolveComponent("saomiao4");
return vue.openBlock(), vue.createElementBlock(
vue.Fragment,
null,
[
vue.createVNode(_component_u_navbar, {
title: "工作台",
placeholder: "",
border: "true",
leftIcon: ""
}),
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList(vue.unref(tablist), (item) => {
return vue.openBlock(), vue.createElementBlock("view", { class: "mabox" }, [
vue.createElementVNode(
"view",
{ class: "boxtitl" },
vue.toDisplayString(item.name),
1
/* TEXT */
),
vue.createElementVNode("view", { class: "minboxlist" }, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList(item.minilist, (ite) => {
return vue.openBlock(), vue.createElementBlock("view", {
onClick: ($event) => gopathpage(ite.router)
}, [
vue.createElementVNode("image", {
mode: "widthFix",
src: ite.icon
}, null, 8, ["src"]),
vue.createElementVNode(
"view",
null,
vue.toDisplayString(ite.name),
1
/* TEXT */
)
], 8, ["onClick"]);
}),
256
/* UNKEYED_FRAGMENT */
))
])
]);
}),
256
/* UNKEYED_FRAGMENT */
)),
vue.createVNode(_component_saomiao),
vue.createVNode(_component_saomiao1),
vue.createVNode(_component_saomiao2),
vue.createVNode(_component_saomiao3),
vue.createVNode(_component_saomiao4),
vue.createCommentVNode(" <tiplist></tiplist> "),
vue.createCommentVNode(" <Tabber checkstate='home'></Tabber> ")
],
64
/* STABLE_FRAGMENT */
);
};
}
});
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "F:/物流/logPm/pages/index/index.vue"]]);
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
__name: "login",
setup(__props) {
@ -7768,8 +7852,20 @@ if (uni.restoreGlobal) {
stockupArea: details.stockupArea,
reservationId: details.reservationId
};
let response = await distributionStockupstockupScan(data);
formatAppLog("log", "at pagesHome/pages/StockUplistScandetails/StockUplistScandetails.vue:179", response);
let res = await distributionStockupstockupScan(data);
formatAppLog("log", "at pagesHome/pages/StockUplistScandetails/StockUplistScandetails.vue:179", res);
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
uni.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initpage() {
let data = {
@ -7781,7 +7877,7 @@ if (uni.restoreGlobal) {
pallet: details.pallet
};
let response = await distributionStockuporderInfo(data);
formatAppLog("log", "at pagesHome/pages/StockUplistScandetails/StockUplistScandetails.vue:191", response);
formatAppLog("log", "at pagesHome/pages/StockUplistScandetails/StockUplistScandetails.vue:203", response);
details.dataList = response.data.packageList;
details.customer = response.data.customer;
details.stockupArea = response.data.stockupArea;
@ -8598,7 +8694,7 @@ if (uni.restoreGlobal) {
formatAppLog("log", "at pagesHome/pages/SelfPScanList/SelfPScanList.vue:157", res);
if (res.code == 200) {
uni.showToast({
title: "签收成功",
title: res.msg,
icon: "none"
});
initpage();
@ -9737,10 +9833,18 @@ if (uni.restoreGlobal) {
};
let res = await billLadingscan(data);
formatAppLog("log", "at pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue:168", res);
uni.showToast({
title: res.msg,
icon: "none"
});
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
uni.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initpage() {
if (details.orderType == 1) {
@ -9782,7 +9886,7 @@ if (uni.restoreGlobal) {
if (item.value == e) {
details.schanvalue = item.label;
details.orderStatus = item.value;
formatAppLog("log", "at pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue:222", details.schanvalue);
formatAppLog("log", "at pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue:230", details.schanvalue);
}
});
}
@ -10672,6 +10776,18 @@ if (uni.restoreGlobal) {
};
let res = await deliveryloadingscan(data);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:203", res);
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
uni.showToast({
title: res.msg,
icon: "none"
});
}
} else if (details.orderStatus == 2) {
let data = {
reservationId: details.items.id,
@ -10681,7 +10797,18 @@ if (uni.restoreGlobal) {
barcode: details.scancode
};
let res = await deliveryloadinginventory(data);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:213", res);
formatAppLog("log", "at pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue:225", res);
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: "none"
});
} else {
uni.showToast({
title: res.msg,
icon: "none"
});
}
}
initpage();
}
@ -10980,26 +11107,6 @@ if (uni.restoreGlobal) {
onShow(() => {
initpage();
});
function showsdqs() {
tiplists.value.setdetails({
isshow: true,
tipstate: 1,
title: "请输入签收的包条",
placeholder: "请输入签收的包条",
inputtext: "",
success: (detail) => {
details.scancode = detail.inputtext;
scandata();
tiplists.value.setdetails({ isshow: false });
},
cancel: () => {
tiplists.value.setdetails({ isshow: false });
},
close: () => {
tiplists.value.setdetails({ isshow: false });
}
});
}
async function ckoneloading(item) {
tip.value.setdetails({
title: "提示",
@ -11036,6 +11143,17 @@ if (uni.restoreGlobal) {
};
let res = await deliveryloadingscan(data);
formatAppLog("log", "at pagesHome/pages/DeliveryCustomerScan/DeliveryCustomerScan.vue:169", res);
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: "none"
});
} else {
uni.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initpage() {
let data = {
@ -11171,10 +11289,7 @@ if (uni.restoreGlobal) {
vue.Fragment,
null,
vue.renderList(vue.unref(datalist), (item) => {
return vue.openBlock(), vue.createElementBlock("view", {
class: "its",
onClick: showsdqs
}, [
return vue.openBlock(), vue.createElementBlock("view", { class: "its" }, [
vue.createElementVNode(
"view",
{ class: "titl" },
@ -12603,8 +12718,20 @@ if (uni.restoreGlobal) {
stockupArea: details.goodsAreaName,
reservationId: details.reservationId
};
let response = await distributionStockupstockupScan(data);
formatAppLog("log", "at pagesHome/pages/setbarcode/setbarcode.vue:180", response);
let res = await distributionStockupstockupScan(data);
formatAppLog("log", "at pagesHome/pages/setbarcode/setbarcode.vue:180", res);
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
uni.showToast({
title: res.msg,
icon: "none"
});
}
}
const { items, codelist, printlist } = vue.toRefs(details);
return (_ctx, _cache) => {

2
unpackage/dist/dev/app-plus/pages/login/login.css vendored

@ -232,7 +232,7 @@ uni-view[data-v-f631659b], uni-scroll-view[data-v-f631659b], uni-swiper-item[dat
background-color: #ffffff;
border-radius: 0.3125rem;
box-shadow: 0 0.0625rem 0.3125rem 0 #e2e2e380;
margin-top: 20%;
margin-top: 3.4375rem;
padding-bottom: 1.25rem;
padding-top: 0.9375rem;
}

16
unpackage/dist/dev/mp-weixin/api/user.js vendored

@ -231,6 +231,22 @@ function billLadingscan(data) {
data
});
}
function appMenuroutes(data) {
return utils_request.service({
url: `blade-system/app/routes`,
method: "get",
data
});
}
function appbuttons(data) {
return utils_request.service({
url: `blade-system/app/buttons`,
method: "get",
data
});
}
exports.appMenuroutes = appMenuroutes;
exports.appbuttons = appbuttons;
exports.billLadingdetailList = billLadingdetailList;
exports.billLadinggetInventory = billLadinggetInventory;
exports.billLadinggetInventoryNum = billLadinggetInventoryNum;

4
unpackage/dist/dev/mp-weixin/common/vendor.js vendored

@ -3314,6 +3314,9 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
warn(`inject() can only be used inside setup() or functional components.`);
}
}
function watchEffect(effect, options) {
return doWatch(effect, null, options);
}
const INITIAL_WATCHER_VALUE = {};
function watch(source, cb, options) {
if (!isFunction(cb)) {
@ -10843,3 +10846,4 @@ exports.t = t;
exports.toRefs = toRefs;
exports.unref = unref;
exports.uviewPlus = uviewPlus;
exports.watchEffect = watchEffect;

2
unpackage/dist/dev/mp-weixin/config/host.js vendored

@ -1,5 +1,5 @@
"use strict";
const devhost = "http://192.168.10.73:8777/";
const devhost = "http://192.168.10.126:8889/";
const imghost = "";
const host = devhost;
const APPKEY = "h5u:h5u_secret";

158
unpackage/dist/dev/mp-weixin/pages/index/index.js vendored

@ -1,5 +1,14 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_user = require("../../api/user.js");
const utils_cacheimg = require("../../utils/cacheimg.js");
require("../../utils/request.js");
require("../../store/index.js");
require("../../utils/functions.js");
require("../../utils/IDCardVerification.js");
require("../../utils/base64.js");
require("../../config/host.js");
require("../../utils/md5.js");
if (!Array) {
const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
_easycom_u_navbar2();
@ -24,49 +33,49 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
// },
// ]
// },
{
type: 1,
name: "出库",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "拣货扫描",
router: "/pagesHome/pages/pickingScan/pickingScan"
},
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "自提扫描",
router: "/pagesHome/pages/SelfPickupScan/SelfPickupScan"
}
]
},
{
type: 1,
name: "配送",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "装车扫描",
router: "/pagesHome/pages/LoadingScan/LoadingScan"
},
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "签收扫描",
router: "/pagesHome/pages/signinScan/signinScan"
}
]
},
{
type: 1,
name: "离线上传",
minilist: [
{
icon: "http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png",
name: "离线上传",
router: "/pagesHome/pages/OfflineUpload/OfflineUpload"
}
]
}
// {
// type: 1,
// name: '出库',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '拣货扫描',
// router: '/pagesHome/pages/pickingScan/pickingScan',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '自提扫描',
// router: '/pagesHome/pages/SelfPickupScan/SelfPickupScan',
// },
// ]
// },
// {
// type: 1,
// name: '配送',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '装车扫描',
// router: '/pagesHome/pages/LoadingScan/LoadingScan',
// },
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '签收扫描',
// router: '/pagesHome/pages/signinScan/signinScan',
// },
// ]
// },
// {
// type: 1,
// name: '离线上传',
// minilist: [
// {
// icon: 'http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png',
// name: '离线上传',
// router: '/pagesHome/pages/OfflineUpload/OfflineUpload',
// },
// ]
// },
]
});
function gopathpage(path) {
@ -74,6 +83,69 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
url: path
});
}
async function init() {
let tabber = common_vendor.index.getStorageSync("homerouter");
if (tabber) {
details.tablist = tabber;
return;
}
let res = await api_user.appMenuroutes({});
console.log(res, "-------------");
if (res.code == 200) {
getimgcache(res.data[0]);
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initbuts() {
let authbut = common_vendor.index.getStorageSync("authbuts");
if (authbut) {
return;
}
let butres = await api_user.appbuttons({});
console.log(butres.data);
let qxan = [];
butres.data.map((item) => {
item.children.map((ite) => {
qxan.push(ite.name);
});
});
common_vendor.index.setStorageSync("authbuts", qxan);
}
common_vendor.onShow(() => {
init();
initbuts();
});
common_vendor.watchEffect(() => {
if (details.tablist.length > 0) {
common_vendor.index.setStorageSync("homerouter", details.tablist);
}
});
function getimgcache(list) {
let maxarr = [];
list.children.map(async (item) => {
let arr = {
type: 1,
name: item.name,
minilist: []
};
await item.children.map(async (ite) => {
let result = await utils_cacheimg.getImageCache("http://htys.oss-cn-chengdu.aliyuncs.com/htys/afb031efec7d2f8620ee68c71f87a80e.png");
console.log("image cache", result);
let obj = {
icon: result,
name: ite.name,
router: ite.path
};
arr.minilist.push(obj);
});
maxarr.push(arr);
});
details.tablist = maxarr;
}
const { tablist } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return {

2
unpackage/dist/dev/mp-weixin/pages/login/login.wxss vendored

@ -30,7 +30,7 @@
background-color: #ffffff;
border-radius: 10rpx;
box-shadow: 0rpx 2rpx 10rpx 0rpx #e2e2e380;
margin-top: 20%;
margin-top: 110rpx;
padding-bottom: 40rpx;
padding-top: 30rpx;
}

27
unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.js vendored

@ -67,8 +67,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
tiplists.value.setdetails({
isshow: true,
tipstate: 1,
title: "请输入签收的包条",
placeholder: "请输入签收的包条",
title: "请输入扫描的码",
placeholder: "请输入扫描的码",
inputtext: "",
success: (detail) => {
details.scancode = detail.inputtext;
@ -126,6 +126,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
};
let res = await api_user.deliveryloadingscan(data);
console.log(res);
if (res.code == 200) {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
} else if (details.orderStatus == 2) {
let data = {
reservationId: details.items.id,
@ -136,6 +148,17 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
};
let res = await api_user.deliveryloadinginventory(data);
console.log(res);
if (res.code == 200) {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
initpage();
}

13
unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerSign/CustomerSign.js vendored

@ -23,7 +23,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
let details = common_vendor.reactive({
items: {},
id: "",
datalist: []
datalist: [],
authbuts: common_vendor.index.getStorageSync("authbuts")
});
const tiplists = common_vendor.ref(null);
common_vendor.onLoad((op) => {
@ -159,7 +160,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
url: "/pagesHome/pages/signOrderScan/signOrderScan?item=" + JSON.stringify(item) + "&deliveryId=" + details.id
});
}
const { items, datalist } = common_vendor.toRefs(details);
const { authbuts, items, datalist } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return {
a: common_vendor.p({
@ -180,7 +181,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
j: common_vendor.t(common_vendor.unref(items).scannedNumber),
k: common_vendor.t(common_vendor.unref(items).signNub),
l: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
return {
return common_vendor.e({
a: common_vendor.t(item.consignee),
b: common_vendor.t(item.deliveryStatus),
c: common_vendor.t(item.ordNub),
@ -189,8 +190,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
f: common_vendor.o(($event) => getLocation(item)),
g: common_vendor.o(($event) => gosinorderscan(item)),
h: common_vendor.o(($event) => uplodimg(item)),
i: common_vendor.o(($event) => allclick(item))
};
i: common_vendor.unref(authbuts).indexOf("批量签收") != -1 && item.deliveryStatus != "完成配送"
}, common_vendor.unref(authbuts).indexOf("批量签收") != -1 && item.deliveryStatus != "完成配送" ? {
j: common_vendor.o(($event) => allclick(item))
} : {});
}),
m: common_vendor.sr(tiplists, "aed605e0-1", {
"k": "tiplists"

2
unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerSign/CustomerSign.wxml vendored

@ -1 +1 @@
<u-navbar wx:if="{{a}}" u-i="aed605e0-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="hedtopt"><view class="typto"><view>配车类型:{{b}}</view><view>配车状态:{{c}}</view></view><view class="typto"><view>车牌号:{{d}}</view><view>司机:{{e}}</view></view><view class="typto"><view>装卸班组:{{f}}</view><view>备货是否完成:{{g}}</view></view><view class="kehupeison"><view><view>配送客户数</view><view>{{h}}</view></view><view><view>订单总数</view><view>{{i}}</view></view><view><view>配送件数</view><view>{{j}}</view></view><view><view>签收件数</view><view>{{k}}</view></view></view></view><scroll-view scroll-y="true" class="scvbx"><view class="mabx"><view wx:for="{{l}}" wx:for-item="item" class="its"><view class="title"><view>客户:{{item.a}}</view><view class="statetype">{{item.b}}</view></view><view class="conxb"><view><view>订单总数</view><view>{{item.c}}</view></view><view><view>配送件数</view><view>{{item.d}}</view></view><view><view>扫描件数</view><view>{{item.e}}</view></view></view><view class="tbck"><view><view bindtap="{{item.f}}">定位打卡</view><view catchtap="{{item.g}}">签到扫描</view><view bindtap="{{item.h}}">上传签收图片</view></view><view bindtap="{{item.i}}"> 批量签收 </view></view></view></view></scroll-view><tiplist class="r" u-r="tiplists" u-i="aed605e0-1" bind:__l="__l"></tiplist>
<u-navbar wx:if="{{a}}" u-i="aed605e0-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="hedtopt"><view class="typto"><view>配车类型:{{b}}</view><view>配车状态:{{c}}</view></view><view class="typto"><view>车牌号:{{d}}</view><view>司机:{{e}}</view></view><view class="typto"><view>装卸班组:{{f}}</view><view>备货是否完成:{{g}}</view></view><view class="kehupeison"><view><view>配送客户数</view><view>{{h}}</view></view><view><view>订单总数</view><view>{{i}}</view></view><view><view>配送件数</view><view>{{j}}</view></view><view><view>签收件数</view><view>{{k}}</view></view></view></view><scroll-view scroll-y="true" class="scvbx"><view class="mabx"><view wx:for="{{l}}" wx:for-item="item" class="its"><view class="title"><view>客户:{{item.a}}</view><view class="statetype">{{item.b}}</view></view><view class="conxb"><view><view>订单总数</view><view>{{item.c}}</view></view><view><view>配送件数</view><view>{{item.d}}</view></view><view><view>扫描件数</view><view>{{item.e}}</view></view></view><view class="tbck"><view><view bindtap="{{item.f}}">定位打卡</view><view catchtap="{{item.g}}">签到扫描</view><view bindtap="{{item.h}}">上传签收图片</view></view><view wx:if="{{item.i}}" bindtap="{{item.j}}"> 批量签收 </view></view></view></view></scroll-view><tiplist class="r" u-r="tiplists" u-i="aed605e0-1" bind:__l="__l"></tiplist>

58
unpackage/dist/dev/mp-weixin/pagesHome/pages/DeliveryCustomerScan/DeliveryCustomerScan.js vendored

@ -30,7 +30,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
id: "",
datalist: [],
items: {},
scancode: ""
scancode: "",
authbuts: common_vendor.index.getStorageSync("authbuts")
});
const tip = common_vendor.ref(null);
const tiplists = common_vendor.ref(null);
@ -48,26 +49,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
common_vendor.onShow(() => {
initpage();
});
function showsdqs() {
tiplists.value.setdetails({
isshow: true,
tipstate: 1,
title: "请输入签收的包条",
placeholder: "请输入签收的包条",
inputtext: "",
success: (detail) => {
details.scancode = detail.inputtext;
scandata();
tiplists.value.setdetails({ isshow: false });
},
cancel: () => {
tiplists.value.setdetails({ isshow: false });
},
close: () => {
tiplists.value.setdetails({ isshow: false });
}
});
}
async function ckoneloading(item) {
tip.value.setdetails({
title: "提示",
@ -79,11 +60,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
let loadingId = common_vendor.index.getStorageSync("checkvehicle").id;
let data = {
reservationId: item.id,
loadingId
loadingId,
deliveryId: details.id
};
let response = await api_user.deliveryoneloading(data);
if (response.code == 200)
;
else {
common_vendor.index.showToast({
title: response.msg,
icon: "none"
});
}
tip.value.setisshow(false);
},
cancel: () => {
@ -104,6 +92,17 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
};
let res = await api_user.deliveryloadingscan(data);
console.log(res);
if (res.code == 200) {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initpage() {
let data = {
@ -117,7 +116,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
url: "/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails?item=" + JSON.stringify(item) + "&id=" + details.id
});
}
const { items, datalist } = common_vendor.toRefs(details);
const { authbuts, items, datalist } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return {
a: common_vendor.p({
@ -138,7 +137,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
j: common_vendor.t(common_vendor.unref(items).deliveryNumber),
k: common_vendor.t(common_vendor.unref(items).scannedNumber),
l: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
return {
return common_vendor.e({
a: common_vendor.t(item.consignee),
b: common_vendor.t(item.isstock),
c: common_vendor.t(item.isload),
@ -146,16 +145,17 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
e: common_vendor.o(($event) => goCustomerOrdersDetails(item)),
f: common_vendor.t(item.reservationNum),
g: common_vendor.t(item.loadingNub),
h: common_vendor.o(($event) => ckoneloading(item))
};
h: common_vendor.unref(authbuts).indexOf("一键装车") != -1 && item.isload != "是"
}, common_vendor.unref(authbuts).indexOf("一键装车") != -1 && item.isload != "是" ? {
i: common_vendor.o(($event) => ckoneloading(item))
} : {});
}),
m: common_vendor.o(() => {
}),
n: common_vendor.o(showsdqs),
o: common_vendor.sr(tiplists, "69b5a390-1", {
n: common_vendor.sr(tiplists, "69b5a390-1", {
"k": "tiplists"
}),
p: common_vendor.sr(tip, "69b5a390-7", {
o: common_vendor.sr(tip, "69b5a390-7", {
"k": "tip"
})
};

2
unpackage/dist/dev/mp-weixin/pagesHome/pages/DeliveryCustomerScan/DeliveryCustomerScan.wxml vendored

@ -1 +1 @@
<u-navbar wx:if="{{a}}" u-i="69b5a390-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="hedtopt"><view class="typto"><view>配车类型:{{b}}</view><view>配车状态:{{c}}</view></view><view class="typto"><view>车牌号:{{d}}</view><view>司机:{{e}}</view></view><view class="typto"><view>装卸班组:{{f}}</view><view>备货是否完成:{{g}}</view></view><view class="kehupeison"><view><view>配送客户数</view><view>{{h}}</view></view><view><view>订单总数</view><view>{{i}}</view></view><view><view>计划件数</view><view>{{j}}</view></view><view><view>装车件数</view><view>{{k}}</view></view></view></view><scroll-view class="scoolv" scroll-y="true"><view class="minbx"><view wx:for="{{l}}" wx:for-item="item" class="its" bindtap="{{n}}"><view class="titl"> 客户:{{item.a}}</view><view class="contsx"><view><view><text style="color:#90A0AF">备货是否完成:</text>{{item.b}}</view><view><text style="color:#90A0AF">装车是否完成:</text>{{item.c}}</view></view><view><view bindtap="{{item.e}}"><view>订单总数</view><view>{{item.d}}</view></view><view bindtap="{{m}}"><view>计划件数</view><view>{{item.f}}</view></view><view><view>装车件数</view><view>{{item.g}}</view></view></view></view><view class="bts"><view catchtap="{{item.h}}">一键装车</view></view></view></view></scroll-view><tiplist class="r" u-r="tiplists" u-i="69b5a390-1" bind:__l="__l"></tiplist><saomiao u-i="69b5a390-2" bind:__l="__l"></saomiao><saomiao1 u-i="69b5a390-3" bind:__l="__l"></saomiao1><saomiao2 u-i="69b5a390-4" bind:__l="__l"></saomiao2><saomiao3 u-i="69b5a390-5" bind:__l="__l"></saomiao3><saomiao4 u-i="69b5a390-6" bind:__l="__l"></saomiao4><tips class="r" u-r="tip" u-i="69b5a390-7" bind:__l="__l"></tips>
<u-navbar wx:if="{{a}}" u-i="69b5a390-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="hedtopt"><view class="typto"><view>配车类型:{{b}}</view><view>配车状态:{{c}}</view></view><view class="typto"><view>车牌号:{{d}}</view><view>司机:{{e}}</view></view><view class="typto"><view>装卸班组:{{f}}</view><view>备货是否完成:{{g}}</view></view><view class="kehupeison"><view><view>配送客户数</view><view>{{h}}</view></view><view><view>订单总数</view><view>{{i}}</view></view><view><view>计划件数</view><view>{{j}}</view></view><view><view>装车件数</view><view>{{k}}</view></view></view></view><scroll-view class="scoolv" scroll-y="true"><view class="minbx"><view wx:for="{{l}}" wx:for-item="item" class="its"><view class="titl"> 客户:{{item.a}}</view><view class="contsx"><view><view><text style="color:#90A0AF">备货是否完成:</text>{{item.b}}</view><view><text style="color:#90A0AF">装车是否完成:</text>{{item.c}}</view></view><view><view bindtap="{{item.e}}"><view>订单总数</view><view>{{item.d}}</view></view><view bindtap="{{m}}"><view>计划件数</view><view>{{item.f}}</view></view><view><view>装车件数</view><view>{{item.g}}</view></view></view></view><view wx:if="{{item.h}}" class="bts"><view catchtap="{{item.i}}">一键装车</view></view></view></view></scroll-view><tiplist class="r" u-r="tiplists" u-i="69b5a390-1" bind:__l="__l"></tiplist><saomiao u-i="69b5a390-2" bind:__l="__l"></saomiao><saomiao1 u-i="69b5a390-3" bind:__l="__l"></saomiao1><saomiao2 u-i="69b5a390-4" bind:__l="__l"></saomiao2><saomiao3 u-i="69b5a390-5" bind:__l="__l"></saomiao3><saomiao4 u-i="69b5a390-6" bind:__l="__l"></saomiao4><tips class="r" u-r="tip" u-i="69b5a390-7" bind:__l="__l"></tips>

1
unpackage/dist/dev/mp-weixin/pagesHome/pages/LoadingDetails/LoadingDetails.js vendored

@ -59,6 +59,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
initpage();
}
async function initpage() {
details.dataList = [];
let data = {
current: details.current,
size: details.size,

13
unpackage/dist/dev/mp-weixin/pagesHome/pages/LoadingScan/LoadingScan.js vendored

@ -67,7 +67,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
};
let response = await api_user.deliverypage(data);
console.log(response);
details.recordsList = response.data.records;
if (details.current == 1) {
details.recordsList = response.data.records;
} else {
if (response.data.records.lngth == 0) {
common_vendor.index.showToast({
title: "已经到底了。",
icon: "none"
});
return;
}
details.recordsList = details.recordsList.concat(response.data.records);
}
}
async function goselscan(item) {
let data = {

6
unpackage/dist/dev/mp-weixin/pagesHome/pages/SelfPScanList/SelfPScanList.js vendored

@ -70,8 +70,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
tiplists.value.setdetails({
isshow: true,
tipstate: 1,
title: "请输入签收的包条",
placeholder: "请输入签收的包条",
title: "请输入扫描的码",
placeholder: "请输入扫描的码",
inputtext: "",
success: (detail) => {
details.scancode = detail.inputtext;
@ -96,7 +96,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
console.log(res);
if (res.code == 200) {
common_vendor.index.showToast({
title: "签收成功",
title: res.msg,
icon: "none"
});
initpage();

20
unpackage/dist/dev/mp-weixin/pagesHome/pages/SelfPickupDetails/SelfPickupDetails.js vendored

@ -81,8 +81,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
tiplists.value.setdetails({
isshow: true,
tipstate: 1,
title: "请输入签收的包条",
placeholder: "请输入签收的包条",
title: "请输入扫描的码",
placeholder: "请输入扫描的码",
inputtext: "",
success: (detail) => {
details.scancode = detail.inputtext;
@ -105,10 +105,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
};
let res = await api_user.billLadingscan(data);
console.log(res);
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
if (res.code == 200) {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initpage() {
if (details.orderType == 1) {

26
unpackage/dist/dev/mp-weixin/pagesHome/pages/SelfPickupScan/SelfPickupScan.js vendored

@ -47,6 +47,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
details.current = 1;
initpage();
}
function jiazai() {
details.current++;
initpage();
}
async function initpage() {
let data = {
current: details.current,
@ -55,7 +59,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
pickUpTimeEnd: date.value[1]
};
let response = await api_user.billLadingpageList(data);
details.recordsList = response.data.records;
if (details.current == 1) {
details.recordsList = response.data.records;
} else {
if (response.data.records.lngth == 0) {
common_vendor.index.showToast({
title: "已经到底了。",
icon: "none"
});
return;
}
details.recordsList = details.recordsList.concat(response.data.records);
}
}
function goselscan(item) {
common_vendor.index.navigateTo({
@ -116,10 +131,11 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
k: common_vendor.o(($event) => goselscan(item))
};
}),
l: common_vendor.o(showCalendar),
m: common_vendor.o(onConfirm),
n: common_vendor.o(($event) => common_vendor.isRef(show) ? show.value = $event : null),
o: common_vendor.p({
l: common_vendor.o(jiazai),
m: common_vendor.o(showCalendar),
n: common_vendor.o(onConfirm),
o: common_vendor.o(($event) => common_vendor.isRef(show) ? show.value = $event : null),
p: common_vendor.p({
initStartDate: date.value[0],
initEndDate: date.value[1],
value: common_vendor.unref(show)

2
unpackage/dist/dev/mp-weixin/pagesHome/pages/SelfPickupScan/SelfPickupScan.wxml vendored

@ -1 +1 @@
<u-navbar wx:if="{{a}}" u-i="76caf650-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="schbox"><view>自提日期:</view><view catchtap="{{i}}" class="inputsr"><input value="{{b}}" disabled placeholder="请选择时间"/><view catchtap="{{h}}"><u-icon wx:if="{{c}}" catchclick="{{d}}" style="margin-right:10rpx" u-i="76caf650-1" bind:__l="__l" u-p="{{e}}"></u-icon><u-icon wx:else catchclick="{{f}}" style="margin-right:10rpx" u-i="76caf650-2" bind:__l="__l" u-p="{{g||''}}"></u-icon></view></view><view bindtap="{{j}}"> 查询 </view></view><scroll-view scroll-y="true" class="scvbx"><view class="mabxslist"><view wx:for="{{k}}" wx:for-item="item" class="item"><view class="headtop"><view class="type1s"><view><text style="color:#90A0AF">配车类型:</text>{{item.a}}</view><view><text style="color:#90A0AF">配车状态:</text>{{item.b}}</view></view><view class="type1s"><view><text style="color:#90A0AF">车牌号:</text>{{item.c}}</view><view><text style="color:#90A0AF">司机:</text>{{item.d}}</view></view><view class="type1s"><view><text style="color:#90A0AF">装御班组:</text>A班组 </view><view><text style="color:#90A0AF">备货是否完成:</text>是 </view></view><view class="type1s"><view><text style="color:#90A0AF">制单时间:</text>{{item.e}}</view></view><view class="type1s"><view><text style="color:#90A0AF">任务时间:</text>{{item.f}}</view></view><view class="liebs"><view><view>订单总数</view><view>{{item.g}}</view></view><view><view>自提件数</view><view>{{item.h}}</view></view><view><view>签收件数</view><view>{{item.i}}</view></view></view></view><view class="buts"><view bindtap="{{item.j}}">明细扫描</view><view bindtap="{{item.k}}">扫描</view></view></view></view></scroll-view><l-calendar wx:if="{{o}}" bindhide="{{l}}" bindchange="{{m}}" u-i="76caf650-3" bind:__l="__l" bindupdateValue="{{n}}" u-p="{{o}}"></l-calendar>
<u-navbar wx:if="{{a}}" u-i="76caf650-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="schbox"><view>自提日期:</view><view catchtap="{{i}}" class="inputsr"><input value="{{b}}" disabled placeholder="请选择时间"/><view catchtap="{{h}}"><u-icon wx:if="{{c}}" catchclick="{{d}}" style="margin-right:10rpx" u-i="76caf650-1" bind:__l="__l" u-p="{{e}}"></u-icon><u-icon wx:else catchclick="{{f}}" style="margin-right:10rpx" u-i="76caf650-2" bind:__l="__l" u-p="{{g||''}}"></u-icon></view></view><view bindtap="{{j}}"> 查询 </view></view><scroll-view scroll-y="true" class="scvbx" bindscrolltolower="{{l}}"><view class="mabxslist"><view wx:for="{{k}}" wx:for-item="item" class="item"><view class="headtop"><view class="type1s"><view><text style="color:#90A0AF">配车类型:</text>{{item.a}}</view><view><text style="color:#90A0AF">配车状态:</text>{{item.b}}</view></view><view class="type1s"><view><text style="color:#90A0AF">车牌号:</text>{{item.c}}</view><view><text style="color:#90A0AF">司机:</text>{{item.d}}</view></view><view class="type1s"><view><text style="color:#90A0AF">装御班组:</text>A班组 </view><view><text style="color:#90A0AF">备货是否完成:</text>是 </view></view><view class="type1s"><view><text style="color:#90A0AF">制单时间:</text>{{item.e}}</view></view><view class="type1s"><view><text style="color:#90A0AF">任务时间:</text>{{item.f}}</view></view><view class="liebs"><view><view>订单总数</view><view>{{item.g}}</view></view><view><view>自提件数</view><view>{{item.h}}</view></view><view><view>签收件数</view><view>{{item.i}}</view></view></view></view><view class="buts"><view bindtap="{{item.j}}">明细扫描</view><view bindtap="{{item.k}}">扫描</view></view></view></view></scroll-view><l-calendar wx:if="{{p}}" bindhide="{{m}}" bindchange="{{n}}" u-i="76caf650-3" bind:__l="__l" bindupdateValue="{{o}}" u-p="{{p}}"></l-calendar>

29
unpackage/dist/dev/mp-weixin/pagesHome/pages/SignDetailScan/SignDetailScan.js vendored

@ -75,6 +75,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
initpage();
}
async function initpage() {
details.datalist = [];
let data = {
id: details.id,
signforState: details.signforState
@ -108,7 +109,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
}
const { orderStatus, signforStatearr, signforStatevalue, items, datalist } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return {
return common_vendor.e({
a: common_vendor.p({
title: "签收明细扫描",
placeholder: true,
@ -178,17 +179,29 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
s: common_vendor.o(($event) => setorderStatus(1)),
t: common_vendor.n(common_vendor.unref(orderStatus) == 2 ? "xz" : ""),
v: common_vendor.o(($event) => setorderStatus(2)),
w: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
w: common_vendor.unref(orderStatus) == 1
}, common_vendor.unref(orderStatus) == 1 ? {
x: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
return {
a: common_vendor.t(item.orderCode),
b: common_vendor.n(item == 3 ? "tis bf" : "tis"),
c: common_vendor.t(item.packetBarCode),
d: common_vendor.t(item.materialName),
e: common_vendor.t(item >= 2 ? "未扫码" : "已扫码"),
f: common_vendor.n(item >= 2 ? "scanstateerr" : "scanstatesucc")
b: common_vendor.t(item.packetBarCode),
c: common_vendor.t(item.materialName),
d: common_vendor.t(item.signforState == 1 ? "未扫码" : "已扫码"),
e: common_vendor.n(item.signforState == 1 ? "scanstateerr" : "scanstatesucc")
};
})
};
} : {}, {
y: common_vendor.unref(orderStatus) == 2
}, common_vendor.unref(orderStatus) == 2 ? {
z: common_vendor.f(common_vendor.unref(datalist), (item, k0, i0) => {
return {
a: common_vendor.t(item.sku),
b: common_vendor.t(item.descriptionGoods),
c: common_vendor.t(item.specification),
d: common_vendor.t(item.logpmUnit)
};
})
} : {});
};
}
});

2
unpackage/dist/dev/mp-weixin/pagesHome/pages/SignDetailScan/SignDetailScan.wxml vendored

@ -1 +1 @@
<u-navbar wx:if="{{a}}" u-i="618f7990-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="headtop"><view><view>配车类型:{{b}}</view></view><view><view>车牌号:{{c}}</view><view>司机:{{d}}</view></view></view><view class="tabmabx"><view><uni-table wx:if="{{n}}" u-s="{{['d']}}" u-i="618f7990-1" bind:__l="__l" u-p="{{n}}"><uni-tr u-s="{{['d']}}" u-i="618f7990-2,618f7990-1" bind:__l="__l"><uni-th wx:if="{{e}}" u-i="618f7990-3,618f7990-2" bind:__l="__l" u-p="{{e}}"></uni-th><uni-th wx:if="{{f}}" u-s="{{['d']}}" u-i="618f7990-4,618f7990-2" bind:__l="__l" u-p="{{f}}">配送客户数</uni-th><uni-th wx:if="{{g}}" u-s="{{['d']}}" u-i="618f7990-5,618f7990-2" bind:__l="__l" u-p="{{g}}">订单总数</uni-th><uni-th wx:if="{{h}}" u-s="{{['d']}}" u-i="618f7990-6,618f7990-2" bind:__l="__l" u-p="{{h}}">签收件数</uni-th></uni-tr><uni-tr wx:for="{{i}}" wx:for-item="item" u-s="{{['d']}}" u-i="{{item.i}}" bind:__l="__l"><uni-td wx:if="{{j}}" u-s="{{['d']}}" class="jhjs" u-i="{{item.b}}" bind:__l="__l" u-p="{{j}}">{{item.a}}</uni-td><uni-td wx:if="{{k}}" u-s="{{['d']}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{k}}">{{item.c}}</uni-td><uni-td wx:if="{{l}}" u-s="{{['d']}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{l}}">{{item.e}}</uni-td><uni-td wx:if="{{m}}" u-s="{{['d']}}" u-i="{{item.h}}" bind:__l="__l" u-p="{{m}}">{{item.g}}</uni-td></uni-tr></uni-table></view></view><view class="scinp"><view class="left"><view class="titl">齐套状态</view><view><cus-selects wx:if="{{p}}" bindchange="{{o}}" u-i="618f7990-12" bind:__l="__l" u-p="{{p}}"></cus-selects></view></view><view bindtap="{{q}}" class="btscan">查询</view></view><view class="tabtip"><view bindtap="{{s}}"><view class="{{r}}">定制品</view></view><view bindtap="{{v}}"><view class="{{t}}">库存品</view></view></view><scroll-view class="scbx" scroll-y="true"><view class="mabox"><view wx:for="{{w}}" wx:for-item="item" class="item"><view class="toptitl"><view class="toplft"> 订单号:{{item.a}}</view><view class="{{item.b}}"> 整托备货 </view></view><view class="boxcontt"><view><view><text style="color:#90A0AF">包装号:</text>{{item.c}}</view><view><text style="color:#90A0AF">货物名称:</text>{{item.d}}</view></view><view><view class="{{item.f}}"><text style="color:#90A0AF">扫描状态:</text>{{item.e}}</view></view></view><view class="buttts"><view class="anj"> 异常上报 </view></view></view></view></scroll-view>
<u-navbar wx:if="{{a}}" u-i="618f7990-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="headtop"><view><view>配车类型:{{b}}</view></view><view><view>车牌号:{{c}}</view><view>司机:{{d}}</view></view></view><view class="tabmabx"><view><uni-table wx:if="{{n}}" u-s="{{['d']}}" u-i="618f7990-1" bind:__l="__l" u-p="{{n}}"><uni-tr u-s="{{['d']}}" u-i="618f7990-2,618f7990-1" bind:__l="__l"><uni-th wx:if="{{e}}" u-i="618f7990-3,618f7990-2" bind:__l="__l" u-p="{{e}}"></uni-th><uni-th wx:if="{{f}}" u-s="{{['d']}}" u-i="618f7990-4,618f7990-2" bind:__l="__l" u-p="{{f}}">配送客户数</uni-th><uni-th wx:if="{{g}}" u-s="{{['d']}}" u-i="618f7990-5,618f7990-2" bind:__l="__l" u-p="{{g}}">订单总数</uni-th><uni-th wx:if="{{h}}" u-s="{{['d']}}" u-i="618f7990-6,618f7990-2" bind:__l="__l" u-p="{{h}}">签收件数</uni-th></uni-tr><uni-tr wx:for="{{i}}" wx:for-item="item" u-s="{{['d']}}" u-i="{{item.i}}" bind:__l="__l"><uni-td wx:if="{{j}}" u-s="{{['d']}}" class="jhjs" u-i="{{item.b}}" bind:__l="__l" u-p="{{j}}">{{item.a}}</uni-td><uni-td wx:if="{{k}}" u-s="{{['d']}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{k}}">{{item.c}}</uni-td><uni-td wx:if="{{l}}" u-s="{{['d']}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{l}}">{{item.e}}</uni-td><uni-td wx:if="{{m}}" u-s="{{['d']}}" u-i="{{item.h}}" bind:__l="__l" u-p="{{m}}">{{item.g}}</uni-td></uni-tr></uni-table></view></view><view class="scinp"><view class="left"><view class="titl">齐套状态</view><view><cus-selects wx:if="{{p}}" bindchange="{{o}}" u-i="618f7990-12" bind:__l="__l" u-p="{{p}}"></cus-selects></view></view><view bindtap="{{q}}" class="btscan">查询</view></view><view class="tabtip"><view bindtap="{{s}}"><view class="{{r}}">定制品</view></view><view bindtap="{{v}}"><view class="{{t}}">库存品</view></view></view><scroll-view class="scbx" scroll-y="true"><view class="mabox"><block wx:if="{{w}}"><view wx:for="{{x}}" wx:for-item="item" class="item"><view class="toptitl"><view class="toplft"> 订单号:{{item.a}}</view></view><view class="boxcontt"><view><view><text style="color:#90A0AF">包装号:</text>{{item.b}}</view><view><text style="color:#90A0AF">货物名称:</text>{{item.c}}</view></view><view><view class="{{item.e}}"><text style="color:#90A0AF">扫描状态:</text> {{item.d}}</view></view></view></view></block><block wx:if="{{y}}"><view wx:for="{{z}}" wx:for-item="item" class="item"><view class="toptitl"><view class="toplft"> SKU:{{item.a}}</view></view><view class="boxcontt"><view><view><text style="color:#90A0AF">物品:</text>{{item.b}}</view><view><text style="color:#90A0AF">规格:</text>{{item.c}}</view></view><view><view><text style="color:#90A0AF">单位:</text>{{item.d}}</view></view></view></view></block></view></scroll-view>

4
unpackage/dist/dev/mp-weixin/pagesHome/pages/SignDetailScan/SignDetailScan.wxss vendored

@ -109,12 +109,11 @@
padding: 32rpx 24rpx;
box-sizing: border-box;
font-size: 28rpx;
border-bottom: 2rpx solid #EEEEEE;
}
.scbx .mabox > .item .boxcontt > view {
width: 100%;
display: flex;
align-items: center;
align-items: flex-start;
justify-content: space-between;
}
.scbx .mabox > .item .boxcontt > view:nth-of-type(1) {
@ -136,6 +135,7 @@
justify-content: space-around;
width: 100%;
box-sizing: border-box;
border-top: 2rpx solid #EEEEEE;
}
.scbx .mabox > .item .buttts .antu {
border: 2rpx solid #0086F1;

20
unpackage/dist/dev/mp-weixin/pagesHome/pages/StockUplistScandetails/StockUplistScandetails.js vendored

@ -64,8 +64,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
tiplists.value.setdetails({
isshow: true,
tipstate: 1,
title: "请输入签收的包条",
placeholder: "请输入签收的包条",
title: "请输入扫描的码",
placeholder: "请输入扫描的码",
inputtext: "",
success: (detail) => {
details.scancode = detail.inputtext;
@ -88,8 +88,20 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
stockupArea: details.stockupArea,
reservationId: details.reservationId
};
let response = await api_user.distributionStockupstockupScan(data);
console.log(response);
let res = await api_user.distributionStockupstockupScan(data);
console.log(res);
if (res.code == 200) {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
async function initpage() {
let data = {

45
unpackage/dist/dev/mp-weixin/pagesHome/pages/pickingScan/pickingScan.js vendored

@ -50,6 +50,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
date.value[1] = common_vendor.index.$u.timeFormat((/* @__PURE__ */ new Date()).valueOf(), "yyyy-mm-dd");
initpage();
});
function init() {
details.currentPage = 1;
initpage();
}
function jiazai() {
details.currentPage++;
initpage();
}
async function initpage() {
let data = {
current: details.currentPage,
@ -59,7 +67,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
status: details.status
};
let response = await api_user.distributionStockuppageList(data);
details.dataList = response.data.records;
if (details.currentPage == 1) {
details.dataList = response.data.records;
} else {
if (response.data.records.lngth == 0) {
common_vendor.index.showToast({
title: "已经到底了。",
icon: "none"
});
return;
}
details.dataList = details.dataList.concat(response.data.records);
}
}
function gostockuplist(item) {
common_vendor.index.navigateTo({
@ -121,11 +140,12 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
h: common_vendor.o(() => {
}),
i: common_vendor.o(showCalendar),
j: common_vendor.n(common_vendor.unref(status) == 0 ? "xz" : ""),
k: common_vendor.o(($event) => setstate(0)),
l: common_vendor.n(common_vendor.unref(status) == 1 ? "xz" : ""),
m: common_vendor.o(($event) => setstate(1)),
n: common_vendor.f(common_vendor.unref(dataList), (item, k0, i0) => {
j: common_vendor.o(init),
k: common_vendor.n(common_vendor.unref(status) == 0 ? "xz" : ""),
l: common_vendor.o(($event) => setstate(0)),
m: common_vendor.n(common_vendor.unref(status) == 1 ? "xz" : ""),
n: common_vendor.o(($event) => setstate(1)),
o: common_vendor.f(common_vendor.unref(dataList), (item, k0, i0) => {
return {
a: common_vendor.t(item.typeServiceStr),
b: common_vendor.t(item.stockupStatusStr),
@ -139,14 +159,15 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
j: common_vendor.o(($event) => gostockuplist(item))
};
}),
o: common_vendor.o(submitsuccess),
p: common_vendor.sr(tip, "7babdaae-3", {
p: common_vendor.o(submitsuccess),
q: common_vendor.o(jiazai),
r: common_vendor.sr(tip, "7babdaae-3", {
"k": "tip"
}),
q: common_vendor.o(showCalendar),
r: common_vendor.o(onConfirm),
s: common_vendor.o(($event) => common_vendor.isRef(show) ? show.value = $event : null),
t: common_vendor.p({
s: common_vendor.o(showCalendar),
t: common_vendor.o(onConfirm),
v: common_vendor.o(($event) => common_vendor.isRef(show) ? show.value = $event : null),
w: common_vendor.p({
initStartDate: date.value[0],
initEndDate: date.value[1],
value: common_vendor.unref(show)

2
unpackage/dist/dev/mp-weixin/pagesHome/pages/pickingScan/pickingScan.wxml vendored

@ -1 +1 @@
<u-navbar wx:if="{{a}}" u-i="7babdaae-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="schbox"><view>拣货日期:</view><view catchtap="{{i}}" class="inputsr"><input value="{{b}}" disabled placeholder="请选择时间"/><view catchtap="{{h}}"><u-icon wx:if="{{c}}" catchclick="{{d}}" style="margin-right:10rpx" u-i="7babdaae-1" bind:__l="__l" u-p="{{e}}"></u-icon><u-icon wx:else catchclick="{{f}}" style="margin-right:10rpx" u-i="7babdaae-2" bind:__l="__l" u-p="{{g||''}}"></u-icon></view></view><view> 查询 </view></view><view class="tabtip"><view bindtap="{{k}}"><view class="{{j}}">未完成</view></view><view bindtap="{{m}}"><view class="{{l}}">完成</view></view></view><scroll-view class="sccv" scroll-y="true"><view class="mabx"><view wx:for="{{n}}" wx:for-item="item"><view class="topbox"><view class="type1"><view><text style="color:#90A0AF">配车类型:</text>{{item.a}}</view><view><text style="color:#90A0AF">备货是否完成:</text>{{item.b}}</view></view><view class="type1"><view><text style="color:#90A0AF">客户:</text>{{item.c}}</view><view><text style="color:#90A0AF">备货区域:</text>{{item.d}}</view></view><view class="type3"><view><text style="color:#90A0AF">库位:</text>{{item.e}}</view></view><view class="type3"><view><text style="color:#90A0AF">托盘:</text>{{item.f}}</view></view><view class="type2"><view><view>订单总数</view><view>{{item.g}}</view></view><view><view>计划备货件数</view><view>{{item.h}}</view></view><view><view>备货件数</view><view>{{item.i}}</view></view></view></view><view class="bts"><view bindtap="{{o}}"> 备货完成 </view><view bindtap="{{item.j}}"> 去备货 </view></view></view></view></scroll-view><tips class="r" u-r="tip" u-i="7babdaae-3" bind:__l="__l"></tips><l-calendar wx:if="{{t}}" bindhide="{{q}}" bindchange="{{r}}" u-i="7babdaae-4" bind:__l="__l" bindupdateValue="{{s}}" u-p="{{t}}"></l-calendar>
<u-navbar wx:if="{{a}}" u-i="7babdaae-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="schbox"><view>拣货日期:</view><view catchtap="{{i}}" class="inputsr"><input value="{{b}}" disabled placeholder="请选择时间"/><view catchtap="{{h}}"><u-icon wx:if="{{c}}" catchclick="{{d}}" style="margin-right:10rpx" u-i="7babdaae-1" bind:__l="__l" u-p="{{e}}"></u-icon><u-icon wx:else catchclick="{{f}}" style="margin-right:10rpx" u-i="7babdaae-2" bind:__l="__l" u-p="{{g||''}}"></u-icon></view></view><view bindtap="{{j}}"> 查询 </view></view><view class="tabtip"><view bindtap="{{l}}"><view class="{{k}}">未完成</view></view><view bindtap="{{n}}"><view class="{{m}}">完成</view></view></view><scroll-view class="sccv" scroll-y="true" bindscrolltolower="{{q}}"><view class="mabx"><view wx:for="{{o}}" wx:for-item="item"><view class="topbox"><view class="type1"><view><text style="color:#90A0AF">配车类型:</text>{{item.a}}</view><view><text style="color:#90A0AF">备货是否完成:</text>{{item.b}}</view></view><view class="type1"><view><text style="color:#90A0AF">客户:</text>{{item.c}}</view><view><text style="color:#90A0AF">备货区域:</text>{{item.d}}</view></view><view class="type3"><view><text style="color:#90A0AF">库位:</text>{{item.e}}</view></view><view class="type3"><view><text style="color:#90A0AF">托盘:</text>{{item.f}}</view></view><view class="type2"><view><view>订单总数</view><view>{{item.g}}</view></view><view><view>计划备货件数</view><view>{{item.h}}</view></view><view><view>备货件数</view><view>{{item.i}}</view></view></view></view><view class="bts"><view bindtap="{{p}}"> 备货完成 </view><view bindtap="{{item.j}}"> 去备货 </view></view></view></view></scroll-view><tips class="r" u-r="tip" u-i="7babdaae-3" bind:__l="__l"></tips><l-calendar wx:if="{{w}}" bindhide="{{s}}" bindchange="{{t}}" u-i="7babdaae-4" bind:__l="__l" bindupdateValue="{{v}}" u-p="{{w}}"></l-calendar>

16
unpackage/dist/dev/mp-weixin/pagesHome/pages/setbarcode/setbarcode.js vendored

@ -125,8 +125,20 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
stockupArea: details.goodsAreaName,
reservationId: details.reservationId
};
let response = await api_user.distributionStockupstockupScan(data);
console.log(response);
let res = await api_user.distributionStockupstockupScan(data);
console.log(res);
if (res.code == 200) {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
initpage();
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none"
});
}
}
const { items, codelist, printlist } = common_vendor.toRefs(details);
return (_ctx, _cache) => {

5
unpackage/dist/dev/mp-weixin/pagesHome/pages/signinScan/signinScan.js vendored

@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
taskTime_end: "",
datalist: [],
current: 1,
size: 10
size: 5
});
const date = common_vendor.ref([]);
function showCalendar() {
@ -41,6 +41,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
date.value[0] = e.startDate;
date.value[1] = e.endDate;
details.datatime = date.value[0] + " 至 " + date.value[1];
init();
}
common_vendor.onLoad(() => {
date.value[0] = common_vendor.index.$u.timeFormat((/* @__PURE__ */ new Date()).valueOf() - 1e3 * 60 * 60 * 24 * 3, "yyyy-mm-dd");
@ -59,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
async function initpage() {
let data = {
current: details.current,
size: 3,
size: details.size,
taskTime_start: date.value[0],
taskTime_end: date.value[1]
};

7
unpackage/dist/dev/mp-weixin/utils/cacheimg.js vendored

@ -0,0 +1,7 @@
"use strict";
function getImageCache(filePath, fileMd51) {
return new Promise((resolve, reject) => {
resolve(filePath);
});
}
exports.getImageCache = getImageCache;

6
unpackage/dist/dev/mp-weixin/utils/request.js vendored

@ -72,6 +72,12 @@ const service = (params) => {
} else if (res.statusCode == 500) {
utils_functions.api.error("接口出错,请联系后端开发人员");
return;
} else if (res.statusCode == 401) {
common_vendor.index.navigateTo({
url: "/pages/login/login"
});
utils_functions.api.error("请登录");
return;
}
utils_functions.api.error("连接服务器失败");
}

82
utils/cacheimg.js

@ -0,0 +1,82 @@
import base64 from '@/utils/base64.js';
export function getImageCache(filePath,fileMd51) {
//console.log('caoxx')
// #ifdef APP-PLUS
return new Promise((resolve, reject) => {
//console.log(filePath);
let fileMd5 = "";
try{
fileMd5 = Base64.encode(filePath);
//console.log(fileMd5);
}catch(e){
fileMd5 = filePath;
}
// 图片缓存key值
let storageKey = 'IMAGE_CACHE_INFO_' + fileMd5
// 首先获取本地存储的数据,查询是否有对应文件路径,如果有缓存内容,直接返回
const cacheFileInfo = uni.getStorageSync(storageKey)
if (cacheFileInfo) {
//console.log("已缓存为:" + cacheFileInfo)
resolve(cacheFileInfo)
return;
//return cacheFileInfo
} else {
//console.log("未缓存,进行下载保存")
// 如果没有,执行下载,并存储起来后
uni.downloadFile({
url: filePath,
success: (res) => {
if (res.statusCode === 200) {
//console.log('下载成功',filePath,res);
// 再进行本地保存
uni.saveFile({
tempFilePath: res.tempFilePath,
success: function(res2) {
//console.log(res2)
var t0 = plus.io.convertLocalFileSystemURL(res2.savedFilePath);
var t0 = res2.savedFilePath // plus.io.convertLocalFileSystemURL(res2.savedFilePath);
//var t0 = 'file://'+ plus.io.convertLocalFileSystemURL(res2.savedFilePath);
//console.log(t0);
//t0 = plus.io.convertAbsoluteFileSystem(res2.savedFilePath);
//console.log(t0);
//t0 = t0 + "test"
uni.setStorageSync(storageKey, t0)
resolve(t0)
//return res2.savedFilePath
return;
},
fail: function(res2) {
resolve(filePath);
//return filePath
return;
}
})
} else {
console.log('下载临时文件失败')
resolve(filePath);
//return filePath
return;
}
},
fail: (res) => {
console.log(res)
resolve(filePath);
//return filePath
return;
}
})
}
})
// #endif
// #ifndef APP-PLUS
return new Promise((resolve, reject) => {
//reject({
// message: '请在App中使用'
//})
resolve(filePath);
})
// #endif
}

8
utils/request.js

@ -89,7 +89,13 @@ const service = (params) => {
utils.ttsspke('接口出错,请联系后端开发人员')
// #endif
return
}
}else if(res.statusCode == 401){
uni.navigateTo({
url:'/pages/login/login'
})
functions.error('请登录')
return
}
functions.error('连接服务器失败')
// #ifdef APP
utils.ttsspke('连接服务器失败')

Loading…
Cancel
Save