初始化项目

This commit is contained in:
2025-11-26 17:42:45 +08:00
commit 65ecc68767
2513 changed files with 1313954 additions and 0 deletions

249
Web/pages/autho/index.js Normal file
View File

@@ -0,0 +1,249 @@
// logs.js
const app = getApp()
import {
Eentstatus,
GetdingdanbyID,
CHBYT,
} from '../../lib/RequestingCenter.js'
let SCREEN_WIDTH = 750
let RATE = wx.getSystemInfoSync().screenHeight / wx.getSystemInfoSync().screenWidth
let ShippingCodes = ""
var sqlids = 0;
Page({
data: {
ScreenTotalW: SCREEN_WIDTH,
ScreenTotalH: SCREEN_WIDTH * RATE,
listers: [],
chemaList: [],
isCopyingTextDomID: "",
isok: true,
wxma: "",
dingdanbianh: "",
ColorBox_BarCodeList: [],
selectedoutboxlist: [],
ProjectList: [],
scrollTop: 0
},
onLoad: function (option) {
wx.hideLoading();
wx.showLoading({
title: '请稍后....',
});
sqlids = option.sqlid
var that = this;
var data = option.ShippingCode
let list = []
if (sqlids == 1) {
that.setData({
DBname: "uts_zongqing"
})
} else {
that.setData({
DBname: "uts_johao"
})
}
ShippingCodes = option.ShippingCode
GetdingdanbyID({
ShippingCode: data,
sqlid: sqlids
}).then(res => {
console.log(res.IsAdmin)
if (res.IsAdmin == 2 || res.IsAdmin == 1) {
that.setData({
isok: false
})
}
if (res.Status == 200) {
console.log(res)
res.Data.userinfo.forEach((x) => {
list.push(x.ShippingCode);
x.projectNameInfo = res.Data.ProjectList.filter(y => y.ID == x.ProjectID)[0].ProjectName;
})
res.Data.SC.forEach((it) => {
//list.push(x.ShippingCode);
it.projectNameInfo = res.Data.ProjectList.filter(z => z.ID == it.Value[0].ProjectID)[0].ProjectName;
})
that.setData({
listers: res.Data.userinfo,
OutBoxCodeList: res.Data.SC,
dingdanbianh: res.Data.userinfo[0].ShippingCode,
ProjectList: res.Data.ProjectList
});
} else if (res.Status == 100) {
app.toast(2, "你的帐号已经被管理员禁用了,请联系管理员")
} else {
app.toast(2, res.Message || "网络繁忙")
}
wx.hideLoading();
}, err => {
app.toast(2, "网络繁忙")
}).catch(
err => {
console.log(err)
app.toast("异常", 'error')
}
);
},
// 外箱码信息查询
ColorBox_BarCode: function (e) {
var that = this;
// wx.navigateTo({
// url: '/pages/ColorBoxBarCode/ColorBoxBarCode?ShippingCode=' + e.currentTarget.id
// })
var xx = this.data.OutBoxCodeList.find(ee => {
return ee.Key == e.currentTarget.id
})
if (that.data.show == e.currentTarget.id) {
that.setData({
show: 0,
ColorBox_BarCodeList: xx.Value
})
console.log(that.data.show)
} else {
that.setData({
show: e.currentTarget.id,
ColorBox_BarCodeList: xx.Value
})
console.log(that.data.ColorBox_BarCodeList)
console.log(121)
}
},
//根据彩盒码查询里面的产品经过了多少站
ColorBox_BarCodeSelct: function (params) {
var that = this;
CHBYT({
CHID: params.currentTarget.id
}).then(res => {
if (res.Status == 200) {
that.setData({
chemaList: res.Data.userinfo
});
} else {
app.toast(2, res.Message || "网络繁忙")
}
}, err => {
app.toast(2, "网络繁忙")
}).catch(
err => {
console.log(err)
app.toast("异常", 'error')
}
);
if (that.data.shows == params.currentTarget.id) {
that.setData({
shows: 0,
})
console.log(that.data.shows)
} else {
that.setData({
shows: params.currentTarget.id
})
console.log(121)
}
},
onHide: function () {
},
//滚动条至最底部
autoScroll: function () {
var that = this
let query = wx.createSelectorQuery()
query.select('.display').boundingClientRect(res => {
console.log('res', res)
that.setData({
scrollTop: res.height * 100
})
})
query.exec(res => {})
},
//长按复制
copyText: function (e) {
console.log(e)
var that = this
var strID = e.currentTarget.id;
var arrSplit = strID.split("_");
const text = arrSplit[1];
//开始蓝底白字
that.setData({
isCopyingTextDomID: strID
});
wx.setClipboardData({
data: text,
success: function () {
wx.showToast({
title: '复制成功',
});
//已经copy成功但是依然显示蓝底白字状态1秒钟然后提示用户拷贝成功取消蓝底白字状态。
setTimeout(function () {
that.setData({
isCopyingTextDomID: ''
});
}, 3000);
},
fail: function () {
wx.showToast({
title: '复制失败',
icon: 'none',
});
},
});
},
//有权限的人修改状态
Someonewithpermissiontomodifythestatus: function () {
var that = this
var Codes = ShippingCodes
wx.showModal({
title: '提示',
content: '您确定修改' + Codes + '状态',
success(res) {
if (res.confirm) {
console.log('用户点击确认')
Eentstatus({
ShippingCodes: Codes,
sqlid :sqlids
}).then(res => {
app.toast(2, "修改状态成功")
console.log(res)
if (res.Status == 200) {
wx.switchTab({
url: '/pages/index/index'
})
that.setData({
isok: true
})
} else {
app.toast(2, res.Message || "网络繁忙")
}
}, err => {
app.toast(2, "网络繁忙")
}).catch(
err => {
console.log(err)
app.toast("异常", 'error')
}
);
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {
}
}

179
Web/pages/autho/index.wxml Normal file
View File

@@ -0,0 +1,179 @@
<!--pages/autho/index.wxml-->
<wxs module="filter" src="../../utils/filters.wxs"></wxs>
<cu-custom bgColor="bg-gradual-blue" isBack="true">
<view slot="content">AUTS数据中心-出货装车</view>
<view slot="contents"> {{DBname}} </view>
</cu-custom>
<view class="padding flex justify-center align-center bg-white" style="width: {{ScreenTotalW}}rpx;height:{{ScreenTotalH}}rxp;">
<scroll-view class="scroll-view_H display " scroll-y="true" style="height:{{ScreenTotalH-700}}rpx;" scroll-top="{{scrollTop}}">
<block wx:for="{{OutBoxCodeList}}" wx:key="this">
<!-- 清理浮动 -->
<view style="clear: both;"></view>
<view id="{{item.Key}}" bindtap="ColorBox_BarCode">
<view class="nav_imet_lists_3 .solids-left .solids-top .solids-bottom" style="text-align: center; background-color: {{show===item.Key?'#f1f1f1' :'' }} ;">
<view style="font-size: 12px;">
<span>
{{(OutBoxCodeList.length)-(index)}}
</span>
</view>
</view>
<view class="nav_imet_lists_1 .solids-top .solids-left .solids-bottom" style="background-color: {{show===item.Key?'#f1f1f1' :'' }};">
<view style="font-size: 11px;padding-left: 10px;" id="outboxlistitem_{{item.Key}}" bind:longpress="copyText">
<block wx:if="{{isCopyingTextDomID==('outboxlistitem_' + item.Key)}}">
<span class="long-press-selecting">{{item.Key}}</span>
</block>
<block wx:else>
<span style="color: #7f6000; font-weight: 900;">{{filter.SubString(item.Key,0,2)}}</span>
<span style="color: #2e75b6; font-weight: 500;">{{filter.SubString(item.Key,2,6)}}</span>
<span style="color: #7f6000; font-weight: 900;">{{filter.SubString(item.Key,6,10)}}</span>
<span style="color: #2e75b6;font-weight: 500;">{{filter.SubString(item.Key,10,14)}}</span>
<span style="color: #7f6000; font-weight: 900;">{{filter.SubString(item.Key,14,18)}}</span>
<span style="color: #2e75b6;font-weight: 500;">{{filter.SubString(item.Key,18,22)}}</span>
</block>
</view>
</view>
<view class="nav_imet_lists_2 .solids-top .solids-right .solids-bottom " style="background-color:{{show===item.Key?'#f1f1f1' :'' }};">
<view style="font-size: 11px;">
<span class=".text-blue ">
{{item.projectNameInfo}}
</span>
<span>({{item.Value.length}})</span>
</view>
</view>
</view>
<view wx:if="{{show===item.Key}}">
<view class="nav_imet_listsna">
<view class=".solids-bottom .solids-left solids-right ">
<span style="font-size: 11px;">
装箱人:{{item.Value[0].ShippingLoader}}
</span>
</view>
</view>
<view class="nav_imet_listsnas">
<view class=".solids-bottom .solids-left solids-right ">
<span style="font-size: 11px;">
装箱:{{filter.TimeFormat(item.Value[0].ShippingDateTime)}}
</span>
</view>
</view>
</view>
<view wx:if="{{show==item.Key}}" id="{{item.Key}}" bindtap="ColorBox_BarCode">
<scroll-view class="scroll-view_H" scroll-y="true" style="max-height: 350px; margin-bottom: 40px;">
<block wx:for="{{ColorBox_BarCodeList}}" wx:key="this">
<view class="nav_imet" id="{{item.ColorBox_BarCode}}" bindtap="ColorBox_BarCodeSelct" style="margin-left: 15px;">
<view class="nav_imet_lists">
<view class=".solids-bottom .solids-left solids-right" id="colorboxlist_{{item.ColorBox_BarCode}}" bind:longpress="copyText">
<block wx:if="{{isCopyingTextDomID==('colorboxlist_' + item.ColorBox_BarCode)}}">
<span class="long-press-selecting">{{item.ColorBox_BarCode}}</span>
</block>
<block wx:else>
<span style="font-size: 10px; color: #7f6000; font-weight: 900;">{{filter.SubString(item.ColorBox_BarCode,0,1)}}</span>
<span style="font-size: 10px; color: #2e75b6;font-weight: 500;">{{filter.SubString(item.ColorBox_BarCode,1,5)}}</span>
<span style="font-size: 10px; color: #7f6000; font-weight: 900;">{{filter.SubString(item.ColorBox_BarCode,5,9)}}</span>
<span style="font-size: 10px;color: #2e75b6;font-weight: 500;">{{filter.SubString(item.ColorBox_BarCode,9,13)}}</span>
<span style="font-size: 10px; color: #7f6000;font-weight: 900;">{{filter.SubString(item.ColorBox_BarCode,13,17)}}</span>
<span style="font-size: 10px;color: #2e75b6;font-weight: 500;">{{filter.SubString(item.ColorBox_BarCode,17,21)}}</span>
</block>
</view>
</view>
</view>
</block>
</scroll-view>
</view>
</block>
</scroll-view>
</view>
<view style="width: 100%;">
<button class="bg-green " bindtap="Someonewithpermissiontomodifythestatus" disabled="{{isok}}"> <span>(修改状态)</span></button>
</view>
<!-- 订单信息显示 -->
<scroll-view class="scroll-view_H">
<block wx:for="{{listers}}" wx:key="this">
<view class="weathers_imet .solid .shadow " style="border-radius: 2%; background-color: white;">
<view class="weathers_imet_lists" id="{{item.ShippingCode}}" bindtap="DianJiDingDan">
<view style=" margin-left: 7%; font-weight: 900;font-size: 12px;" id="shipcodeinfo_{{item.ShippingCode}}" bind:longpress="copyText">
<span>单号: </span>
<block wx:if="{{isCopyingTextDomID==('shipcodeinfo_' + item.ShippingCode)}}">
<span class="long-press-selecting">{{item.ShippingCode}}</span>
</block>
<block wx:else>
<span style="color: #7f6000;">{{filter.SubString(item.ShippingCode,0,2)}}</span>
<span style="color: #2e75b6">{{filter.SubString(item.ShippingCode,2,6)}}</span>
<span style="color: #7f6000;">{{filter.SubString(item.ShippingCode,6,10)}}</span>
<span style="color: #2e75b6">{{filter.SubString(item.ShippingCode,10,14)}}</span>
<span style="color: #7f6000;">{{filter.SubString(item.ShippingCode,14)}}</span>
</block>
</view>
<view style="margin-left: 7%;">
<span>
MO:{{item.MO}}
</span>
</view>
<view style="margin-left: 7%;">
<span>
创建:{{filter.TimeFormat(item.CreateDateTime)}}
</span>
</view>
<view style="margin-left: 7%;">
<span>
开始:{{filter.TimeFormat(item.StartDateTime)}}
</span>
</view>
<view style="margin-left: 7%;">
<span>
结束:{{filter.TimeFormat(item.EndDateTime)}}
</span>
</view>
<view style="margin-left: 7%;">
<span>
凭证:{{item.Voucher}}
</span>
</view>
<view style="margin-left: 7%;">
<span>
运输方式:{{item.ShippingType}}
</span>
</view>
<view style="font-weight: 900; margin-left: 7%;">
<span>
备注: {{item.Remark}}
</span>
</view>
</view>
<view class="weathers_imet_list">
<view style="margin-left: 7%; font-weight: 700;font-size: 12px;">
<span>
状态:<span class=" {{(item.Status === 1 ? '.text-red ' : (item.Status===2?'.text-yellow ':'.text-green'))}}">
{{(item.Status === 1 ? '未装车' : (item.Status === 2 ? "装车中" : "已结单"))}}
</span>
</span>
</view>
<view style="margin-left: 7%;">
<span class=".text-blue" style="font-weight: 900; font-size: 12px;">
机型: {{item.projectNameInfo}}
</span>
</view>
<view style="font-weight: 900; margin-left: 7%;">
<span>
数量: {{item.QTY}}</span>
</view>
<view style="margin-left: 7%;">
<span style="display: inline-block;width: 104px;">
创建人: {{item.Creator}}
</span>
</view>
<view style="margin-left: 7%;">
<span>
客户: {{item.Customer}}</span>
</view>
<view style="margin-left: 7%;">
<span>
结单人: {{item.Loader}}
</span>
</view>
</view>
</view>
</block>
</scroll-view>

111
Web/pages/autho/index.wxss Normal file
View File

@@ -0,0 +1,111 @@
/* pages/autho/index.wxss */
/*
九宫格容器布局样式
*/
.grid-item-container {
margin-top: 5px;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
/*
item容器样式
*/
.grid-item-child {
display: flex;
display: -webkit-flex;
justify-content: center;
flex-direction: column;
flex-wrap: wrap;
float: left;
width: 50%;
height: 100rpx;
box-sizing: border-box;
margin-top: 5px;
text-align: center;
}
.weathers_imet {
width: 100%;
height: 180px;
}
.weathers_imet_lists {
float: left;
width: 60%;
margin-top: 10px;
font-size: 12px;
text-align: left;
}
.weathers_imet_list {
float: left;
width: 40%;
margin-top: 10px;
font-size: 12px;
text-align: left;
}
.nav {
height: 100%;
width: 100%;
display: flex;
flex-direction: row;
margin-bottom: 5px;
}
.nav_imet_lists_1 {
float: left;
height: 40px;
line-height: 40px;
width: 60%;
margin-top: 5px;
}
.nav_imet_lists_2 {
float: left;
height: 40px;
line-height: 40px;
width: 30%;
margin-top: 5px;
}
.nav_imet_lists_3 {
float: left;
height: 40px;
line-height: 40px;
width: 10%;
margin-top: 5px;
}
.nav_imet_lists {
width: 47%;
float: left;
font-size: 12px;
text-align: center;
height: 30px;
line-height: 30px;
}
.nav_imet_listsna {
width: 45%;
float: left;
font-size: 12px;
text-align: center;
height: 30px;
line-height: 30px;
margin-left: 15px;
}
.nav_imet_listsnas {
width: 45%;
float: left;
font-size: 12px;
text-align: center;
height: 30px;
line-height: 30px;
}