Commit c1f4a48a authored by 王文琼's avatar 王文琼

优化实报,针车派工单

parent ace52c26
......@@ -358,7 +358,9 @@ clear: both;
font-weight: normal;
background-color: #E2E2E9;
}
.mui-table-view1{
background: #fff;
}
/*********/
#pullrefresh {
width: 100%;
......
......@@ -52,9 +52,9 @@ var getSubInfoById = function(infoList, id) {
var wgtVer = null;
var t = (new Date()).valueOf();
var checkUrl = "http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes/version.txt?data=" + t;
var checkUrl = "http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes_test/version.txt?data=" + t;
// 下载wgt文件
var wgtUrl = "http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes/ftt_mes_hot.wgt";
var wgtUrl = "http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes_test/ftt_mes_hot.wgt";
console.log("检测更新地址:" + checkUrl);
function downWgtHot() {
......
......@@ -444,10 +444,10 @@ var app = new Vue({
reportDelete: function() { //
var that = this;
var para = {
ReportID: this.IndexID,
IndexID: this.IndexID,
};
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报
Api.post('/api/vMES/ProductionReport/Delete', para, function(e) {
Api.post('/api/vMES/ProductionReportV2/Delete', para, function(e) {
if (e.success) {
//console.log(JSON.stringify(e));
that.createZhezhao(-1)
......@@ -464,7 +464,7 @@ var app = new Vue({
var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) {
//console.log("比对的id:" + doneIndexArr[i].IndexID);
if (doneIndexArr[i].IndexID == para.ReportID) {
if (doneIndexArr[i].IndexID == para.IndexID) {
delIndexNoIndx = i;
break;
}
......
mui.plusReady(function() {
initPage();
});
function initPage() {
plus.screen.lockOrientation("landscape-primary") //横屏
app.init();
}
var app = new Vue({
el: '#app',
data: {
tittle: '',
// TotalIndexNo: 0, //总行数
// TotalCount: 0, //总数量
Summary: '', //底部信息
IndexID: 0,
itemsList: [],
itemsdetail: [],
itemsData2: [],
cur: 0,
searchText: '', //搜索文本
paramSearch: {
pageIndex: 2,
pageSize: 20
},
paramList: {
pageIndex: 2,
pageSize: 20
},
PageSize: 20,
PageIndex: 1,
showStyleName: true, //品名
showIndexNo: true, //指令号
showCustomPO: true, //订单号
showStyleCode: true, //货号
showColor: true, //颜色
showTotalCount: true, //数量
showPrice: true, //单价
showTotalMoney: true, //金额
showMatchDate: true, //裁断配套
showConfirmDate: true, //扣件/鞋带
showZCPlanBeginDate: true, //上线计划
showZCPlanDeliveryDate: true, //计划交期
showPlanDate: true, //实际上线
showFinishDate: true, //实际完成
searchData: [{
id: '0',
name: '指令号'
},
{
id: '1',
name: '订单号'
},
{
id: '2',
name: '货号'
},
{
id: '3',
name: '实际上线'
},
{
id: '4',
name: '实际完成'
}
],
current: '', //搜索选中
dateTime: "", //日期
dateTime1: "", //日期1
show: false, //显示底部
sty1: true,
OrderDetailID: '', //w未发包使用的ID
StyleCode: '', //huohao
IndexNo: '', //指令号
selectList: [],
selectList2: [],
//selectif_PL: 0,//是否禁用
PersonList: [],
all: false, //全选
WorkTeamID: 0, //班组
isAward: 0, //是否发包
Workers: [],
isData: false, //是否显示搜索
dateTime2: 0,
},
computed: {
display_: function() {
if (this.displayModel == 1) {
return "display: none "
}
},
selectPL: function() {
if (this.selectList.length > 1) {
return null
} else {
return "disabled"
}
},
},
created: function() {
//如果没有这句代码,select中初始化会是空白的,默认选中就无法实现
this.current = this.searchData[0].id;
this.dateTime = moment().format("YYYY-MM");
this.dateTime1 = moment().format("YYYY-MM-DD");
this.dateTime2 = moment().format("YYYY-MM-DD");
},
mounted: function() {
if (localStorage.getItem('data')) {
console.log(localStorage.getItem('data'));
this.showStyleName = JSON.parse(localStorage.getItem('data')).showIndexNo;
this.showIndexNo = JSON.parse(localStorage.getItem('data')).showIndexNo;
this.showCustomPO = JSON.parse(localStorage.getItem('data')).showCustomPO;
this.showStyleCode = JSON.parse(localStorage.getItem('data')).showStyleCode;
this.showColor = JSON.parse(localStorage.getItem('data')).showColor;
this.showTotalCount = JSON.parse(localStorage.getItem('data')).showTotalCount;
this.showPrice = JSON.parse(localStorage.getItem('data')).showPrice;
this.showTotalMoney = JSON.parse(localStorage.getItem('data')).showTotalMoney;
this.showMatchDate = JSON.parse(localStorage.getItem('data')).showMatchDate;
this.showConfirmDate = JSON.parse(localStorage.getItem('data')).showConfirmDate;
this.showZCPlanBeginDate = JSON.parse(localStorage.getItem('data')).showZCPlanBeginDate;
this.showZCPlanDeliveryDate = JSON.parse(localStorage.getItem('data')).showZCPlanDeliveryDate;
this.showPlanDate = JSON.parse(localStorage.getItem('data')).showPlanDate;
this.showFinishDate = JSON.parse(localStorage.getItem('data')).showFinishDate;
}
},
methods: {
init: function() {
mui.init({
pullRefresh: {
container: '#pullrefresh',
up: {
height: 100,
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了',
callback: function() {
var Url = '/api/vMES/ZCProductionPlan/List';
var dataList = app.itemsList;
if (app.searchText != "") {
searchPull(Url, dataList, app.paramSearch);
} else {
pullupRefresh(Url, dataList, app.paramList);
}
}
},
}
});
function pullupRefresh(url, arr, params) {
//console.log("加载前1" + arr);
setTimeout(function() {
var para = {
PageSize: params.pageSize,
PageIndex: params.pageIndex,
Date: app.dateTime,
SearchType: app.current,
searchText: ''
};
//console.log("canshu:" + JSON.stringify(para));
//console.log("之前的数据:" + arr);
Api.post(url, para, function(e) { //2.没数据 提示 但是可以一直发请求只不过传回来是空
if (e.success) {
console.log("111:" + JSON.stringify(e.data.items.length));
var data = e.data.items;
if (data.length > 0) {
params.pageIndex++;
}
for (var i = 0; i < data.length; i++) {
for (var j in data[i]) {
if (j.endsWith('_1') || j.endsWith('_2')) {
//console.log(j + data[i][j]);
data[i][j] = data[i][j] == ('' || null) ? '' : data[i][j].replace(/:/g, ",");
//console.log(j +":"+ data[i][j]);
}
}
arr.push(data[i]);
//console.log("changdu2222222:" + arr.length);
}
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
});
mui('#pullrefresh').pullRefresh().endPullupToRefresh(); //参数为true代表没有更多数据了。
mui('#pullrefresh').pullRefresh().refresh(true);
//mui('#pullrefresh').pullRefresh().disablePullupToRefresh();
mui(".mui-scroll-wrapper").scroll({
bounce: true, //滚动条是否有弹力默认是true
indicators: true, //是否显示滚动条,默认是true
});
}, 1000);
}
function searchPull(url, arr, params) {
setTimeout(function() {
var para = {
searchText: app.searchText,
PageSize: params.pageSize,
PageIndex: params.pageIndex,
Date: app.dateTime,
SearchType: app.current,
};
Api.post(url, para, function(e) {
if (e.success) {
console.log("111:" + JSON.stringify(e.data.items.length));
var data = e.data.items;
if (data.length > 0) {
params.pageIndex++;
}
for (var i = 0; i < data.length; i++) {
for (var j in data[i]) {
if (j.endsWith('_1') || j.endsWith('_2')) {
//console.log(j + data[i][j]);
data[i][j] = data[i][j] == ('' || null) ? '' : data[i][j].replace(/:/g, ",");
//console.log(j +":"+ data[i][j]);
}
}
arr.push(data[i]);
}
console.log("canshuqq:" + JSON.stringify(para));
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
});
mui('#pullrefresh').pullRefresh().endPullupToRefresh();
mui('#pullrefresh').pullRefresh().refresh(true);
}, 1000);
}
mui('.mui-scroll-wrapper').scroll({
bounce: false,
indicators: true, //是否显示滚动条
});
this.getData();
this.dateTime = moment().format("YYYY-MM");
this.dateTime1 = moment().format("YYYY-MM-DD");
this.dateTime2 = moment().format("YYYY-MM-DD");
console.log("shijian" + this.dateTime2);
mui("mui-search").on('tap', '.mui-icon-clear', function() {
document.activeElement.blur(); //收起虚拟键盘
app.searchText = '';
app.getData(0);
});
document.getElementsByClassName('mui-inner-wrap')[0].addEventListener('drag', function(event) {
event.stopPropagation();
});
},
getData: function() {
var that = this;
var para = {
Date: that.dateTime,
PageSize: that.PageSize,
PageIndex: that.PageIndex,
SearchType: 0,
SearchText: '',
}
console.log(JSON.stringify(para));
Api.post('/api/vMES/ZCProductionPlan/List', para, function(e) {
console.log("TTTTTTTTTTTTTTTTTT List::" + JSON.stringify(e.data.items.length))
if (e.success) {
//that.TotalIndexNo = e.data.TotalIndexNo;
//that.TotalCount = e.data.TotalCount;
that.Summary = e.data.Summary;
that.itemsList = e.data.items;
that.tittle = e.data.Title;
//console.log(JSON.stringify(e.data.Title));
that.changecolor();
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
})
},
changecolor: function() {
var that = this;
for (var i = 0; i < that.itemsList.length; i++) {
for (var j in that.itemsList[i]) {
if (j.endsWith('_1') || j.endsWith('_2')) {
//console.log(j + that.itemsList[i][j]);
that.itemsList[i][j] = that.itemsList[i][j] == ('' || null) ? '' : that.itemsList[i][j].replace(/:/g, ",");
//console.log(j +":"+ that.itemsList[i][j]);
}
}
}
},
closeRight: function() {
var offCanvasWrapper = mui('#app');
offCanvasWrapper.offCanvas('close');
},
showColumn: function() {
this.show = true;
},
change: function(n) {
//alert(n)
switch (n) {
case 0:
this.showStyleName = !this.showStyleName;
break;
case 1:
this.showIndexNo = !this.showIndexNo;
break;
case 2:
this.showCustomPO = !this.showCustomPO;
break;
case 3:
this.showStyleCode = !this.showStyleCode;
break;
case 4:
this.showColor = !this.showColor;
break;
case 5:
this.showTotalCount = !this.showTotalCount;
break;
case 6:
this.showPrice = !this.showPrice;
break;
case 7:
this.showTotalMoney = !this.showTotalMoney;
break;
case 8:
this.showMatchDate = !this.showMatchDate;
break;
case 9:
this.showConfirmDate = !this.showConfirmDate;
break;
case 10:
this.showZCPlanBeginDate = !this.showZCPlanBeginDate;
break;
case 11:
this.showZCPlanDeliveryDate = !this.showZCPlanDeliveryDate;
break;
case 12:
this.showPlanDate = !this.showPlanDate;
break;
case 13:
this.showFinishDate = !this.showFinishDate;
break;
}
//console.log(this.showPlanData);
},
escChange: function() {
var that = this;
this.show = false;
if (JSON.parse(window.localStorage.getItem("data"))) {
window.localStorage.removeItem("data");
console.log(111111111111)
}
if (!window.localStorage) {
mui.toast("不支持localstorage");
} else {
var storage = window.localStorage;
var data = {
showStyleName: that.showStyleName,
showIndexNo: that.showIndexNo,
showCustomPO: that.showCustomPO,
showStyleCode: that.showStyleCode,
showColor: that.showColor,
showTotalCount: that.showTotalCount,
showPrice: that.showPrice,
showTotalMoney: that.showTotalMoney,
showMatchDate: that.showMatchDate,
showConfirmDate: that.showConfirmDate,
showZCPlanBeginDate: that.showZCPlanBeginDate,
showZCPlanDeliveryDate: that.showZCPlanDeliveryDate,
showPlanDate: that.showPlanDate,
showFinishDate: that.showFinishDate,
};
var d = JSON.stringify(data);
console.log(d);
storage.setItem("data", d);
console.log("ssssss" + storage.data);
//console.log( JSON.parse(window.localStorage.getItem("data")).showIndexNo );
}
},
goSearch: function(event) {
var that = this;
var para = {
Date: that.dateTime,
PageSize: that.PageSize,
PageIndex: that.PageIndex,
SearchType: that.current,
SearchText: that.searchText,
};
console.log("搜索文本:" + JSON.stringify(para));
if (event.keyCode == "13") {
document.activeElement.blur(); //收起虚拟键盘
if (that.searchText == '') return;
that.searchDetail(para);
event.preventDefault(); // 阻止默认事件---阻止页面刷新
//that.searchText = '';
}
},
changeSearchType: function() {
console.log("11111111111111111111:" + this.current);
if (this.current == '3' || this.current == '4') {
this.isData = true;
var para = {
Date: this.dateTime,
PageSize: this.PageSize,
PageIndex: this.PageIndex,
SearchType: this.current,
SearchText: this.dateTime2,
};
} else {
this.isData = false;
var para = {
Date: this.dateTime,
PageSize: this.PageSize,
PageIndex: this.PageIndex,
SearchType: this.current,
SearchText: this.searchText,
};
}
this.searchDetail(para);
},
searchDetail: function(para) {
console.log("搜索参数::" + JSON.stringify(para));
var that = this;
that.paramSearch={
pageIndex: 2,
pageSize: 20
}
that.paramList= {
pageIndex: 2,
pageSize: 20
}
console.log(JSON.stringify(that.paramSearch));
// var s=document.getElementById("sDetail");
// s.scrollTo(0, 0);
//console.log(s.innerHTML);
//location.reload() ;
//that.itemsList=[];
//mui('#sDetail ').scroll().scrollTo(0, 0, 100);
//$("#sDetail").animate({ scrollTop: 50 },200);
Api.post('/api/vMES/ZCProductionPlan/List', para, function(e) {
if (e.success) {
var data = e.data.items.length;
//console.log("搜索::" + JSON.stringify(e.data.items))
if (data > 0) {
that.Summary = e.data.Summary;
that.itemsList = e.data.items;
that.changecolor();
} else {
that.itemsList = [];
mui.toast("没有对应的数据哦!");
}
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
},
selecttime: function() {
var that = this;
var _self = document.getElementById("selectdate");
if (_self.picker) {
_self.picker.show(function(rs) {
_self.innerText = rs.text;
_self.picker.dispose();
_self.picker = null;
});
} else {
var optionsJson = _self.getAttribute('data-options') || '{}';
var options = JSON.parse(optionsJson);
var id = _self.getAttribute('id');
/*
* 首次显示时实例化组件
* 示例为了简洁,将 options 放在了按钮的 dom 上
* 也可以直接通过代码声明 optinos 用于实例化 DtPicker
*/
_self.picker = new mui.DtPicker(options);
_self.picker.show(function(rs) {
_self.innerText = rs.text;
//that.dateTime = rs.text;
that.dateTime = moment(new Date(rs.text)).format("YYYY-MM");
//console.log(111111)
that.changeSearchType();
_self.picker.dispose();
_self.picker = null;
});
console.log(that.dateTime);
}
},
nextMonth: function(n) {
var that = this;
this.dateTime = n > 0 ? moment(new Date(this.dateTime)).add(1, "M").format("YYYY-MM") : moment(new Date(this.dateTime))
.subtract(1, "M").format("YYYY-MM")
console.log(this.dateTime);
that.changeSearchType();
},
selecttime1: function() {
var that = this;
var _self = document.getElementById("selectdate1");
if (_self.picker) {
_self.picker.show(function(rs) {
_self.innerText = rs.text
_self.picker.dispose();
_self.picker = null;
that.dateTime1 = moment(new Date(rs.text)).format("YYYY-MM-DD");
});
} else {
var optionsJson = _self.getAttribute('data-options') || '{}';
var options = JSON.parse(optionsJson);
var id = _self.getAttribute('id');
_self.picker = new mui.DtPicker(options);
_self.picker.show(function(rs) {
_self.innerText = rs.text;
that.dateTime1 = moment(new Date(rs.text)).format("YYYY-MM-DD");;
_self.picker.dispose();
_self.picker = null;
});
}
}, //selecttime
nextday: function(n) {
var d = new Date(this.dateTime1);
d.setTime(d.getTime() + 24 * 60 * 60 * 1000 * n);
if (d.getDate().toString().length == 1) {
this.dateTime1 = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
this.dateTime1 = moment(new Date(this.dateTime1)).format("YYYY-MM-DD");
} else {
this.dateTime1 = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
this.dateTime1 = moment(new Date(this.dateTime1)).format("YYYY-MM-DD");
}
},
selecttime2: function() {
var that = this;
var _self = document.getElementById("selectdate2");
if (_self.picker) {
_self.picker.show(function(rs) {
_self.innerText = rs.text
_self.picker.dispose();
_self.picker = null;
that.dateTime2 = moment(new Date(rs.text)).format("YYYY-MM-DD");
});
} else {
var optionsJson = _self.getAttribute('data-options') || '{}';
var options = JSON.parse(optionsJson);
var id = _self.getAttribute('id');
_self.picker = new mui.DtPicker(options);
_self.picker.show(function(rs) {
_self.innerText = rs.text;
that.dateTime2 = moment(new Date(rs.text)).format("YYYY-MM-DD");;
var para = {
Date: that.dateTime,
PageSize: that.PageSize,
PageIndex: that.PageIndex,
SearchType: that.current,
SearchText: that.dateTime2,
};
that.searchDetail(para);
_self.picker.dispose();
_self.picker = null;
});
}
}, //selecttime
nextday2: function(n) {
var that = this;
var d = new Date(this.dateTime2);
d.setTime(d.getTime() + 24 * 60 * 60 * 1000 * n);
if (d.getDate().toString().length == 1) {
this.dateTime2 = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
this.dateTime2 = moment(new Date(this.dateTime2)).format("YYYY-MM-DD");
} else {
this.dateTime2 = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
this.dateTime2 = moment(new Date(this.dateTime2)).format("YYYY-MM-DD");
}
var para = {
Date: that.dateTime,
PageSize: that.PageSize,
PageIndex: that.PageIndex,
SearchType: that.current,
SearchText: that.dateTime2,
};
that.searchDetail(para);
},
getDetailData: function() { //发包
var that = this;
var para = {
OrderDetailID: this.OrderDetailID,
PlanDate: this.dateTime1
}
console.log(JSON.stringify(para));
Api.post('/api/vMES/ZCProductionPlan/Save', para, function(e) {
if (e.success) {
that.isAward = false;
that.IndexID = e.data.IndexID;
console.log(JSON.stringify(that.IndexID));
that.getDetailList(that.IndexID);
that.playVoice("cg.mp3");
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
console.log(JSON.stringify(res.message))
that.playVoice("sb.mp3");
});
},
showDetail: function(item) { //判断是否发包
var that = this;
that.all = false;
that.selectList = [];
that.itemsData2 = [];
var offCanvasWrapper = mui('#app');
offCanvasWrapper.offCanvas('show');
console.log("信息::" + JSON.stringify(item));
that.IndexNo = item.IndexNo;
that.StyleCode = item.StyleCode;
that.OrderDetailID = item.OrderDetailID;
if (item.IsPlan) {
that.IndexID = item.IndexID;
console.log(item.IndexID)
that.getDetailList(that.IndexID);
that.isAward = false;
} else {
that.isAward = true;
mui.toast("该订单未发包!");
that.itemsData2 = [];
}
},
getDetailList: function(id) { //获取发包后的信息
var that = this;
that.itemsData2 = [];
var para = {
IndexID: id
}
console.log("参数00::" + JSON.stringify(para))
Api.post('/api/vMES/TaskWork/Task', para, function(e) {
if (e.success) {
if (e.data.Main && e.data.Main != '') {
that.WorkTeamID = e.data.Main.WorkTeamID;
}
if (e.data.IETask.length > 0) {
that.itemsData2 = e.data.IETask;
console.log("详细信息::" + JSON.stringify(e.data))
that.itemsData2.forEach(function(item) {
that.$set(item, "status", false)
})
console.log(JSON.stringify(that.itemsData2));
}
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
console.log(JSON.stringify(res.message))
})
},
revokeData: function() { //撤回
var that = this;
var para = {
IndexID: this.IndexID
}
console.log(JSON.stringify(para));
if (this.IndexID == 0) {
mui.toast("该订单未发包不能撤销!")
} else {
Api.post('/api/vMES/ZCProductionPlan/Revoke', para, function(e) {
if (e.success) {
mui.toast("撤销成功!");
that.isAward = true;
that.itemsData2 = [];
that.playVoice("cg.mp3");
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
that.playVoice("sb.mp3");
})
}
},
selectAll: function() { //全选
let self = this;
this.all = !this.all;
if (this.all) {
for (var i = 0; i < this.itemsData2.length; i++) {
this.selectList.push(this.itemsData2[i].IEID);
}
} else {
this.selectList = [];
}
this.itemsData2.forEach((val) => {
val.status = self.all;
})
},
selectCheck: function(index) { //单选
this.itemsData2[index].status = !this.itemsData2[index].status;
console.log(JSON.stringify(this.itemsData2[index]))
this.selectList = [];
//var che = document.getElementsByClassName("che");
for (var i = 0; i < this.itemsData2.length; i++) {
if (this.itemsData2[i].status) {
this.selectList.push(this.itemsData2[i].IEID);
}
}
this.changeSelectAll(this.selectList);
},
changeSelectAll: function(selectList) {
selectList.length == this.itemsData2 ? this.all = true : this.all = false;
},
selectChe: function(index) { //三级页面选择人
this.PersonList[index].status = !this.PersonList[index].status;
this.selectList2 = [];
for (var i = 0; i < this.PersonList.length; i++) {
if (this.PersonList[i].status) {
this.selectList2.push(this.PersonList[i].UserID);
}
}
},
selectPerson: function(obj) { //二级页面添加人
this.searchPersonList = [];
this.selectList = [];
this.selectList.push(obj.IEID)
this.sty1 = false;
this.Workers = obj.Workers;
console.log("qqqqqqqqqqqqqqqqqqqq:" + JSON.stringify(obj));
var sub = document.getElementById("submit");
sub.innerHTML = "保存"
this.getdataUser();
},
selectPersonAll: function() { //批量选人
//this.selectCheck()
this.sty1 = false;
this.Workers = [];
var sub = document.getElementById("submit")
sub.innerHTML = "保存"
//this.selectif_PL = 0;
this.getdataUser();
},
getdataUser: function() { //获取人员列表
console.log("getdataUser" + this.IndexID);
var para = {
WorkTeamID: this.WorkTeamID,
IndexID: this.IndexID
};
var that = this;
console.log(JSON.stringify(para));
Api.post('/api/vMES/TaskWork/TaskWorker', para, function(e) {
if (e.success) {
that.PersonList = e.items;
that.PersonList.forEach(function(item) {
if (item.status == undefined) {
that.$set(item, "status", false);
//console.log("woaini sd00000000000000000000000000")
}
})
console.log("renrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr:" + JSON.stringify(that.PersonList));
setTimeout(function() {
that.initWork()
}, 100)
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
});
},
initWork: function() {
var that = this;
that.PersonList.forEach(function(item) {
item.status = false;
})
if (this.Workers.length > 0) {
for (var i = 0; i < this.Workers.length; i++) {
for (var j = 0; j < that.PersonList.length; j++) {
if (that.PersonList[j].UserID == this.Workers[i].UserID) {
var xx = document.getElementById("num_" + this.Workers[i].UserID)
xx.innerText = this.Workers[i].Qty
//this.finishDis = 1;
that.PersonList[j].checked = true;
}
}
}
}
},
sop: function() {
this.getLink();
},
getLink: function() {
var that = this;
var para = {
ReportType: 0,
StyleCode: this.StyleCode
}
console.log(JSON.stringify(para))
Api.post('/api/vMES/Sop/StyleSop', para, function(e) {
if (e.success) {
that.link = e.data.Url;
var url_ = "sop.html";
var id_ = "sop.html";
mui.openWindow({
url: url_,
id: id_,
extras: {
style: that.selectDetail.StyleCode,
ReportType: 2,
link: that.link,
parentPage: "NeedleDispatch.html"
},
});
} else {
mui.toast("获取sop地址失败: " + e.message)
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
});
},
submit: function() {
var sub = document.getElementById("submit")
if (sub.innerHTML == "保存") {
this.submit_person();
} else {
var that = this;
var para = {
IndexID: this.IndexID,
}
Api.post('/api/vMES/TaskWork/Submit', para, function(e) {
if (e.success) {
that.playVoice("cg.mp3");
mui.toast("提交成功");
console.log("vvvvvvvvv成功!ddddddddddddddddd")
that.all = false;
that.itemsData2.forEach(function(item) {
item.status = false;
})
} else {
that.playVoice("sb.mp3");
mui.toast("提交失败: " + e.message);
}
}, function(b, bb, bbb) {
that.playVoice("sb.mp3");
mui.toast(JSON.stringify(bbb.message))
console.log(JSON.stringify(bbb.message))
})
}
},
playVoice: function(filename) {
if (plus.audio == undefined) {
} else {
// 播放操作
var p = plus.audio.createPlayer("_www/dest/voice/" + filename);
p.play(function() {
//alert( "Audio play success!" );
}, function(e) {
//alert( "Audio play failed: " + e.message );
});
}
},
submit_person: function() {
var tempPara = [];
if (this.selectList2.length > 0) {
for (var i = 0; i < this.selectList.length; i++) {
for (var j = 0; j < this.selectList2.length; j++) {
var temp = {
IEID: 0,
UserID: 0
};
temp.IEID = this.selectList[i];
temp.UserID = this.selectList2[j];
tempPara.push(temp);
}
}
}
if (tempPara.length == 0) {
this.playVoice("sb.mp3");
mui.toast("请选择派工人员");
return;
}
this.selectList2 = [];
var that = this;
var para = {
IndexID: this.IndexID,
Items: tempPara,
}
Api.post('/api/vMES/TaskWork/Save', para, function(e) {
if (e.success) {
that.playVoice("cg.mp3");
that.sty1 = true;
that.all = false;
that.itemsData2.forEach(function(item) {
item.status = false;
})
var sub = document.getElementById("submit")
sub.innerHTML = "提交";
//console.log("成功过过过过过过过过过过过过过灌灌灌灌灌过过过过过过过过过过过过!"+ !that.sty1);
//that.nextPage(that.selectDetail, 1);
that.getDetailList(that.IndexID);
mui.toast("保存成功");
} else {
that.playVoice("sb.mp3");
mui.toast("保存失败: " + e.message);
}
}, function(b, bb, bbb) {
that.playVoice("sb.mp3");
mui.toast(JSON.stringify(bbb.message))
})
},
},
})
......@@ -443,10 +443,10 @@ var app = new Vue({
reportDelete: function() { //
var that = this;
var para = {
ReportID: this.IndexID,
IndexID: this.IndexID,
};
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报
Api.post('/api/vMES/ProductionReport/Delete', para, function(e) {
Api.post('/api/vMES/ProductionReportV2/Delete', para, function(e) {
if (e.success) {
//console.log(JSON.stringify(e));
that.createZhezhao(-1)
......@@ -463,7 +463,7 @@ var app = new Vue({
var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) {
//console.log("比对的id:" + doneIndexArr[i].IndexID);
if (doneIndexArr[i].IndexID == para.ReportID) {
if (doneIndexArr[i].IndexID == para.IndexID) {
delIndexNoIndx = i;
break;
}
......
......@@ -24,29 +24,29 @@ var app = new Vue({
paramUnDo: {
pageIndex: 2,
pageSize: 10,
ReportType:0
ReportType: ''
},
paramDone: {
pageIndex: 2,
pageSize: 10,
ReportType: 0
ReportType: ''
},
paramUnDoSeach: {
pageIndex: 2,
pageSize: 10,
ReportType: 0
ReportType: ''
},
paramDoneSeach: {
pageIndex: 2,
pageSize: 10,
ReportType:0
ReportType: ''
},
itemsHead: [], //未完成和搜索左侧数组
itemsLeft: [],
itemsLeft2: [], //已完成左侧数组
itemsSize: [],
SizeQty: [],
ReportType: 0,
ReportType: '',
IndexID: 0,
rightInfor: [], //右侧详情
cur: 0, //点击选中当前状态
......@@ -128,8 +128,8 @@ var app = new Vue({
var reFinished = document.getElementById("theTow").getAttribute("state");
// var UnfinishedUrl = '/api/vMES/ProductionReportV2/ToDo';
// var FinishedUrl = '/api/vMES/ProductionReportV2/Done';
var searchUrl = '/api/vMES/ProductionReportV2/Search';
var searchDoneUrl = '/api/vMES/ProductionReportV2/SearchDone';
var searchUrl = '/api/vMES/CutOffProductionReport/Search';
var searchDoneUrl = '/api/vMES/CutOffProductionReport/SearchDone';
//console.log("未完成" + reUnfinished)
//console.log("已完成" + reFinished)
var UnfinishedData = app.itemsHead;
......@@ -192,8 +192,8 @@ var app = new Vue({
};
//console.log("lalla" + JSON.stringify(para));
that.cur = 0;
Api.post('/api/vMES/ProductionReportV2/Search', para, function(e) {
console.log("one :::;" + JSON.stringify(e.items.length))
Api.post('/api/vMES/CutOffProductionReport/Search', para, function(e) {
console.log("one :::;" + JSON.stringify(para))
console.log("getData:" + JSON.stringify(e.items[0]))
//console.log("点击之前"+JSON.stringify(that.rightInfor))
if (e.items.length > 0) {
......@@ -236,7 +236,7 @@ var app = new Vue({
ReportType: that.ReportType
};
that.ReportID = idInfor;
Api.post('/api/vMES/ProductionReportV2/Detail', para, function(e) {
Api.post('/api/vMES/CutOffProductionReport/Detail', para, function(e) {
if (e.success) {
that.rightInfor = e.data;
console.log("点击之后" + JSON.stringify(that.rightInfor))
......@@ -276,7 +276,7 @@ var app = new Vue({
};
that.searchText = '';
that.disable_reportDelete = "disabled";
Api.post('/api/vMES/ProductionReportV2/Search', para, function(e) {
Api.post('/api/vMES/CutOffProductionReport/Search', para, function(e) {
that.cur = 0;
if (e.items.length > 0) {
that.itemsHead = e.items;
......@@ -305,7 +305,7 @@ var app = new Vue({
//console.log("do para " + JSON.stringify(para))
that.disable_reportDelete = null;
that.searchText = '';
Api.post('/api/vMES/ProductionReportV2/SearchDone', para, function(e) {
Api.post('/api/vMES/CutOffProductionReport/SearchDone', para, function(e) {
console.log("已完成" + JSON.stringify(para))
var data = e.items.length;
if (data > 0) {
......@@ -360,7 +360,7 @@ var app = new Vue({
searchDetail: function(para) {
var that = this;
if (this.completeState) { //true 是未完成的搜索 false是已完成的搜索
Api.post('/api/vMES/ProductionReportV2/Search', para, function(e) {
Api.post('/api/vMES/CutOffProductionReport/Search', para, function(e) {
console.log("现在是未完成的搜索!"+ JSON.stringify(para));
var data = e.items.length;
if (data > 0) {
......@@ -380,8 +380,8 @@ var app = new Vue({
mui.toast(JSON.stringify(res.message))
});
} else {
Api.post('/api/vMES/ProductionReportV2/SearchDone', para, function(e) {
console.log("现在是以111111完成的搜索!"+ JSON.stringify(para));
Api.post('/api/vMES/CutOffProductionReport/SearchDone', para, function(e) {
console.log("现在是以111111完成的搜索!"+ JSON.stringify(para)+e.items[0].IndexID);
var data = e.items.length;
if (data > 0) {
that.itemsLeft2 = e.items;
......@@ -442,10 +442,10 @@ var app = new Vue({
reportDelete: function() { //
var that = this;
var para = {
ReportID: this.IndexID,
IndexID: this.IndexID,
};
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报
Api.post('/api/vMES/ProductionReport/Delete', para, function(e) {
Api.post('/api/vMES/CutOffProductionReport/Delete', para, function(e) {
if (e.success) {
//console.log(JSON.stringify(e));
that.createZhezhao(-1)
......@@ -462,7 +462,7 @@ var app = new Vue({
var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) {
//console.log("比对的id:" + doneIndexArr[i].IndexID);
if (doneIndexArr[i].IndexID == para.ReportID) {
if (doneIndexArr[i].IndexID == para.IndexID) {
delIndexNoIndx = i;
break;
}
......
......@@ -60,8 +60,14 @@ var Api = {
data = data || {};
data.token = context.token;
error = error || this.__defaultErrorHandlder;
Log.log("web request:" + host + url + ' data:' + JSON.stringify(data));
mui.ajax(host + url, {
var ts = (new Date()).valueOf();
url = host + url;
url += url.indexOf('?') > 0 ? ("&ts=" + ts) :("?ts=" + ts);
Log.log("web request:" + url+ JSON.stringify(data));
mui.ajax(url, {
type: 'POST',
data: data,
dataType: 'json',
......
......@@ -2,7 +2,7 @@
(function($){
var t = (new Date()).valueOf();
var wgtVer = null,
checkUrl = "http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes",
checkUrl = "http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes_test",
localDir="update",
update_json_android='android.json',
update_json_ios = 'ios.json',
......
......@@ -14,7 +14,6 @@
<div class="mui-content">
<div id="left" class="left">
<div id="left-1" class="left-1">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" @click="back"></a>
<label>今日产量:{{number}} </label>
......@@ -90,7 +89,7 @@
</div>
<div id="theTow" :state="!completeState" v-show="!completeState">
<div class="mui-table-view1 mui-table-view-chevron">
<ul class="complet-detail" v-for="(list,index) in itemsLeft2" :class="{active:cur==index}" @click="getDetailInfor(list.IndexID,index)">
<ul :class="{active:cur==index}" class="complet-detail" v-for="(list,index) in itemsLeft2" @click="getDetailInfor(list.IndexID,index)">
<li>
<p><span>指令号:</span><span>{{list.IndexNo}}</span></p>
<p><span>订单号:</span><span>{{list.CustomPO}}</span></p>
......
......@@ -27,17 +27,17 @@
<body>
<div id="app" class="mui-off-canvas-wrap mui-draggable">
<aside id="offCanvasSide" class="mui-off-canvas-right" style="background: white;">
<div id="offCanvasSideScroll" class="mui-scroll-wrapper" >
<div id="offCanvasSideScroll" class="mui-scroll-wrapper">
<div class="mui-scroll">
<div class="content">
<label>添加人员:</label>
<input type="search" v-model="searchText" placeholder="请输入人员工号或姓名关键字搜索" style="width: 300px;" />
<p style="margin: 10px 15px; display: inline-block;" >
<p style="margin: 10px 15px; display: inline-block;">
<button type="button" class="mui-btn mui-btn-danger mui-btn-block" @click="searchPerson" style="padding: 5px 20px;width: 100px">搜索</button>
</p>
<p style="margin: 10px 15px; display: inline-block;" >
<p style="margin: 10px 15px; display: inline-block;">
<button id="offCanvasHide" type="button" class="mui-btn mui-btn-danger mui-btn-block" style="padding: 5px 20px;width: 100px">关闭</button>
</p>
</div>
......@@ -74,12 +74,14 @@
</div>
<button style="position: relative; right: -531px; top: 510px; width: 100px;" type="button" :disabled="submit2_" class="mui-btn mui-btn-blue mui-btn-block" @tap="submit_2">确定</button>
<button style="position: relative; right: -531px; top: 510px; width: 100px;" type="button" :disabled="submit2_"
class="mui-btn mui-btn-blue mui-btn-block" @tap="submit_2">确定</button>
</div>
</aside>
<div class="mui-inner-wrap" >
<div id="left-1" style="background-color: #007AFF; width: 40%; height: 34px; margin-bottom: 0px;" >
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: white; width: 60px; margin-top: 2px;" @click="back"></a>
<div class="mui-inner-wrap">
<div id="left-1" style="background-color: #007AFF; width: 40%; height: 34px; margin-bottom: 0px;">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: white; width: 60px; margin-top: 2px;"
@click="back"></a>
<label style=" text-align: center; margin-left: 70px; color: white; position: relative;top: 7px;">针车排班表 </label>
</div>
<div id="left-2" style="width: 40%">
......@@ -113,7 +115,7 @@
</li>
<li style=" padding: 0px 15px;">
<p style="float: left;width: 16%; color: #060606; padding: 0; margin: 0;"> 货号: </p>
<p style="float: left;width: 40%; color: #007AFF; padding: 0; margin: 0;">&nbsp;{{itemsDetail.StyleCode}} </p>
<p style="float: left;width: 40%; color: #007AFF; padding: 0; margin: 0;overflow: hidden;text-overflow: ellipsis; white-space: nowrap; ">&nbsp;{{itemsDetail.StyleCode}} </p>
<p style="float: left;width: 14%; color: #060606; padding: 0; margin: 0;">数量: </p>
<p style="float: left;width: 28%; color: red; padding: 0; margin: 0;">{{itemsDetail.Qty}} </p>
</li>
......@@ -121,7 +123,8 @@
<p style="float: left;width: 18%; color: #060606; padding: 0; margin: 0;"> 计划时间: </p>
<p style="float: left;width: 32%; color: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.PlanDate}} </p>
<p style="float: left;width: 18%; color: #060606; padding: 0; margin: 0;"> 完成时间: </p>
<p style="float: left;width: 32%; color: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.OrderDeliveryTime}} </p>
<p style="float: left;width: 32%; color: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.OrderDeliveryTime}}
</p>
</li>
<li style=" padding: 0px 11px 2px 11px;position: relative; overflow: hidden;">
......@@ -228,11 +231,9 @@
<!-- off-canvas backdrop -->
<div class="mui-off-canvas-backdrop"></div>
<div id="right-2" style="position: absolute; bottom: 1px ; right: 1px; ">
<button type="button" class="mui-btn mui-btn-blue " style=" width: 150px; height: 70px;" @click="sop">SOP</button>
<button type="button" class="mui-btn mui-btn-blue " :disabled="selectPL" style="width:150px;height: 70px; " @click="selectPersonAll">批量选员</button>
<button id="submit" type="button" class="mui-btn mui-btn-blue " style=" width: 150px; height: 70px;" @click="submit">提交</button>
</div>
</div>
</div>
......@@ -276,9 +277,9 @@
sty2: "",
Workers: [],
finishDis: 0,
searchText:"",
searchPersonList :[],
searchPersonListAfter :[],
searchText: "",
searchPersonList: [],
searchPersonListAfter: [],
},
......@@ -295,13 +296,12 @@
return null
}
},
submit2_:function(){
if(this.searchPersonListAfter.length ==0) {
submit2_: function() {
if (this.searchPersonListAfter.length == 0) {
return "disabled";
}
else{
return null ;
} else {
return null;
}
},
},
......@@ -351,16 +351,16 @@
this.getData();
} else {
// var that = this;
// this.itemsLeft = [];
// this.itemsLeft.push(this.selectDetail);
this.nextPage2(this.selectDetail,0)
// setTimeout(function() {
// that.nextPage(that.itemsLeft[0], 1)
// }, 100)
// var that = this;
// this.itemsLeft = [];
// this.itemsLeft.push(this.selectDetail);
this.nextPage2(this.selectDetail, 0)
// setTimeout(function() {
// that.nextPage(that.itemsLeft[0], 1)
// }, 100)
}
},
show:function(){
show: function() {
offCanvasWrapper.offCanvas('show');
......@@ -383,7 +383,7 @@
}
})
},
searchPerson:function(){
searchPerson: function() {
var that = this;
var para = {
text: this.searchText
......@@ -394,22 +394,22 @@
if (e.success) {
that.searchPersonList = e.items;
console.log("befor"+JSON.stringify(that.searchPersonList))
for (var i = that.searchPersonList.length -1; i >=0; i--) {
console.log("befor" + JSON.stringify(that.searchPersonList))
for (var i = that.searchPersonList.length - 1; i >= 0; i--) {
for (var j = 0; j < that.PersonList.length; j++) {
if(that.searchPersonList[i].UserID == that.PersonList[j].UserID){
that.searchPersonList.splice(i,1);
if (that.searchPersonList[i].UserID == that.PersonList[j].UserID) {
that.searchPersonList.splice(i, 1);
break;
}
}
}
console.log("after"+JSON.stringify(that.searchPersonList))
console.log("after" + JSON.stringify(that.searchPersonList))
}
},function(b, bb, bbb) {
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
})
......@@ -469,14 +469,14 @@
});
},
submit_2:function(){
submit_2: function() {
this.searchPersonListAfter
if( this.searchPersonListAfter.length == 0){
if (this.searchPersonListAfter.length == 0) {
this.playVoice("sb.mp3");
mui.toast("请勾选人员");
return;
}
if(this.PersonList.length == 0){
if (this.PersonList.length == 0) {
this.playVoice("sb.mp3");
mui.toast("请先进入人员选择界面");
return;
......@@ -485,7 +485,13 @@
for (var i = 0; i < this.searchPersonListAfter.length; i++) {
console.log("personlist;;;" + JSON.stringify(this.PersonList))
var temp = {UserID: 0,Code: "",UserName: "",WorkType: "",SkillLevel: ""};
var temp = {
UserID: 0,
Code: "",
UserName: "",
WorkType: "",
SkillLevel: ""
};
temp.UserID = this.searchPersonListAfter[i].UserID;
temp.Code = this.searchPersonListAfter[i].Code;
temp.UserName = this.searchPersonListAfter[i].UserName;
......@@ -494,8 +500,8 @@
console.log("personlist;;;after" + JSON.stringify(this.PersonList));
for (var j = 0; j < this.searchPersonList.length; j++) {
if(this.searchPersonList[j].UserID == this.searchPersonListAfter[i].UserID){
this.searchPersonList.splice(j,1);
if (this.searchPersonList[j].UserID == this.searchPersonListAfter[i].UserID) {
this.searchPersonList.splice(j, 1);
}
}
......@@ -505,25 +511,25 @@
document.getElementById('offCanvasHide').click();
var that = this;
setTimeout(function(){
setTimeout(function() {
for (var i = 0; i < that.searchPersonListAfter.length; i++) {
document.getElementById(that.searchPersonListAfter[i].UserID).checked= true;
document.getElementById(that.searchPersonListAfter[i].UserID).checked = true;
that.selectList2.push(that.searchPersonListAfter[i].UserID)
}
that.searchPersonListAfter =[];
that.searchPersonList =[];
that.searchPersonListAfter = [];
that.searchPersonList = [];
},200)
}, 200)
},
nextPage: function(o, kk) {
console.log("nextPage");
this.PersonList=[];
this.selectList2 =[];
this.searchPersonList =[];
this.searchPersonListAfter =[];
this.PersonList = [];
this.selectList2 = [];
this.searchPersonList = [];
this.searchPersonListAfter = [];
var che = document.getElementsByClassName("che");
for (var j = 0; j < che.length; j++) {
che[j].checked = false;
......@@ -562,10 +568,10 @@
for (var j = 0; j < che.length; j++) {
che[j].checked = false;
}
this.PersonList=[];
this.selectList2 =[];
this.searchPersonList =[];
this.searchPersonListAfter =[];
this.PersonList = [];
this.selectList2 = [];
this.searchPersonList = [];
this.searchPersonListAfter = [];
this.sty1 = "display: none";
this.sty2 = "";
var sub = document.getElementById("submit")
......@@ -583,7 +589,7 @@
console.log(JSON.stringify(e))
that.WorkTeamID = e.data.Main.WorkTeamID;
that.itemsLeft.push(e.data.Main )
that.itemsLeft.push(e.data.Main)
that.itemsData2 = e.data.IETask;
that.TotalQty = e.data.Main.Qty;
})
......@@ -628,7 +634,7 @@
this.Workers = [];
var sub = document.getElementById("submit")
sub.innerHTML = "保存"
this.selectif_PL =0;
this.selectif_PL = 0;
this.getdataUser()
},
......@@ -674,19 +680,18 @@
},
selectPersonList: function(obj) {
var ss = document.getElementById( "personlist_" + obj.UserID)
var ss = document.getElementById("personlist_" + obj.UserID)
console.log(ss)
if (ss.checked) {
this.searchPersonListAfter.push(obj)
console.log("add ;;;" + JSON.stringify( this.searchPersonListAfter));
}
else{
console.log("add ;;;" + JSON.stringify(this.searchPersonListAfter));
} else {
for (var i = 0; i < this.searchPersonListAfter.length; i++) {
if(this.searchPersonListAfter[i].UserID == obj.UserID){
this.searchPersonListAfter.splice(i,1) ;
console.log("move ;;;" + JSON.stringify( this.searchPersonListAfter));
return ;
if (this.searchPersonListAfter[i].UserID == obj.UserID) {
this.searchPersonListAfter.splice(i, 1);
console.log("move ;;;" + JSON.stringify(this.searchPersonListAfter));
return;
}
}
}
......@@ -717,7 +722,7 @@
mui.toast("请选择派工人员");
return;
}
this.selectList2 =[];
this.selectList2 = [];
var that = this;
var para = {
IndexID: this.IndexID,
......@@ -869,8 +874,6 @@
if (e.success) {
that.playVoice("cg.mp3");
mui.toast("提交成功");
} else {
that.playVoice("sb.mp3");
mui.toast("提交失败: " + e.message);
......@@ -884,17 +887,17 @@
}
},
playVoice:function(filename){
if ( plus.audio == undefined ) {
playVoice: function(filename) {
if (plus.audio == undefined) {
} else{
} else {
// 播放操作
var p = plus.audio.createPlayer("_www/dest/voice/"+ filename);
p.play( function () {
var p = plus.audio.createPlayer("_www/dest/voice/" + filename);
p.play(function() {
//alert( "Audio play success!" );
}, function ( e ) {
}, function(e) {
//alert( "Audio play failed: " + e.message );
});
......
......@@ -98,7 +98,7 @@
<div class="application-box" types="90029">
<a ids="3" href="javascript:;">
<div class="application-img"><img src="../dest/img/cx.png" alt="工序交接-成型" /></div>
<h3 class="application-tit" title="工序交接-针车">针车配套确认</h3>
<h3 class="application-tit" title="工序交接-成型">针车配套确认</h3>
</a>
</div>
<div class="application-box" types="90030">
......@@ -113,8 +113,12 @@
<h3 class="application-tit" title="针车排班表">针车排班表</h3>
</a>
</div>
<div class="application-box" types="90037">
<a ids="9" href="javascript:;">
<div class="application-img"><img src="../dest/img/bp.png" alt="针车派工单" /></div>
<h3 class="application-tit" title="针车派工单">针车派工单</h3>
</a>
</div>
<!-- <div class="application-box" types="设置">
<a ids="999" href="javascript:;">
<div class="application-img"><img src="../dest/img/sz.png" alt="设置" /></div>
......@@ -145,29 +149,31 @@
})(mui, document)
}
function init() {
mui.init();
var lisy = Dom.getById('lialist');
var isds = lisy.getElementsByClassName('application-box');
var ucond = Dom.getById('centicon');
var pages = ['Needlecarreport_new', 'Cutting', "Forming", "NeedleMatch", "NeedlecarHandover",
"MyWork","NeedlecarPBB","NeedlecarreportV2","FormingV2"];
"MyWork", "NeedlecarPBB", "NeedlecarreportV2", "FormingV2","NeedleDispatch"
];
//var tits = ['色卡档案', '样品企划', '样品客户意见', '款式图片档案', '下单管理', '生产进度表', '消息提醒', '业务审批', '订货主场','针车实报','设置'];
var lab1 = document.getElementsByTagName("a");
function onGetDataSuccess(e) {
//console.log("GetModuleList::" + JSON.stringify(e))
var isSuccess = e.success;
if (isSuccess) {
var items = e.items;
console.log(JSON.stringify(items))
//console.log(JSON.stringify(items))
//手动在结尾添加了一个设置项目
// items.push({
// Code: "设置"
// });
// items.push({
// Code: "设置"
// });
//console.log(JSON.stringify(items));
console.log(JSON.stringify(items));
for (var i = 0; i < items.length; i++) {
for (var j = 0; j < isds.length; j++) {
......@@ -192,7 +198,7 @@
}
}
//console.log("GetModuleList::begin" )
Api.post('/api/User/GetModuleList', {}, onGetDataSuccess, onGetDataFailure);
Api.post('/api/User/GetModuleListV2', {}, onGetDataSuccess, onGetDataFailure);
mui(".application-box").on('tap', 'a', function() {
......
{
"@platforms" : [ "android", "iPhone", "iPad" ],
"id" : "H544710A8", /*应用的标识,创建应用时自动生成,勿手动修改*/
"name" : "飞天兔MES", /*应用名称,程序桌面图标名称*/
"id" : "H544710A8T", /*应用的标识,创建应用时自动生成,勿手动修改*/
"name" : "飞天兔MES_test", /*应用名称,程序桌面图标名称*/
"version" : {
"name" : "1.0.1.2", /*应用版本名称*/
"name" : "1.0.1.16", /*应用版本名称*/
"code" : 338
},
"description" : "飞天兔MES平板版", /*应用描述信息*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment