初始化项目
This commit is contained in:
492
Web/pages/ColorBoxBarCode/ColorBoxBarCode.js
Normal file
492
Web/pages/ColorBoxBarCode/ColorBoxBarCode.js
Normal file
@@ -0,0 +1,492 @@
|
||||
// pages/ColorBoxBarCode/ColorBoxBarCode.js
|
||||
const app = getApp()
|
||||
|
||||
//导入日志信息请求发方法
|
||||
import {
|
||||
Getlogs
|
||||
} from '../../lib/RequestingCenter.js'
|
||||
var util = require('../../utils/util.js')
|
||||
let SCREEN_WIDTH = 750
|
||||
let RATE = wx.getSystemInfoSync().screenHeight / wx.getSystemInfoSync().screenWidth
|
||||
|
||||
Page({
|
||||
data: {
|
||||
isCopyingTextDomID: "",
|
||||
ScreenTotalW: SCREEN_WIDTH,
|
||||
ScreenTotalH: SCREEN_WIDTH * RATE,
|
||||
array: [],
|
||||
// 时间范围 4 今日
|
||||
seltime: 4,
|
||||
// 起始时间
|
||||
starttime: "",
|
||||
// 结束时间
|
||||
endtime: "",
|
||||
//总数
|
||||
sum: 0,
|
||||
filtcount: 0,
|
||||
logs: [],
|
||||
// // 酒店
|
||||
// Hotels:[],
|
||||
// // 下拉框的酒店
|
||||
// Hotelslist:[],
|
||||
// 下拉框的索引
|
||||
index: 0,
|
||||
apptype: -1,
|
||||
//名字搜素
|
||||
name: '',
|
||||
Outcode: '',
|
||||
//操作
|
||||
czuo: ''
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {
|
||||
var that = this
|
||||
console.log(sqlids)
|
||||
wx.hideLoading();
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
let sqlids = wx.getStorageSync('sqlid') || 0
|
||||
Getlogs({
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
if (res.Status == 200) {
|
||||
console.log(res)
|
||||
let TBLProject = [];
|
||||
TBLProject.push("全部机型")
|
||||
res.Data.TBL_Project.forEach((x) => {
|
||||
TBLProject.push(x.ProjectName);
|
||||
})
|
||||
that.setData({
|
||||
logs: res.Data.bindhistoryinfo,
|
||||
sum: res.Data.bindhistoryinfo.length,
|
||||
filtcount: res.Data.bindhistoryinfo.length,
|
||||
array: TBLProject
|
||||
})
|
||||
wx.hideLoading();
|
||||
console.log(that.data.sum)
|
||||
console.log(that.data.filtcount)
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
},
|
||||
// 订单查询
|
||||
sreach: function (params) {
|
||||
var that = this;
|
||||
let sqlids = wx.getStorageSync('sqlid') || 0
|
||||
Getlogs({
|
||||
ShippingCode: that.data.name,
|
||||
starttime: that.data.starttime,
|
||||
endtime: that.data.endtime,
|
||||
Outcode: that.data.Outcode,
|
||||
czuo: that.data.czuo,
|
||||
jixing: that.data.index,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
if (res.Status == 200) {
|
||||
let TBLProject = [];
|
||||
TBLProject.push("全部机型")
|
||||
res.Data.TBL_Project.forEach((x) => {
|
||||
TBLProject.push(x.ProjectName);
|
||||
})
|
||||
that.setData({
|
||||
logs: res.Data.bindhistoryinfo,
|
||||
filtcount: res.Data.bindhistoryinfo.length,
|
||||
array: TBLProject
|
||||
})
|
||||
console.log(that.data.logs)
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
},
|
||||
//时间下拉框事件
|
||||
bindTimeChange: function (e) {
|
||||
var that = this
|
||||
if (e.target.dataset.type == 1) {
|
||||
this.setData({
|
||||
seltime: 5,
|
||||
starttime: e.detail.value,
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
seltime: 5,
|
||||
endtime: e.detail.value,
|
||||
})
|
||||
}
|
||||
|
||||
if (
|
||||
(that.data.starttime == "" || that.data.starttime == null) ||
|
||||
(that.data.endtime == "" || that.data.endtime == null)
|
||||
) {
|
||||
app.toast(2, "数据不完整")
|
||||
} else {
|
||||
let sqlids = wx.getStorageSync('sqlid') || 0
|
||||
Getlogs({
|
||||
ShippingCode: that.data.name,
|
||||
starttime: that.data.starttime,
|
||||
endtime: that.data.endtime,
|
||||
Outcode: that.data.Outcode,
|
||||
czuo: that.data.czuo,
|
||||
jixing: that.data.index,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
|
||||
if (res.Status == 200) {
|
||||
let TBLProject = [];
|
||||
TBLProject.push("全部机型")
|
||||
res.Data.TBL_Project.forEach((x) => {
|
||||
TBLProject.push(x.ProjectName);
|
||||
})
|
||||
that.setData({
|
||||
logs: res.Data.bindhistoryinfo,
|
||||
filtcount: res.Data.bindhistoryinfo.length,
|
||||
array: TBLProject
|
||||
})
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
// 时间选择
|
||||
seltime: function (e) {
|
||||
var that = this
|
||||
let sel = Number(e.target.dataset.val);
|
||||
let starttime = util.formatTime(new Date()).split(' ')[0];
|
||||
let endtime = util.formatTime(new Date()).split(' ')[0];
|
||||
switch (sel) {
|
||||
case 2:
|
||||
let time = this.getThisWeekData();
|
||||
starttime = time.start_day; //显示周一
|
||||
endtime = time.end_day; //显示周日
|
||||
break;
|
||||
case 3:
|
||||
starttime = util.getCurrentMonthFirst(new Date())
|
||||
endtime = util.getCurrentMonthLast(new Date())
|
||||
break;
|
||||
case 4:
|
||||
starttime = ""
|
||||
endtime = ""
|
||||
break;
|
||||
}
|
||||
wx.hideLoading();
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
this.setData({
|
||||
seltime: sel,
|
||||
starttime: starttime,
|
||||
endtime: endtime,
|
||||
})
|
||||
let sqlids = wx.getStorageSync('sqlid') || 0
|
||||
Getlogs({
|
||||
ShippingCode: that.data.name,
|
||||
starttime: that.data.starttime,
|
||||
endtime: that.data.endtime,
|
||||
Outcode: that.data.Outcode,
|
||||
czuo: that.data.czuo,
|
||||
jixing: that.data.index,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
if (res.Status == 200) {
|
||||
let TBLProject = [];
|
||||
TBLProject.push("全部机型")
|
||||
res.Data.TBL_Project.forEach((x) => {
|
||||
TBLProject.push(x.ProjectName);
|
||||
})
|
||||
that.setData({
|
||||
logs: res.Data.bindhistoryinfo,
|
||||
filtcount: res.Data.bindhistoryinfo.length,
|
||||
array: TBLProject
|
||||
})
|
||||
wx.hideLoading();
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
wx.hideLoading();
|
||||
}
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
wx.hideLoading();
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
getThisWeekData: function () { //获得本周周一~周日的年月日
|
||||
var thisweek = {};
|
||||
var date = new Date();
|
||||
// 本周一的日期
|
||||
date.setDate(date.getDate() - date.getDay() + 1);
|
||||
thisweek.start_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
|
||||
// 本周日的日期
|
||||
date.setDate(date.getDate() + 6);
|
||||
thisweek.end_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
|
||||
return thisweek;
|
||||
},
|
||||
//操作查询
|
||||
selapptype: function (e) {
|
||||
var that = this;
|
||||
let sel = Number(e.target.dataset.val) + 4;
|
||||
console.log(sel)
|
||||
wx.hideLoading();
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
that.setData({
|
||||
apptype: e.target.dataset.val,
|
||||
czuo: sel
|
||||
})
|
||||
let sqlids = wx.getStorageSync('sqlid') || 0
|
||||
Getlogs({
|
||||
ShippingCode: that.data.name,
|
||||
starttime: that.data.starttime,
|
||||
endtime: that.data.endtime,
|
||||
Outcode: that.data.Outcode,
|
||||
czuo: that.data.czuo,
|
||||
jixing: that.data.index,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
if (res.Status == 200) {
|
||||
let TBLProject = [];
|
||||
TBLProject.push("全部机型")
|
||||
res.Data.TBL_Project.forEach((x) => {
|
||||
TBLProject.push(x.ProjectName);
|
||||
})
|
||||
that.setData({
|
||||
logs: res.Data.bindhistoryinfo,
|
||||
filtcount: res.Data.bindhistoryinfo.length,
|
||||
array: TBLProject
|
||||
})
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
wx.hideLoading();
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
wx.hideLoading();
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
wx.hideLoading();
|
||||
}
|
||||
);
|
||||
console.log(that.data.Outcode)
|
||||
console.log(that.data.czuo)
|
||||
},
|
||||
//机型查询
|
||||
bindjixingChange: function (e) {
|
||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||
wx.hideLoading();
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
var that = this
|
||||
this.setData({
|
||||
index: e.detail.value
|
||||
})
|
||||
let sqlids = wx.getStorageSync('sqlid') || 0
|
||||
Getlogs({
|
||||
ShippingCode: that.data.name,
|
||||
starttime: that.data.starttime,
|
||||
endtime: that.data.endtime,
|
||||
Outcode: that.data.Outcode,
|
||||
czuo: that.data.czuo,
|
||||
jixing: that.data.index,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
if (res.Status == 200) {
|
||||
let TBLProject = [];
|
||||
TBLProject.push("全部机型")
|
||||
res.Data.TBL_Project.forEach((x) => {
|
||||
TBLProject.push(x.ProjectName);
|
||||
})
|
||||
that.setData({
|
||||
logs: res.Data.bindhistoryinfo,
|
||||
filtcount: res.Data.bindhistoryinfo.length,
|
||||
array: TBLProject
|
||||
})
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
wx.hideLoading();
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
wx.hideLoading();
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
wx.hideLoading();
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
var that = this
|
||||
wx.hideLoading();
|
||||
let sqlids = wx.getStorageSync('sqlid') || 0
|
||||
if (sqlids == 1) {
|
||||
that.setData({
|
||||
DBname: "uts_zongqing"
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
DBname: "uts_johao"
|
||||
})
|
||||
}
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
Getlogs({
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.Status == 200) {
|
||||
let TBLProject = [];
|
||||
TBLProject.push("全部机型")
|
||||
res.Data.TBL_Project.forEach((x) => {
|
||||
TBLProject.push(x.ProjectName);
|
||||
})
|
||||
that.setData({
|
||||
logs: res.Data.bindhistoryinfo,
|
||||
filtcount: res.Data.bindhistoryinfo.length,
|
||||
array: TBLProject
|
||||
})
|
||||
wx.hideLoading();
|
||||
} else {
|
||||
wx.hideLoading();
|
||||
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
wx.hideLoading();
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
wx.hideLoading();
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
// var aa = wx.getLaunchOptionsSync().scene
|
||||
// console.log(wx.getLaunchOptionsSync())
|
||||
// console.log(aa)
|
||||
// wx.navigateTo({
|
||||
// url: '../login/login'
|
||||
// })
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
//长按复制
|
||||
copyText: function (e) {
|
||||
console.log(e)
|
||||
var that = this
|
||||
//const text = e.currentTarget.id;
|
||||
|
||||
var strID = e.currentTarget.id;
|
||||
var arrSplit = strID.split("_");
|
||||
const text = arrSplit[2];
|
||||
|
||||
//开始蓝底白字
|
||||
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',
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
})
|
||||
3
Web/pages/ColorBoxBarCode/ColorBoxBarCode.json
Normal file
3
Web/pages/ColorBoxBarCode/ColorBoxBarCode.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
125
Web/pages/ColorBoxBarCode/ColorBoxBarCode.wxml
Normal file
125
Web/pages/ColorBoxBarCode/ColorBoxBarCode.wxml
Normal file
@@ -0,0 +1,125 @@
|
||||
<!-- 过滤器 -->
|
||||
<wxs module="filter" src="../../utils/filters.wxs"></wxs>
|
||||
<cu-custom bgColor="bg-gradual-blue">
|
||||
<view slot="content">AUTS数据中心-出货装车</view>
|
||||
<view slot="contents"> {{DBname}} </view>
|
||||
</cu-custom>
|
||||
<view class="padding-sm bg-white radius shadow shadow-lg" style="padding-bottom:0; width: {{ScreenTotalW}}rpx;height:{{ScreenTotalH}}rxp;">
|
||||
<view class="flex flex-wrap" style="height: 300rpx; width: {{ScreenTotalW}}rpx;">
|
||||
<view class="basis-xl text-df padding-top-xs ">
|
||||
操作日志共{{sum}}条
|
||||
<text class="padding-right"></text>过滤后{{filtcount}}条
|
||||
</view>
|
||||
<!-- 操作筛选 -->
|
||||
<view style="flex-basis:100% " class="flex padding-top-xs">
|
||||
<view bindtap="selapptype" data-val="-1" class="padding-right padding-left {{apptype==-1?'bg-green':''}} margin-right-xs text-df">全部</view>
|
||||
<view bindtap="selapptype" data-val="0" class="padding-right padding-left {{apptype==0?'bg-green':''}} margin-right-xs text-df">绑定</view>
|
||||
<view bindtap="selapptype" data-val="1" class="padding-right padding-left {{apptype==1?'bg-green':''}} margin-right-xs text-df">解绑</view>
|
||||
<view bindtap="selapptype" data-val="2" class="padding-right padding-left {{apptype==2?'bg-green':''}} margin-right-xs text-df">结单</view>
|
||||
<picker class="text-df" bindchange="bindjixingChange" value="{{index}}" range="{{array}}">
|
||||
<view class="picker text-green">
|
||||
{{array[index]}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- 时间筛选 -->
|
||||
<view style="flex-basis:100% " class="flex padding-top-xs">
|
||||
<view bindtap="seltime" data-val="4" class="padding-right padding-left {{seltime==4?'bg-green':''}} margin-right-xs text-df">全部</view>
|
||||
<view bindtap="seltime" data-val="1" class="padding-right padding-left {{seltime==1?'bg-green':''}} margin-right-xs text-df">今日</view>
|
||||
<view bindtap="seltime" data-val="2" class="padding-right padding-left {{seltime==2?'bg-green':''}} margin-right-xs text-df">本周</view>
|
||||
<view bindtap="seltime" data-val="3" class="padding-right padding-left {{seltime==3?'bg-green':''}} margin-right-xs text-df">本月</view>
|
||||
<view bindtap="seltime" data-val="5" class="padding-right padding-left {{seltime==5?'bg-green':''}} margin-right-xs text-df">指定时间</view>
|
||||
</view>
|
||||
<view style="flex-basis:100% " class="flex padding-top-xs">
|
||||
<view class="margin-right-xs text-df">起始时间:</view>
|
||||
<picker mode="date" class="text-df" data-type="1" bindchange="bindTimeChange" :value="starttime">
|
||||
<view class="picker text-green">
|
||||
{{starttime==""?"请选择":starttime}}
|
||||
</view>
|
||||
</picker>
|
||||
<view class="margin-left-sm margin-right-xs text-df">截止时间:</view>
|
||||
<picker start="{{starttime}}" mode="date" class="text-df" bindchange="bindTimeChange" data-type="2" :value="endtime">
|
||||
<view class="picker text-green">
|
||||
{{endtime==""?"请选择":endtime}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view style="flex-basis:40% " class="flex padding-top-xs align-center">
|
||||
<input style="border-bottom: 2rpx solid #ccc !important;" class="text-df padding-right padding-left margin-right-xs" placeholder="搜索订单" name="input" model:value="{{name}}"></input>
|
||||
</view>
|
||||
<view style="flex-basis:40% " class="flex padding-top-xs align-center">
|
||||
<input style="border-bottom: 2rpx solid #ccc !important;" class="text-df padding-right padding-left margin-right-xs" placeholder="搜索外箱" name="input" model:value="{{Outcode}}"></input>
|
||||
</view>
|
||||
<view bindtap="sreach" class="padding-right padding-left bg-green text-df">搜索</view>
|
||||
</view>
|
||||
<!-- 内容区域开始 -->
|
||||
<scroll-view class="scroll-view_H .solids-right .solids-left" scroll-y="true" style="height:{{ScreenTotalH-600}}rpx;">
|
||||
<block wx:for="{{logs}}" wx:key="this">
|
||||
<view>
|
||||
<view class="weathers_imet_lists .light .solids-top .shadow-blur ">
|
||||
<view style="font-size: 12px; ">
|
||||
<span style="color: gray;font-weight: 900;">
|
||||
<span style="font-weight: 900;" class="{{(item.operateType === 4 ? '.text-blue ' :(item.operateType===5?'.text-red':(item.operateType===6?'.text-yellow':'.text-grey')))}}">
|
||||
{{(item.operateType === 4? '绑定' : (item.operateType===5? '解绑':(item.operateType===6?'结单':'修改订单状态到装车中')))}}
|
||||
</span>
|
||||
<span style="font-weight: 900;" class="{{(item.Result === 1 ? '.text-green ' :'.text-red ')}}">
|
||||
{{(item.Result === 1 ? '成功' : '失败')}}
|
||||
</span>
|
||||
{{filter.TimeFormat(item.operateTime)}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="font-size: 12px;" id="loglistitem_{{item.importinfoID}}_{{item.ShippingCode}}" bind:longpress="copyText">
|
||||
<span>出货码: </span>
|
||||
<block wx:if="{{isCopyingTextDomID==('loglistitem_' + item.importinfoID + '_' + 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="font-size: 12px;" hidden="{{item.operateType==6 || item.operateType==7}}" id="loglistitem_{{item.importinfoID}}_{{item.OutBoxCode}}" bind:longpress="copyText">
|
||||
<span>外箱码:</span>
|
||||
<block wx:if="{{isCopyingTextDomID==('loglistitem_' + item.importinfoID + '_' + item.OutBoxCode)}}">
|
||||
<span class="long-press-selecting">{{item.OutBoxCode}}</span>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<span style="color: #7f6000;">{{filter.SubString(item.OutBoxCode,0,2)}}</span>
|
||||
<span style="color: #2e75b6">{{filter.SubString(item.OutBoxCode,2,6)}}</span>
|
||||
<span style="color: #7f6000;">{{filter.SubString(item.OutBoxCode,6,10)}}</span>
|
||||
<span style="color: #2e75b6">{{filter.SubString(item.OutBoxCode,10,14)}}</span>
|
||||
<span style="color: #7f6000;">{{filter.SubString(item.OutBoxCode,14,18)}}</span>
|
||||
<span style="color: #2e75b6">{{filter.SubString(item.OutBoxCode,18,22)}}</span>
|
||||
</block>
|
||||
</view>
|
||||
<view style="font-size: 12px;">
|
||||
信息:<span class=".text-gray">{{item.Remark}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weathers_imet_list .light .solids-top .shadow-blur ">
|
||||
<view style="font-size: 12px; font-weight: 900;">
|
||||
<span class="">
|
||||
编号:{{item.importinfoID}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="font-size: 12px;">
|
||||
<span class=".text-gray">
|
||||
机型:{{item.ProjectName==='VC_2006'?'null':item.ProjectName}}
|
||||
|
||||
|
||||
<!-- {{(item.ProjectID === 1 ? 'Mars' : (item.ProjectID === 2 ? "Phobos" :(item.ProjectID === 3 ? "ZimaPro" :(item.ProjectID === 4 ? "Shipping" : "ZimaMotor"))))}} -->
|
||||
</span>
|
||||
</view>
|
||||
<view style="font-size: 12px;">
|
||||
<span class=".text-gray">
|
||||
操作人:{{item.ShippingOperator===null?"":item.ShippingOperator}}
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
15
Web/pages/ColorBoxBarCode/ColorBoxBarCode.wxss
Normal file
15
Web/pages/ColorBoxBarCode/ColorBoxBarCode.wxss
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
.weathers_imet_lists {
|
||||
float: left;
|
||||
width: 60%;
|
||||
height: 10%;
|
||||
padding-left: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.weathers_imet_list {
|
||||
float: left;
|
||||
width: 35%;
|
||||
height: 10%;
|
||||
font-size: 13px;
|
||||
}
|
||||
1313
Web/pages/OUtBoxBarCode/OUtBoxBarCode.js
Normal file
1313
Web/pages/OUtBoxBarCode/OUtBoxBarCode.js
Normal file
File diff suppressed because it is too large
Load Diff
3
Web/pages/OUtBoxBarCode/OUtBoxBarCode.json
Normal file
3
Web/pages/OUtBoxBarCode/OUtBoxBarCode.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
233
Web/pages/OUtBoxBarCode/OUtBoxBarCode.wxml
Normal file
233
Web/pages/OUtBoxBarCode/OUtBoxBarCode.wxml
Normal file
@@ -0,0 +1,233 @@
|
||||
<!--logs.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-sm bg-white radius shadow shadow-lg" style="width: {{ScreenTotalW}}rpx;height:{{ScreenTotalH}}rxp;">
|
||||
<!--
|
||||
<scroll-view class="scroll-view_H">
|
||||
<block wx:for="{{arrScannedCodes}}" wx:key="this">
|
||||
<view style="width: 100%;" >
|
||||
{{item}}
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view> -->
|
||||
<!-- 外箱码信息显示 -->
|
||||
<scroll-view id="parent" class="scroll-view_H" scroll-y="true" style="height:{{ScreenTotalH-710}}rpx;" scroll-top="{{scrollTop}}">
|
||||
<block wx:for="{{OutBoxCodeList}}" wx:key="this">
|
||||
|
||||
<!--1. 当前外箱序号,状态,号码,机型数量区域-->
|
||||
<view id="{{item.id}}" bindtap="ColorBox_BarCode">
|
||||
|
||||
<!--序号,图标-->
|
||||
<view class="nav_imet_lists_1 .solids-top .solids-right .solids-bottom .solids-left"
|
||||
style="text-align: center; background-color:{{show===item.id?'#f1f1f1' :'' }};">
|
||||
<view style="font-weight: 800;" class="{{item.status==-1?'.light .bg-red':(item.status==0?'':'.light .bg-green')}}">
|
||||
<span class="text-black ">
|
||||
<span style="display: {{item.status!=1?'none':'inline'}};"> {{(OutBoxCodeList.length)-(index)}}</span>
|
||||
<span style="display: {{item.status==1?'none':'inline'}};" class="{{item.status==-1?'.cuIcon-close':(item.status==0?'.cuIcon-loading2':'.cuIcon-check')}}"></span>
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
<!--外箱码-->
|
||||
<view class="nav_imet_lists_2 .solids-top .solids-bottom "
|
||||
style="font-size: 12px;background-color:{{show===item.id?'#f1f1f1' :'' }};">
|
||||
<view style="font-size: 12px;"
|
||||
class="{{item.status==-1?'.light .bg-red':(item.status==0?'':'.light .bg-green')}}" id="{{item.id}}"
|
||||
id="outboxlistitem_{{item.id}}" bind:longpress="copyText">
|
||||
<block wx:if="{{isCopyingTextDomID==('outboxlistitem_' + item.id)}}">
|
||||
<span class="long-press-selecting">{{item.id}}</span>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<span style="color: #7f6000;font-weight: 900;">{{filter.SubString(item.id,0,2)}}</span>
|
||||
<span style="color: #2e75b6; font-weight: 500;">{{filter.SubString(item.id,2,6)}}</span>
|
||||
<span style="color: #7f6000;font-weight: 900;">{{filter.SubString(item.id,6,10)}}</span>
|
||||
<span style="color: #2e75b6 ;font-weight: 500;">{{filter.SubString(item.id,10,14)}}</span>
|
||||
<span style="color: #7f6000; font-weight: 900;">{{filter.SubString(item.id,14,18)}}</span>
|
||||
<span style="color: #2e75b6 ;font-weight: 500;">{{filter.SubString(item.id,18,22)}}</span>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!--机型和数量-->
|
||||
<view class="nav_imet_lists_3 .solids-top .solids-bottom .solids-right" style="font-size: 12px; background-color:{{show===item.id?'#f1f1f1' :'' }};">
|
||||
<view class="{{item.status==-1?'.light .bg-red':(item.status==0?'':'.light .bg-green')}}">
|
||||
<span class=".text-blue">
|
||||
{{item.ProjectName}}
|
||||
<!-- {{
|
||||
item.projectid==0 ? "":
|
||||
(item.projectid==1 ? "Mars" :
|
||||
(item.projectid == 2 ? "Phobos" :
|
||||
(item.projectid == 3 ? "ZimaPro" :
|
||||
(item.projectid == 4 ? "Shipping" : "ZimaMotor"))))
|
||||
}} -->
|
||||
</span>
|
||||
<span class="text-black ">
|
||||
({{item.bclist.length}})
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--2. 当前外箱删除按钮-->
|
||||
<view class="nav_imet_lists_4 .solids-top .solids-right .solids-bottom .solids-left" hidden="{{shows}}" style="text-align: center;">
|
||||
<view class=".bg-red" style="font-weight: 800; " id="{{item.id}}" bindtap="Edit">
|
||||
<span>删</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--3. 隐藏区域1。 错误时,显示错误信息。正确时,显示装箱人,装箱时间 -->
|
||||
<view wx:if="{{show===item.id}}">
|
||||
<view class="nav_imet_listsnasas" wx:if="{{item.status==-1}}">
|
||||
<view class=".solids-bottom .solids-left solids-right ">
|
||||
<span style="font-size: 10px;">
|
||||
错误信息:{{item.errmsg}}
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav_imet_listsna" wx:if="{{item.status==1}}">
|
||||
<view class=".solids-bottom .solids-left solids-right ">
|
||||
<span style="font-size: 10px;">
|
||||
装箱人:{{item.operator}}
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav_imet_listsnas" wx:if="{{item.status==1}}">
|
||||
<view class=".solids-bottom .solids-left solids-right ">
|
||||
<span style="font-size: 10px;">
|
||||
装箱:{{filter.TimeFormat(item.operatetime)}}
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--4. 隐藏区域2。 当前外箱下面的彩箱列表 -->
|
||||
<view wx:if="{{show==item.id}}" id="{{item.id}}" bindtap="ColorBox_BarCode">
|
||||
<scroll-view id="child" class="scroll-view_H" scroll-y="true" style="max-height: 300px; margin-bottom: 40px;">
|
||||
<block wx:for="{{item.bclist}}" wx:key="this">
|
||||
<view class="nav_imet" style="margin-left: 15px;">
|
||||
<view class="nav_imet_lists">
|
||||
<view class=".solids-bottom .solids-left solids-right " id="colorboxlistitem_{{item.ColorBox}}" bind:longpress="copyText">
|
||||
<block wx:if="{{isCopyingTextDomID==('colorboxlistitem_' + item.ColorBox)}}">
|
||||
<span class="long-press-selecting">{{item.ColorBox}}</span>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<span style="font-size: 10px; color: #7f6000;font-weight: 900;">{{filter.SubString(item.ColorBox,0,1)}}</span>
|
||||
<span style="font-size: 10px; color: #2e75b6;font-weight: 500;">{{filter.SubString(item.ColorBox,1,5)}}</span>
|
||||
<span style="font-size: 10px; color: #7f6000;font-weight: 900;">{{filter.SubString(item.ColorBox,5,9)}}</span>
|
||||
<span style="font-size: 10px; color: #2e75b6;font-weight: 500;">{{filter.SubString(item.ColorBox,9,13)}}</span>
|
||||
<span style="font-size: 10px; color: #7f6000;font-weight: 900;">{{filter.SubString(item.ColorBox,13,17)}}</span>
|
||||
<span style="font-size: 10px; color: #2e75b6;font-weight: 500;">{{filter.SubString(item.ColorBox,17,21)}}</span>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 清理浮动 -->
|
||||
<view style="clear: both;"></view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 按钮区域 -->
|
||||
<view style="width: 100%;" style="height: 100px;">
|
||||
<button class="bg-green cu-btn" bindtap="CheckOut" hidden="{{shows}}" disabled="{{isok}}" style="margin-left: 20px;"> 结单</button>
|
||||
<button class="bg-green cu-btn btnyshi_2" bindtap="scanCodeEvent" hidden="{{shows}}" style="margin-left: 20px;height: 60px;"> <span>(扫码)</span></button>
|
||||
<button class="bg-green cu-btn" bindtap="rgluru" hidden="{{shows}}" style="margin-left: 10px; font-size: 12px;">人工录入</button>
|
||||
<button class="bg-green cu-btn" bindtap="CheckGxing" hidden="{{shows}}" style="margin-left: 10px;">更新</button>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息显示 -->
|
||||
<scroll-view class="scroll-view_H">
|
||||
<view class="weathers_imet .bg-white .solid .shadow-blur" style="height: 150px;">
|
||||
<view class="weathers_imet_lists">
|
||||
<view style="margin-left: 7%; font-weight: 900;" id="shiplistitem_{{listers.ShippingCode}}" bind:longpress="copyText">
|
||||
<span>单号:</span>
|
||||
<block wx:if="{{isCopyingTextDomID==('shiplistitem_' + listers.ShippingCode)}}">
|
||||
<span class="long-press-selecting">{{listers.ShippingCode}}</span>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<span style="color: #7f6000;">{{filter.SubString(listers.ShippingCode,0,2)}}</span>
|
||||
<span style="color: #2e75b6">{{filter.SubString(listers.ShippingCode,2,6)}}</span>
|
||||
<span style="color: #7f6000;">{{filter.SubString(listers.ShippingCode,6,10)}}</span>
|
||||
<span style="color: #2e75b6">{{filter.SubString(listers.ShippingCode,10,14)}}</span>
|
||||
<span style="color: #7f6000;">{{filter.SubString(listers.ShippingCode,14)}}</span>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
<view style="margin-left: 7%;">
|
||||
<span>
|
||||
MO:{{listers.MO}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="margin-left: 7%;">
|
||||
<span>
|
||||
创建:{{filter.TimeFormat(listers.CreateDateTime)}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="margin-left: 7%;">
|
||||
<span>
|
||||
开始:{{filter.TimeFormat(listers.StartDateTime)}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="margin-left: 7%;">
|
||||
<span>
|
||||
凭证:{{listers.Voucher}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="margin-left: 7%;">
|
||||
<span>
|
||||
运输方式:{{listers.ShippingType}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="font-weight: 900; margin-left: 7%;">
|
||||
<span>
|
||||
备注:{{listers.Remark}}
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weathers_imet_list">
|
||||
<view style="margin-left: 7%;">
|
||||
<span>
|
||||
状态:<span class=" {{(listers.Status === 1 ? '.text-red ' : (listers.Status===2?'.text-yellow ':'.text-green'))}}">
|
||||
|
||||
{{(listers.Status === 1 ? '未装箱' : (listers.Status === 2 ? "装箱中" : "已完成"))}}
|
||||
</span>
|
||||
</span>
|
||||
</view>
|
||||
<view style="margin-left: 7%;">
|
||||
<span class=".text-blue" style="font-weight: 900;">
|
||||
机型:{{listers.ProjectName}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="font-weight: 900; margin-left: 7%;">
|
||||
<span style="color: gray;">
|
||||
数量:{{listers.QTY}}/<span style="color: gray;">已装:{{listers.bandingnum}}</span></span>
|
||||
</view>
|
||||
<view style="margin-left: 7%;">
|
||||
<span>
|
||||
创建人:{{listers.Creator}}
|
||||
</span>
|
||||
</view>
|
||||
<view style="margin-left: 7%;">
|
||||
<span>
|
||||
客户:{{listers.Customer}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
<!-- 人工录入信息弹框 -->
|
||||
<van-popup show="{{ showrgluru }}" round position="bottom" custom-style="height: 20%">
|
||||
<form>
|
||||
<view class="cu-form-group radius shadow shadow-lg bg-white margin-top">
|
||||
<span class="title" style="border-right: 1px solid grey;">外箱码</span>
|
||||
<input type="text" placeholder="请输入外箱码" model:value="{{rglurOutBoxCode}}"></input>
|
||||
</view>
|
||||
</form>
|
||||
<button class="cu-btn bg-red" style="margin-left: 70px; width: 100px; margin-top: 10px;" bindtap="qux">取消</button>
|
||||
<button class="cu-btn bg-cyan " style="margin-left: 40px; width: 100px; margin-top: 10px;" bindtap="qr">确认</button>
|
||||
</van-popup>
|
||||
</view>
|
||||
121
Web/pages/OUtBoxBarCode/OUtBoxBarCode.wxss
Normal file
121
Web/pages/OUtBoxBarCode/OUtBoxBarCode.wxss
Normal file
@@ -0,0 +1,121 @@
|
||||
.weathers_imet {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.weathers_imet_lists {
|
||||
float: left;
|
||||
width: 60%;
|
||||
margin-top: 5px;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.weathers_imet_list {
|
||||
float: left;
|
||||
width: 40%;
|
||||
margin-top: 5px;
|
||||
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: 10%;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.nav_imet_lists_2 {
|
||||
float: left;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
width: 50%;
|
||||
margin-top: 5px;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nav_imet_lists_3 {
|
||||
float: left;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
width: 30%;
|
||||
margin-top: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nav_imet_lists_4 {
|
||||
float: left;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
width: 10%;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.btnyshi_1 {
|
||||
height: 42px;
|
||||
text-align: center;
|
||||
line-height: 42px;
|
||||
width: 26%;
|
||||
border-radius: 10%;
|
||||
margin-left: 10%;
|
||||
margin-top: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.btnyshi_2 {
|
||||
height: 42px;
|
||||
text-align: center;
|
||||
line-height: 42px;
|
||||
width: 26%;
|
||||
border-radius: 10%;
|
||||
font-size: 20px;
|
||||
margin-left: 10%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.nav_imet_listsnasas{
|
||||
width: 100%;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
249
Web/pages/autho/index.js
Normal file
249
Web/pages/autho/index.js
Normal 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('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
4
Web/pages/autho/index.json
Normal file
4
Web/pages/autho/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
||||
179
Web/pages/autho/index.wxml
Normal file
179
Web/pages/autho/index.wxml
Normal 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
111
Web/pages/autho/index.wxss
Normal 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;
|
||||
}
|
||||
416
Web/pages/index/index.js
Normal file
416
Web/pages/index/index.js
Normal file
@@ -0,0 +1,416 @@
|
||||
// index.js
|
||||
// 获取应用实例
|
||||
const app = getApp()
|
||||
import {
|
||||
Goodid,
|
||||
GetdingdanbyID,
|
||||
GetshpingxxbyS,
|
||||
GetdingdanbyPID
|
||||
} from '../../lib/RequestingCenter.js'
|
||||
const format = require("../../utils/util.js");
|
||||
let SCREEN_WIDTH = 750
|
||||
let RATE = wx.getSystemInfoSync().screenHeight / wx.getSystemInfoSync().screenWidth
|
||||
var Statusssss = 0;
|
||||
var ShippingCodesss = "";
|
||||
var ProjectListIDss = 0;
|
||||
var sqlids = 0;
|
||||
Page({
|
||||
data: {
|
||||
ScreenTotalW: SCREEN_WIDTH,
|
||||
ScreenTotalH: SCREEN_WIDTH * RATE,
|
||||
ScreenH: 220,
|
||||
isCopyingTextDomID: '', //正在拷贝选中字符串,处于蓝底白字
|
||||
//未装箱数量
|
||||
wzxnum: 0,
|
||||
//装箱中数量
|
||||
zxznum: 0,
|
||||
//完成数量
|
||||
wcddnum: 0,
|
||||
//全部数量
|
||||
quanbunum: 0,
|
||||
scanCode: '',
|
||||
scanQuCode: '+',
|
||||
listers: [],
|
||||
lists: [],
|
||||
Dingdanlist: [],
|
||||
//名字搜素
|
||||
name: '',
|
||||
// 查询类型
|
||||
apptype: -1,
|
||||
ProjectList: [],
|
||||
option1: [],
|
||||
//机型
|
||||
value1: 0,
|
||||
//选中机型
|
||||
ProjectListID: 0,
|
||||
//状态
|
||||
Stu: 0,
|
||||
// 订单信息
|
||||
ShippCode: "",
|
||||
// 机型
|
||||
pid: 0
|
||||
},
|
||||
//下拉框选择
|
||||
onConfirm(o) {
|
||||
var that = this;
|
||||
let list = []
|
||||
var names = that.data.name;
|
||||
let status = Number(that.data.apptype) + 1;
|
||||
let pid = o.detail
|
||||
// 机型号码
|
||||
ProjectListIDss = o.detail
|
||||
that.setData({
|
||||
ProjectListID: o.detail
|
||||
})
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
GetdingdanbyPID({
|
||||
ShippingCode: names,
|
||||
Status: status,
|
||||
ProjectListID: pid,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
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;
|
||||
})
|
||||
if (res.Status == 200) {
|
||||
that.setData({
|
||||
listers: res.Data.userinfo,
|
||||
ProjectList: res.Data.ProjectList
|
||||
});
|
||||
wx.hideLoading();
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
},
|
||||
onLoad(e) {
|
||||
var that = this
|
||||
sqlids = e.Sqlid;
|
||||
console.log(sqlids)
|
||||
wx.hideLoading();
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
Goodid({
|
||||
Status: Statusssss,
|
||||
ShippingCode: ShippingCodesss,
|
||||
ProjectListID: ProjectListIDss,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.Status == 200) {
|
||||
let list = []
|
||||
list.push("全部订单")
|
||||
let plist = []
|
||||
let pname = {
|
||||
value: 0,
|
||||
text: '全部机型'
|
||||
};
|
||||
plist.push(pname);
|
||||
res.Data.TBL_Projectytpe.forEach((x) => {
|
||||
plist.push(x)
|
||||
})
|
||||
res.Data.userinfo.forEach((x) => {
|
||||
x.projectNameInfo = res.Data.ProjectList.filter(y => y.ID == x.ProjectID)[0].ProjectName;
|
||||
})
|
||||
that.setData({
|
||||
listers: res.Data.userinfo,
|
||||
lists: list,
|
||||
Dingdanlist: res.Data.userinfo,
|
||||
ProjectList: res.Data.ProjectList,
|
||||
//未装箱数量
|
||||
wzxnum: res.wzx,
|
||||
//装箱中数量
|
||||
zxznum: res.zxz,
|
||||
//完成数量
|
||||
wcddnum: res.shuliabn,
|
||||
//全部数量
|
||||
quanbunum: res.quabu,
|
||||
option1: plist,
|
||||
value1: 0,
|
||||
apptype: -1,
|
||||
});
|
||||
// console.log(that.data.option1)
|
||||
} 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')
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
//出货单绑定
|
||||
// bindPickerChange: function (e) {
|
||||
// var that = this;
|
||||
// this.setData({
|
||||
// index: e.detail.value,
|
||||
// })
|
||||
// var curIdex = e.detail.value - 1;
|
||||
// console.log(curIdex)
|
||||
// var xx = "";
|
||||
// if (curIdex == -1) {
|
||||
// xx = "0";
|
||||
// } else {
|
||||
// xx = that.data.Dingdanlist[curIdex].ShippingCode;
|
||||
// // console.log(xx)
|
||||
// }
|
||||
// GetdingdanbyID({
|
||||
// ShippingCode: xx
|
||||
// }).then(res => {
|
||||
// if (res.Status == 200) {
|
||||
// that.setData({
|
||||
// listers: res.Data.userinfo,
|
||||
// });
|
||||
// } else {
|
||||
// app.toast(2, res.Message || "网络繁忙")
|
||||
// }
|
||||
// }, err => {
|
||||
// app.toast(2, "网络繁忙")
|
||||
// }).catch(
|
||||
// err => {
|
||||
// console.log(err)
|
||||
// app.toast("异常", 'error')
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
onShow: function () {
|
||||
var that = this
|
||||
wx.hideLoading();
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
if (sqlids == 1) {
|
||||
that.setData({
|
||||
DBname: "uts_zongqing"
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
DBname: "uts_johao"
|
||||
})
|
||||
}
|
||||
GetshpingxxbyS({
|
||||
Status: Statusssss,
|
||||
ShippingCode: ShippingCodesss,
|
||||
ProjectListID: ProjectListIDss,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
res.Data.userinfo.forEach((x) => {
|
||||
x.projectNameInfo = res.Data.ProjectList.filter(y => y.ID == x.ProjectID)[0].ProjectName;
|
||||
})
|
||||
if (res.Status == 200) {
|
||||
// console.log(res)
|
||||
that.setData({
|
||||
listers: res.Data.userinfo,
|
||||
ProjectList: res.Data.ProjectList,
|
||||
//未装箱数量
|
||||
wzxnum: res.wzx,
|
||||
//装箱中数量
|
||||
zxznum: res.zxz,
|
||||
//完成数量
|
||||
wcddnum: res.shuliabn,
|
||||
//全部数量
|
||||
quanbunum: res.quabu,
|
||||
// apptype: -1,
|
||||
});
|
||||
wx.hideLoading();
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
},
|
||||
//页面跳转
|
||||
DianJiDingDan: function (e) {
|
||||
var xx = this.data.listers.find(ee => {
|
||||
return ee.ShippingCode == e.currentTarget.id
|
||||
})
|
||||
if (xx.Status == 3) {
|
||||
//物品信息页面
|
||||
wx.navigateTo({
|
||||
url: '/pages/autho/index?ShippingCode=' + e.currentTarget.id + '&sqlid=' + sqlids
|
||||
})
|
||||
} else {
|
||||
//物品信息页面
|
||||
wx.navigateTo({
|
||||
url: '/pages/OUtBoxBarCode/OUtBoxBarCode?ShippingCode=' + e.currentTarget.id + '&sqlid=' + sqlids
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
//用户输入订单号码查询
|
||||
sreach: function () {
|
||||
var that = this;
|
||||
let list = []
|
||||
var names = that.data.name;
|
||||
wx.hideLoading();
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
// 订单号码
|
||||
ShippingCodesss = that.data.name
|
||||
let status = Number(that.data.apptype) + 1;
|
||||
let pid = that.data.ProjectListID
|
||||
GetdingdanbyID({
|
||||
ShippingCode: names,
|
||||
Status: status,
|
||||
ProjectListID: pid,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
// 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;
|
||||
})
|
||||
if (res.Status == 200) {
|
||||
that.setData({
|
||||
listers: res.Data.userinfo,
|
||||
ProjectList: res.Data.ProjectList
|
||||
});
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
wx.hideLoading();
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
},
|
||||
//状态查询
|
||||
selapptype: function (e) {
|
||||
var that = this;
|
||||
let sel = Number(e.target.dataset.val);
|
||||
let list = []
|
||||
this.setData({
|
||||
apptype: e.target.dataset.val,
|
||||
})
|
||||
wx.hideLoading();
|
||||
wx.showLoading({
|
||||
title: '请稍后....',
|
||||
});
|
||||
var Stu = sel + 1;
|
||||
// 状态号码
|
||||
Statusssss = Stu;
|
||||
var ShippCode = that.data.name
|
||||
let pid = that.data.ProjectListID
|
||||
GetshpingxxbyS({
|
||||
Status: Stu,
|
||||
ShippingCode: ShippCode,
|
||||
ProjectListID: pid,
|
||||
sqlid: sqlids
|
||||
}).then(res => {
|
||||
res.Data.userinfo.forEach((x) => {
|
||||
list.push(x.ShippingCode);
|
||||
x.projectNameInfo = res.Data.ProjectList.filter(y => y.ID == x.ProjectID)[0].ProjectName;
|
||||
})
|
||||
if (res.Status == 200) {
|
||||
that.setData({
|
||||
listers: res.Data.userinfo,
|
||||
ProjectList: res.Data.ProjectList
|
||||
});
|
||||
} else {
|
||||
app.toast(2, res.Message || "网络繁忙")
|
||||
}
|
||||
wx.hideLoading();
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
console.log(Statusssss)
|
||||
},
|
||||
getProjectName: function (proID) {
|
||||
console.log("goes here.")
|
||||
var retList = this.data.ProjectList.filter(x => x.ID == proID);
|
||||
if (retList.length > 0)
|
||||
return retList[0].ProjectName;
|
||||
return "";
|
||||
},
|
||||
onUnload: function () {
|
||||
var that = this;
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
//长按复制
|
||||
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 () {
|
||||
var that = this;
|
||||
that.setData({
|
||||
isCopyingText: false
|
||||
});
|
||||
wx.showToast({
|
||||
title: '复制失败',
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
showSuccessCopyProc: function () {
|
||||
var that = this;
|
||||
|
||||
}
|
||||
})
|
||||
5
Web/pages/index/index.json
Normal file
5
Web/pages/index/index.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
86
Web/pages/index/index.wxml
Normal file
86
Web/pages/index/index.wxml
Normal file
@@ -0,0 +1,86 @@
|
||||
<!--index.wxml-->
|
||||
<wxs module="filter" src="../../utils/filters.wxs"></wxs>
|
||||
<cu-custom bgColor="bg-gradual-blue">
|
||||
<view slot="content">AUTS数据中心-出货装车</view>
|
||||
<view slot="contents"> {{DBname}} </view>
|
||||
</cu-custom>
|
||||
<view class="padding-sm bg-white radius shadow shadow-lg" style="width: {{ScreenTotalW}}rpx;height:{{ScreenTotalH}}rxp;">
|
||||
<!-- 条件查询开始 -->
|
||||
<view style="height: {{ScreenH}}rpx; width: {{ScreenTotalW}}rpx;">
|
||||
<view style="flex-basis:100% " class="flex padding-top-xs">
|
||||
<view>
|
||||
<van-button type="default" bindtap="selapptype" data-val="-1" color="{{apptype==-1?'#20a860':''}}"> <span>全部({{quanbunum}})</span></van-button>
|
||||
</view>
|
||||
<view bindtap="selapptype" style="margin-left: 1px;">
|
||||
<van-button type="default" bindtap="selapptype" data-val="0" color="{{apptype==0?'#e65f50':''}}"> <span>未装车({{wzxnum}})</span></van-button>
|
||||
</view>
|
||||
<view style="margin-left: 1px;">
|
||||
<van-button type="default" style="margin-left: 1px;" bindtap="selapptype" data-val="1" color="{{apptype==1?'#f8ce53':''}}"> <span>装车中({{zxznum}})</span></van-button>
|
||||
</view>
|
||||
<view style="margin-left: 3px;">
|
||||
<van-button type="default" bindtap="selapptype" data-val="2" color="{{apptype==2?'#20a860':''}}"> <span>已结单({{wcddnum}})</span></van-button>
|
||||
</view>
|
||||
</view>
|
||||
<view style="flex-basis:100%; font-size: 10px;" class="flex padding-top-xs align-center">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="onConfirm" />
|
||||
</van-dropdown-menu>
|
||||
<input type="number" style="border-bottom: 2rpx solid #ccc !important; margin-left: 20px; margin-top: 20px;" class="text-df" placeholder="搜索订单" name="input" model:value="{{name}}"></input>
|
||||
<button bindtap="sreach" class="cuIcon-search" style="height: 30px; width: 80px;background-color: #20a860;"></button>
|
||||
</view>
|
||||
<!-- 条件查询结束 -->
|
||||
</view>
|
||||
<!-- 内容区域开始 -->
|
||||
<!-- 内容区开始 -->
|
||||
<scroll-view class="scroll-view_H .solids-right .solids-left" scroll-y="true" style="height:{{ScreenTotalH-ScreenH-300}}rpx;">
|
||||
<block wx:for="{{listers}}" wx:key="this">
|
||||
<view id="{{item.ShippingCode}}" bindtap="DianJiDingDan">
|
||||
<view class="weathers_imet_lists .light .solids-top .solids-left .shadow-blur ">
|
||||
<view style="font-weight: 550;" selectable="true" id="shiplistitem_{{item.ShippingCode}}" bind:longpress="copyText">
|
||||
<block wx:if="{{isCopyingTextDomID==('shiplistitem_' + 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>
|
||||
<span class="cuIcon-countdown .text-gray">
|
||||
{{filter.TimeFormat(item.CreateDateTime)}}
|
||||
</span>
|
||||
</view>
|
||||
<view>
|
||||
<span class="cuIcon-rankfill">
|
||||
{{item.QTY}}/已装:{{item.BindedColorBoxQTY}}</span>
|
||||
</view>
|
||||
<view>
|
||||
<span class=".cuIcon-post text-cut" style="display: inline-block; width: 200px;">
|
||||
{{item.Remark}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weathers_imet_list .light .solids-top .solids-right .shadow-blur">
|
||||
<view class="text-cut .text-blue" style="font-weight: 900;">
|
||||
<span class="text-df">{{item.projectNameInfo}}</span>
|
||||
</view>
|
||||
<view>
|
||||
<span class=".cuIcon-new">
|
||||
<span class=" {{(item.Status === 1 ? '.text-red ' : (item.Status===2?'.text-yellow ':'.text-green'))}}">
|
||||
{{(item.Status === 1 ? '未装车' : (item.Status === 2 ? "装车中" : "已结单"))}}
|
||||
</span>
|
||||
</span>
|
||||
<view>
|
||||
<span class=" .cuIcon-location text-cut" style="display: inline-block; width: 100px;">
|
||||
{{item.Destination}}
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
<!-- 内容区结束 -->
|
||||
</view>
|
||||
83
Web/pages/index/index.wxss
Normal file
83
Web/pages/index/index.wxss
Normal file
@@ -0,0 +1,83 @@
|
||||
/**index.wxss**/
|
||||
.foot {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 65px;
|
||||
}
|
||||
|
||||
.weathers_imet {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.custom-class {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.van-ellipsis {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.bgss-green {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.weathers_imet_lists {
|
||||
float: left;
|
||||
width: 65%;
|
||||
height: 10%;
|
||||
padding-left: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.weathers_imet_list {
|
||||
float: left;
|
||||
width: 35%;
|
||||
height: 10%;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.heade {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.green-text {
|
||||
color: white;
|
||||
display: inline-block;
|
||||
background-color: green;
|
||||
width: 150rpx;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
/* border-radius: 10%; */
|
||||
}
|
||||
|
||||
.red-text {
|
||||
color: white;
|
||||
display: inline-block;
|
||||
width: 150rpx;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.yellow-text {
|
||||
color: white;
|
||||
display: inline-block;
|
||||
background-color: yellow;
|
||||
width: 150rpx;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.shiping_time {
|
||||
font-weight: 900;
|
||||
font-size: 10px;
|
||||
}
|
||||
261
Web/pages/login/login.js
Normal file
261
Web/pages/login/login.js
Normal file
@@ -0,0 +1,261 @@
|
||||
// pages/login.js
|
||||
// app.js
|
||||
const app = getApp()
|
||||
import {
|
||||
settoken,
|
||||
Login,
|
||||
getopenid,
|
||||
AddLogin,
|
||||
Shuruusernamebyquanxian
|
||||
} from '../../lib/RequestingCenter.js'
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
login: false,
|
||||
islong: false,
|
||||
Uid: null,
|
||||
Pwd: null,
|
||||
openid: "",
|
||||
show: false,
|
||||
option1: [
|
||||
{
|
||||
value: 0,
|
||||
text: "请选择数据库"
|
||||
},
|
||||
],
|
||||
// 数据库编号
|
||||
Sqlid: 0,
|
||||
//机型
|
||||
value1: 0,
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
//下拉框选择
|
||||
onConfirm(o) {
|
||||
var that = this;
|
||||
let pid = o.detail
|
||||
console.log(pid)
|
||||
console.log(o)
|
||||
|
||||
that.setData({
|
||||
Sqlid: pid
|
||||
});
|
||||
},
|
||||
onLoad: function (options) {
|
||||
|
||||
var that = this;
|
||||
wx.login({
|
||||
success: function (res) {
|
||||
if (res.code) {
|
||||
// 使用登录凭证 code、encryptedData 和 iv 调用后端接口解密获取用户的微信号码
|
||||
// 请根据自己的业务逻辑和后端接口进行处理s
|
||||
// console.log('用户的微信号码:', res.code);
|
||||
getopenid({
|
||||
js_code: res.code,
|
||||
}).then(res => {
|
||||
var str = JSON.parse(res)
|
||||
that.setData({
|
||||
openid: str.openid
|
||||
})
|
||||
// console.log(that.data.openid)
|
||||
}
|
||||
|
||||
);
|
||||
} else {
|
||||
console.log('登录失败!' + res.errMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//验证
|
||||
submitForm(e) {
|
||||
let that = this;
|
||||
// console.log( that.data.Sqlid)
|
||||
let type = e.currentTarget.dataset['type']
|
||||
if (type == "1") {
|
||||
that.setData({
|
||||
islong: true
|
||||
})
|
||||
}
|
||||
if (this.data.Uid == null || this.data.Uid == "" || this.data.Pwd == "" || this.data.Pwd == null || that.data.Sqlid == 0) {
|
||||
app.toast(2, "数据不完整")
|
||||
} else {
|
||||
Login({
|
||||
Password: that.data.Pwd,
|
||||
islong: that.data.islong,
|
||||
UserName: that.data.Uid,
|
||||
openid: that.data.openid
|
||||
}).then(res => {
|
||||
// console.log(res)
|
||||
if (res.Status == 200) {
|
||||
if (res.Data.userinfo == null) {
|
||||
wx.showModal({
|
||||
title: '提示信息',
|
||||
content: '未绑定帐号,如需绑定帐号,请点击(确定)继续',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.setData({
|
||||
show: true
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
show: false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
settoken(res.Data.token)
|
||||
// console.log(res)
|
||||
if (that.data.islong) {
|
||||
wx.setStorageSync('xiaoxi_token', res.Data.token)
|
||||
wx.setStorageSync('sqlid', that.data.Sqlid)
|
||||
|
||||
}
|
||||
app.toast(1, "登录成功", wx.reLaunch({
|
||||
url: "/pages/index/index?Sqlid=" + that.data.Sqlid,
|
||||
}))
|
||||
}
|
||||
} else if (res.Status == 300) {
|
||||
app.toast(2, res.Message)
|
||||
} else {
|
||||
app.toast(2, "密码或用户名错误")
|
||||
}
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
//用户输入手机号码后取消事件
|
||||
qux: function () {
|
||||
var that = this
|
||||
that.setData({
|
||||
show: false
|
||||
})
|
||||
},
|
||||
//用户输入手机号码后确认事件
|
||||
qr: function () {
|
||||
var that = this;
|
||||
AddLogin({
|
||||
openid: that.data.openid,
|
||||
Uid: that.data.Uid
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.Status == 200) {
|
||||
that.setData({
|
||||
show: false
|
||||
})
|
||||
} else if (res.Status == 300) {
|
||||
app.toast(2, "这个账号被绑定了")
|
||||
that.setData({
|
||||
show: false
|
||||
})
|
||||
} else {
|
||||
app.toast(2, "你的微信已经绑定了")
|
||||
that.setData({
|
||||
show: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {},
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {},
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {},
|
||||
//搜索权限
|
||||
Shuruusernamebyquanxian: function (o) {
|
||||
var that = this;
|
||||
if(that.data.Uid==null || that.data.Uid==""){
|
||||
app.toast(2,"请输入用户名")
|
||||
var arrlist=[{
|
||||
value: 0,
|
||||
text: "请选择数据库"
|
||||
},
|
||||
]
|
||||
that.setData({
|
||||
option1: arrlist,
|
||||
value1: 0,
|
||||
Sqlid: 0,
|
||||
})}
|
||||
else{
|
||||
Shuruusernamebyquanxian({
|
||||
Uid: that.data.Uid
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if(res=="on"){
|
||||
app.toast(2, "用户名输入错误!")
|
||||
}
|
||||
var arrlist=[{
|
||||
value: 0,
|
||||
text: "请选择数据库"
|
||||
},
|
||||
]
|
||||
res.forEach(element => {
|
||||
arrlist.push(element)
|
||||
});
|
||||
that.setData({
|
||||
option1: arrlist,
|
||||
value1: 0,
|
||||
Sqlid: 0,
|
||||
})
|
||||
}, err => {
|
||||
app.toast(2, "网络繁忙")
|
||||
}).catch(
|
||||
err => {
|
||||
console.log(err)
|
||||
app.toast("异常", 'error')
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
})
|
||||
4
Web/pages/login/login.json
Normal file
4
Web/pages/login/login.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
||||
51
Web/pages/login/login.wxml
Normal file
51
Web/pages/login/login.wxml
Normal file
@@ -0,0 +1,51 @@
|
||||
<!--pages/login/login.wxml-->
|
||||
<cu-custom bgColor="bg-cyan">
|
||||
<view slot="content">AUTS数据中心-出货装车</view>
|
||||
</cu-custom>
|
||||
<!-- -->
|
||||
<view class="bg-img">
|
||||
<!-- 密码账号登录 -->
|
||||
<view wx:if="{{!login}}" class="padding" style=" padding-top: 30%; ">
|
||||
<view class="flex justify-center text-center">
|
||||
<view class="flex-treble padding-sm margin-xs">
|
||||
<form>
|
||||
<view class="cu-form-group radius shadow shadow-lg bg-white margin-top">
|
||||
<span class="title .cuIcon-people" style="border-right: 1px solid grey;"></span>
|
||||
<input placeholder="请输入账号" model:value="{{Uid}}" bindblur="Shuruusernamebyquanxian"></input>
|
||||
</view>
|
||||
<view class="cu-form-group radius shadow shadow-lg bg-white margin-top">
|
||||
<span class="title .cuIcon-lock" style="border-right: 1px solid grey;"></span>
|
||||
<input type="password" placeholder="请输入密码" model:value="{{Pwd}}"></input>
|
||||
</view>
|
||||
<view class="cu-form-group radius shadow shadow-lg bg-white margin-top" >
|
||||
<span class="title .cuIcon-command" style="border-right: 1px solid grey;"></span>
|
||||
<van-dropdown-menu style="margin-right: 60px;">
|
||||
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="onConfirm" />
|
||||
</van-dropdown-menu>
|
||||
</view>
|
||||
</form>
|
||||
<view>
|
||||
<!-- <van-button type="primary">主要按钮</van-button> -->
|
||||
<button class="cu-btn bg-cyan margin lg" data-type="0" bindtap="submitForm">临时登录</button>
|
||||
<button class="cu-btn bg-cyan margin-top lg" data-type="1" bindtap="submitForm">长期登录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<mp-toptips msg="{{error}}" type="error" show="{{error}}"></mp-toptips>
|
||||
<view style="margin-top: 30%; width: 100%; text-align: center; padding-bottom: 20px;">@版权:Inhaos
|
||||
</view>
|
||||
</view>
|
||||
<van-popup show="{{ show }}" position="bottom" custom-style="height: 40%;" bind:close="onClose">
|
||||
|
||||
|
||||
<form>
|
||||
<view class=" shadow shadow-lg margin-top">
|
||||
<view class="title" style="width: 100%; font-weight: 900;text-align: center;">我们会获取您的微信OpenID,以用于登录凭证,继续操作请点击(确认),并且联系我们进行人工审核。联系人: </view>
|
||||
<view class="title" style="width: 100%; font-size: 20px; font-weight: 900;text-align: center; color: steelblue; margin-top: 25px;">文先生:13509214696</view>
|
||||
|
||||
</view>
|
||||
<button class="cu-btn bg-red" style="margin-left: 70px; width: 100px; margin-top: 100px;" bindtap="qux">取消</button>
|
||||
<button class="cu-btn bg-cyan " style="margin-left: 40px; width: 100px; margin-top: 100px;" bindtap="qr">确认</button>
|
||||
</form>
|
||||
</van-popup>
|
||||
1
Web/pages/login/login.wxss
Normal file
1
Web/pages/login/login.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/login/login.wxss */
|
||||
66
Web/pages/logs/logs.js
Normal file
66
Web/pages/logs/logs.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/logs/logs.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
2
Web/pages/logs/logs.wxml
Normal file
2
Web/pages/logs/logs.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/logs/logs.wxml-->
|
||||
<text>pages/logs/logs.wxml</text>
|
||||
143
Web/pages/mycenter/index.js
Normal file
143
Web/pages/mycenter/index.js
Normal file
@@ -0,0 +1,143 @@
|
||||
// pages/mycenter/index.js
|
||||
const app = getApp()
|
||||
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
show: false,
|
||||
avatarUrl: defaultAvatarUrl,
|
||||
hasUserInfo: false,
|
||||
canIUseGetUserProfile: false,
|
||||
theme: wx.getSystemInfoSync().theme,
|
||||
actions: [
|
||||
{
|
||||
name: '微信头像',
|
||||
subname: wx.canIUse('open-data.type.userAvatarUrl') ,
|
||||
openType: 'share',
|
||||
},
|
||||
{
|
||||
name: '从相册选择',
|
||||
},
|
||||
{
|
||||
name: '拍照',
|
||||
},
|
||||
]
|
||||
},
|
||||
onChooseAvatar(e) {
|
||||
const { avatarUrl } = e.detail
|
||||
|
||||
this.setData({
|
||||
avatarUrl,
|
||||
})
|
||||
},
|
||||
onChooseAvatars(){
|
||||
var that =this
|
||||
console.log(111)
|
||||
that.setData({
|
||||
show:true
|
||||
})
|
||||
},
|
||||
|
||||
onClose() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
|
||||
// onSelect(event) {
|
||||
// var that =this
|
||||
// console.log(111)
|
||||
// console.log(event.detail);
|
||||
// },
|
||||
//退出登录
|
||||
LoginOut(){
|
||||
wx.removeStorage({
|
||||
key: 'xiaoxi_token',
|
||||
success (res) {
|
||||
wx.removeStorage({
|
||||
key: 'sqlid',
|
||||
success (res) {
|
||||
wx.reLaunch({
|
||||
url: "../login/login",
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var that =this;
|
||||
let sqlids = wx.getStorageSync('sqlid') || 0
|
||||
if (sqlids == 1) {
|
||||
that.setData({
|
||||
DBname: "uts_zongqing"
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
DBname: "uts_johao"
|
||||
})
|
||||
}
|
||||
wx.onThemeChange((result) => {
|
||||
this.setData({
|
||||
theme: result.theme
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.setData({
|
||||
userInfo: app.globalData.userinfo,
|
||||
autho: app.globalData.autho
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
9
Web/pages/mycenter/index.json
Normal file
9
Web/pages/mycenter/index.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"mp-form-page": "weui-miniprogram/form-page/form-page",
|
||||
"mp-form": "weui-miniprogram/form/form",
|
||||
"mp-cells": "weui-miniprogram/cells/cells",
|
||||
"mp-cell": "weui-miniprogram/cell/cell"
|
||||
},
|
||||
"pageOrientation": "auto"
|
||||
}
|
||||
26
Web/pages/mycenter/index.wxml
Normal file
26
Web/pages/mycenter/index.wxml
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--pages/mycenter/index.wxml-->
|
||||
<!--pages/mycenter/index.wxml-->
|
||||
<cu-custom bgColor="bg-gradual-blue">
|
||||
<view slot="content">AUTS数据中心-出货装车</view>
|
||||
<view slot="contents"> {{DBname}} </view>
|
||||
</cu-custom>
|
||||
<view class="padding-sm bg-white radius shadow shadow-lg">
|
||||
<!-- 用户头像系列 -->
|
||||
<view data-weui-theme="{{theme}}">
|
||||
|
||||
|
||||
<button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar" bindtap="onChooseAvatars">
|
||||
<image class="avatar" src="{{avatarUrl}}"></image>
|
||||
</button>
|
||||
</view>
|
||||
<!-- 功能区域 -->
|
||||
<view class="padding-xl">
|
||||
<form>
|
||||
<view class="cu-form-group ">
|
||||
<view class="flex justify-between" bindtap="LoginOut" style="width:100%">
|
||||
<view class="text-df">退出登录</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
19
Web/pages/mycenter/index.wxss
Normal file
19
Web/pages/mycenter/index.wxss
Normal file
@@ -0,0 +1,19 @@
|
||||
/* pages/mycenter/index.wxss */
|
||||
/**index.wxss**/
|
||||
.avatar-wrapper {
|
||||
padding: 0;
|
||||
width: 56px !important;
|
||||
border-radius: 8px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
display: block;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
}
|
||||
Reference in New Issue
Block a user