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

优化实报,针车派工单

parent ace52c26
...@@ -358,7 +358,9 @@ clear: both; ...@@ -358,7 +358,9 @@ clear: both;
font-weight: normal; font-weight: normal;
background-color: #E2E2E9; background-color: #E2E2E9;
} }
.mui-table-view1{
background: #fff;
}
/*********/ /*********/
#pullrefresh { #pullrefresh {
width: 100%; width: 100%;
......
...@@ -52,9 +52,9 @@ var getSubInfoById = function(infoList, id) { ...@@ -52,9 +52,9 @@ var getSubInfoById = function(infoList, id) {
var wgtVer = null; var wgtVer = null;
var t = (new Date()).valueOf(); 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文件 // 下载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); console.log("检测更新地址:" + checkUrl);
function downWgtHot() { function downWgtHot() {
......
...@@ -444,10 +444,10 @@ var app = new Vue({ ...@@ -444,10 +444,10 @@ var app = new Vue({
reportDelete: function() { // reportDelete: function() { //
var that = this; var that = this;
var para = { var para = {
ReportID: this.IndexID, IndexID: this.IndexID,
}; };
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报 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) { if (e.success) {
//console.log(JSON.stringify(e)); //console.log(JSON.stringify(e));
that.createZhezhao(-1) that.createZhezhao(-1)
...@@ -464,7 +464,7 @@ var app = new Vue({ ...@@ -464,7 +464,7 @@ var app = new Vue({
var delIndexNoIndx = -1; var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) { for (var i = 0; i < doneIndexArr.length; i++) {
//console.log("比对的id:" + doneIndexArr[i].IndexID); //console.log("比对的id:" + doneIndexArr[i].IndexID);
if (doneIndexArr[i].IndexID == para.ReportID) { if (doneIndexArr[i].IndexID == para.IndexID) {
delIndexNoIndx = i; delIndexNoIndx = i;
break; 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({ ...@@ -443,10 +443,10 @@ var app = new Vue({
reportDelete: function() { // reportDelete: function() { //
var that = this; var that = this;
var para = { var para = {
ReportID: this.IndexID, IndexID: this.IndexID,
}; };
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报 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) { if (e.success) {
//console.log(JSON.stringify(e)); //console.log(JSON.stringify(e));
that.createZhezhao(-1) that.createZhezhao(-1)
...@@ -463,7 +463,7 @@ var app = new Vue({ ...@@ -463,7 +463,7 @@ var app = new Vue({
var delIndexNoIndx = -1; var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) { for (var i = 0; i < doneIndexArr.length; i++) {
//console.log("比对的id:" + doneIndexArr[i].IndexID); //console.log("比对的id:" + doneIndexArr[i].IndexID);
if (doneIndexArr[i].IndexID == para.ReportID) { if (doneIndexArr[i].IndexID == para.IndexID) {
delIndexNoIndx = i; delIndexNoIndx = i;
break; break;
} }
......
...@@ -24,29 +24,29 @@ var app = new Vue({ ...@@ -24,29 +24,29 @@ var app = new Vue({
paramUnDo: { paramUnDo: {
pageIndex: 2, pageIndex: 2,
pageSize: 10, pageSize: 10,
ReportType:0 ReportType: ''
}, },
paramDone: { paramDone: {
pageIndex: 2, pageIndex: 2,
pageSize: 10, pageSize: 10,
ReportType: 0 ReportType: ''
}, },
paramUnDoSeach: { paramUnDoSeach: {
pageIndex: 2, pageIndex: 2,
pageSize: 10, pageSize: 10,
ReportType: 0 ReportType: ''
}, },
paramDoneSeach: { paramDoneSeach: {
pageIndex: 2, pageIndex: 2,
pageSize: 10, pageSize: 10,
ReportType:0 ReportType: ''
}, },
itemsHead: [], //未完成和搜索左侧数组 itemsHead: [], //未完成和搜索左侧数组
itemsLeft: [], itemsLeft: [],
itemsLeft2: [], //已完成左侧数组 itemsLeft2: [], //已完成左侧数组
itemsSize: [], itemsSize: [],
SizeQty: [], SizeQty: [],
ReportType: 0, ReportType: '',
IndexID: 0, IndexID: 0,
rightInfor: [], //右侧详情 rightInfor: [], //右侧详情
cur: 0, //点击选中当前状态 cur: 0, //点击选中当前状态
...@@ -128,8 +128,8 @@ var app = new Vue({ ...@@ -128,8 +128,8 @@ var app = new Vue({
var reFinished = document.getElementById("theTow").getAttribute("state"); var reFinished = document.getElementById("theTow").getAttribute("state");
// var UnfinishedUrl = '/api/vMES/ProductionReportV2/ToDo'; // var UnfinishedUrl = '/api/vMES/ProductionReportV2/ToDo';
// var FinishedUrl = '/api/vMES/ProductionReportV2/Done'; // var FinishedUrl = '/api/vMES/ProductionReportV2/Done';
var searchUrl = '/api/vMES/ProductionReportV2/Search'; var searchUrl = '/api/vMES/CutOffProductionReport/Search';
var searchDoneUrl = '/api/vMES/ProductionReportV2/SearchDone'; var searchDoneUrl = '/api/vMES/CutOffProductionReport/SearchDone';
//console.log("未完成" + reUnfinished) //console.log("未完成" + reUnfinished)
//console.log("已完成" + reFinished) //console.log("已完成" + reFinished)
var UnfinishedData = app.itemsHead; var UnfinishedData = app.itemsHead;
...@@ -192,8 +192,8 @@ var app = new Vue({ ...@@ -192,8 +192,8 @@ var app = new Vue({
}; };
//console.log("lalla" + JSON.stringify(para)); //console.log("lalla" + JSON.stringify(para));
that.cur = 0; that.cur = 0;
Api.post('/api/vMES/ProductionReportV2/Search', para, function(e) { Api.post('/api/vMES/CutOffProductionReport/Search', para, function(e) {
console.log("one :::;" + JSON.stringify(e.items.length)) console.log("one :::;" + JSON.stringify(para))
console.log("getData:" + JSON.stringify(e.items[0])) console.log("getData:" + JSON.stringify(e.items[0]))
//console.log("点击之前"+JSON.stringify(that.rightInfor)) //console.log("点击之前"+JSON.stringify(that.rightInfor))
if (e.items.length > 0) { if (e.items.length > 0) {
...@@ -236,7 +236,7 @@ var app = new Vue({ ...@@ -236,7 +236,7 @@ var app = new Vue({
ReportType: that.ReportType ReportType: that.ReportType
}; };
that.ReportID = idInfor; that.ReportID = idInfor;
Api.post('/api/vMES/ProductionReportV2/Detail', para, function(e) { Api.post('/api/vMES/CutOffProductionReport/Detail', para, function(e) {
if (e.success) { if (e.success) {
that.rightInfor = e.data; that.rightInfor = e.data;
console.log("点击之后" + JSON.stringify(that.rightInfor)) console.log("点击之后" + JSON.stringify(that.rightInfor))
...@@ -276,7 +276,7 @@ var app = new Vue({ ...@@ -276,7 +276,7 @@ var app = new Vue({
}; };
that.searchText = ''; that.searchText = '';
that.disable_reportDelete = "disabled"; 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; that.cur = 0;
if (e.items.length > 0) { if (e.items.length > 0) {
that.itemsHead = e.items; that.itemsHead = e.items;
...@@ -305,7 +305,7 @@ var app = new Vue({ ...@@ -305,7 +305,7 @@ var app = new Vue({
//console.log("do para " + JSON.stringify(para)) //console.log("do para " + JSON.stringify(para))
that.disable_reportDelete = null; that.disable_reportDelete = null;
that.searchText = ''; 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)) console.log("已完成" + JSON.stringify(para))
var data = e.items.length; var data = e.items.length;
if (data > 0) { if (data > 0) {
...@@ -360,7 +360,7 @@ var app = new Vue({ ...@@ -360,7 +360,7 @@ var app = new Vue({
searchDetail: function(para) { searchDetail: function(para) {
var that = this; var that = this;
if (this.completeState) { //true 是未完成的搜索 false是已完成的搜索 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)); console.log("现在是未完成的搜索!"+ JSON.stringify(para));
var data = e.items.length; var data = e.items.length;
if (data > 0) { if (data > 0) {
...@@ -380,8 +380,8 @@ var app = new Vue({ ...@@ -380,8 +380,8 @@ var app = new Vue({
mui.toast(JSON.stringify(res.message)) mui.toast(JSON.stringify(res.message))
}); });
} else { } else {
Api.post('/api/vMES/ProductionReportV2/SearchDone', para, function(e) { Api.post('/api/vMES/CutOffProductionReport/SearchDone', para, function(e) {
console.log("现在是以111111完成的搜索!"+ JSON.stringify(para)); console.log("现在是以111111完成的搜索!"+ JSON.stringify(para)+e.items[0].IndexID);
var data = e.items.length; var data = e.items.length;
if (data > 0) { if (data > 0) {
that.itemsLeft2 = e.items; that.itemsLeft2 = e.items;
...@@ -442,10 +442,10 @@ var app = new Vue({ ...@@ -442,10 +442,10 @@ var app = new Vue({
reportDelete: function() { // reportDelete: function() { //
var that = this; var that = this;
var para = { var para = {
ReportID: this.IndexID, IndexID: this.IndexID,
}; };
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报 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) { if (e.success) {
//console.log(JSON.stringify(e)); //console.log(JSON.stringify(e));
that.createZhezhao(-1) that.createZhezhao(-1)
...@@ -462,7 +462,7 @@ var app = new Vue({ ...@@ -462,7 +462,7 @@ var app = new Vue({
var delIndexNoIndx = -1; var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) { for (var i = 0; i < doneIndexArr.length; i++) {
//console.log("比对的id:" + doneIndexArr[i].IndexID); //console.log("比对的id:" + doneIndexArr[i].IndexID);
if (doneIndexArr[i].IndexID == para.ReportID) { if (doneIndexArr[i].IndexID == para.IndexID) {
delIndexNoIndx = i; delIndexNoIndx = i;
break; break;
} }
......
...@@ -59,9 +59,15 @@ var Api = { ...@@ -59,9 +59,15 @@ var Api = {
var host = context.host; var host = context.host;
data = data || {}; data = data || {};
data.token = context.token; data.token = context.token;
error = error || this.__defaultErrorHandlder; 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', type: 'POST',
data: data, data: data,
dataType: 'json', dataType: 'json',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
(function($){ (function($){
var t = (new Date()).valueOf(); var t = (new Date()).valueOf();
var wgtVer = null, 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", localDir="update",
update_json_android='android.json', update_json_android='android.json',
update_json_ios = 'ios.json', update_json_ios = 'ios.json',
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<div class="mui-content"> <div class="mui-content">
<div id="left" class="left"> <div id="left" class="left">
<div id="left-1" class="left-1"> <div id="left-1" class="left-1">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" @click="back"></a> <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" @click="back"></a>
<label>今日产量:{{number}} </label> <label>今日产量:{{number}} </label>
...@@ -90,7 +89,7 @@ ...@@ -90,7 +89,7 @@
</div> </div>
<div id="theTow" :state="!completeState" v-show="!completeState"> <div id="theTow" :state="!completeState" v-show="!completeState">
<div class="mui-table-view1 mui-table-view-chevron"> <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> <li>
<p><span>指令号:</span><span>{{list.IndexNo}}</span></p> <p><span>指令号:</span><span>{{list.IndexNo}}</span></p>
<p><span>订单号:</span><span>{{list.CustomPO}}</span></p> <p><span>订单号:</span><span>{{list.CustomPO}}</span></p>
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<link rel="stylesheet" type="text/css" href="../dest/css/mui.picker.min.css" /> <link rel="stylesheet" type="text/css" href="../dest/css/mui.picker.min.css" />
<link rel="stylesheet" type="text/css" href="../dest/css/icons-extra.css" /> <link rel="stylesheet" type="text/css" href="../dest/css/icons-extra.css" />
<style> <style>
.altrowstable { .altrowstable {
border-width: 1px; border-width: 1px;
/*padding: 2px;*/ /*padding: 2px;*/
...@@ -27,214 +27,215 @@ ...@@ -27,214 +27,215 @@
<body> <body>
<div id="app" class="mui-off-canvas-wrap mui-draggable"> <div id="app" class="mui-off-canvas-wrap mui-draggable">
<aside id="offCanvasSide" class="mui-off-canvas-right" style="background: white;"> <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="mui-scroll">
<div class="content"> <div class="content">
<label>添加人员:</label> <label>添加人员:</label>
<input type="search" v-model="searchText" placeholder="请输入人员工号或姓名关键字搜索" style="width: 300px;" /> <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> <button type="button" class="mui-btn mui-btn-danger mui-btn-block" @click="searchPerson" style="padding: 5px 20px;width: 100px">搜索</button>
</p> </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> <button id="offCanvasHide" type="button" class="mui-btn mui-btn-danger mui-btn-block" style="padding: 5px 20px;width: 100px">关闭</button>
</p> </p>
</div> </div>
<div class="" style="">人员列表:</div> <div class="" style="">人员列表:</div>
<table class="mui-table"> <table class="mui-table">
<tbody class="mui-table-view-cell"> <tbody class="mui-table-view-cell">
<!-- <td style="text-align: center; border-bottom:1px solid #BBB;">选择</td> --> <!-- <td style="text-align: center; border-bottom:1px solid #BBB;">选择</td> -->
<td style="text-align: center; border-bottom:1px solid #BBB;">姓名</td> <td style="text-align: center; border-bottom:1px solid #BBB;">姓名</td>
<td style="text-align: center; border-bottom:1px solid #BBB;">工种</td> <td style="text-align: center; border-bottom:1px solid #BBB;">工种</td>
<td style="text-align: center; border-bottom:1px solid #BBB;">技能等级</td> <td style="text-align: center; border-bottom:1px solid #BBB;">技能等级</td>
</tbody> </tbody>
</table> </table>
<div class="mui-scroll-wrapper scroll4" style="margin-top: 110px; height: 380px;"> <div class="mui-scroll-wrapper scroll4" style="margin-top: 110px; height: 380px;">
<div class="mui-scroll"> <div class="mui-scroll">
<table class="mui-table"> <table class="mui-table">
<tbody class="mui-table-view-cell"> <tbody class="mui-table-view-cell">
<tr v-for="item ,m in searchPersonList"> <tr v-for="item ,m in searchPersonList">
<td style="text-align: center; border-bottom:1px solid #BBB; width: 300px;" @click="selectPersonList(item)"> <td style="text-align: center; border-bottom:1px solid #BBB; width: 300px;" @click="selectPersonList(item)">
<div class="mui-input-row mui-checkbox mui-left"> <div class="mui-input-row mui-checkbox mui-left">
<label>{{item.UserName}}</label> <label>{{item.UserName}}</label>
<input :id="'personlist_' +item.UserID" class="che2" name="checkbox1" type="checkbox"> <input :id="'personlist_' +item.UserID" class="che2" name="checkbox1" type="checkbox">
</div> </div>
</td> </td>
<td style="text-align: center; border-bottom:1px solid #BBB;">{{item.WorkType}}</td> <td style="text-align: center; border-bottom:1px solid #BBB;">{{item.WorkType}}</td>
<td style="text-align: center; border-bottom:1px solid #BBB;">{{item.SkillLevel}}</td> <td style="text-align: center; border-bottom:1px solid #BBB;">{{item.SkillLevel}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div>
</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>
</div> </div>
</div>
</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>
</div>
</aside> </aside>
<div class="mui-inner-wrap" > <div class="mui-inner-wrap">
<div id="left-1" style="background-color: #007AFF; width: 40%; height: 34px; margin-bottom: 0px;" > <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> <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: white; width: 60px; margin-top: 2px;"
<label style=" text-align: center; margin-left: 70px; color: white; position: relative;top: 7px;">针车排班表 </label> @click="back"></a>
</div> <label style=" text-align: center; margin-left: 70px; color: white; position: relative;top: 7px;">针车排班表 </label>
<div id="left-2" style="width: 40%"> </div>
<div id="left-date" style=" border: solid #B6B6B6 1px; background: #EDF5FA;"> <div id="left-2" style="width: 40%">
<div id="left-date" style=" border: solid #B6B6B6 1px; background: #EDF5FA;">
<button class="mui-icon mui-icon-arrowleft mui-btn-outlined ;" style="border: 0px ; color:royalblue; width: 23%;height: 100%; text-align: left; padding-left:0px ;" <button class="mui-icon mui-icon-arrowleft mui-btn-outlined ;" style="border: 0px ; color:royalblue; width: 23%;height: 100%; text-align: left; padding-left:0px ;"
@click="nextday(-1)"> @click="nextday(-1)">
</button> </button>
<button class="mui-btn-outlined" style="border: 0 ; padding: 0 0 0 6px; width: 54%;height: 36px; margin-left: -4px" <button class="mui-btn-outlined" style="border: 0 ; padding: 0 0 0 6px; width: 54%;height: 36px; margin-left: -4px"
id="selectdate" data-options='{"type":"date"}' name="shipdate" @click="selecttime()">{{dateTime}}</button> id="selectdate" data-options='{"type":"date"}' name="shipdate" @click="selecttime()">{{dateTime}}</button>
<button class="mui-icon mui-icon-arrowright mui-btn-outlined " style=" border: 0px;color:royalblue; width: 20%;height: 36px; padding:0px ; <button class="mui-icon mui-icon-arrowright mui-btn-outlined " style=" border: 0px;color:royalblue; width: 20%;height: 36px; padding:0px ;
text-align: right;padding-top:0px ;" text-align: right;padding-top:0px ;"
@click="nextday(1)"> @click="nextday(1)">
</button> </button>
</div>
<div id="left-detail" class="mui-scroll-wrapper scroll1" style=" border: solid #DAE6EF 1px ;height: 503px; background: white; display: inline-block; width: 40%; top: 68px;">
<div class="mui-scroll">
<ul class="mui-table-view" style="margin-top: 5px;" v-if="itemsLeft.length == 0">
<li class="mui-table-view-cell">无明细数据.请选择其他日期</li>
</ul>
<ul :id="itemsDetail.IndexID" class="mui-table-view detail_" style="margin-top: 5px;" v-for=" itemsDetail ,n in itemsLeft"
@tap="nextPage(itemsDetail,1)">
<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: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.IndexNo}} </p>
<p style="float: left;width: 12%; color: #060606; padding: 0; margin: 0;">班组: </p>
<p style="float: left;width: 32%; color: #060606; padding: 0; margin: 0;">{{itemsDetail.WorkTeam}} </p>
</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;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>
<li style=" padding: 0px 15px;">
<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>
</li>
<li style=" padding: 0px 11px 2px 11px;position: relative; overflow: hidden;">
<p style="float: left;width: 18%; color: #060606; padding: 0; margin: 0;"> 发布时间: </p>
<p style="float: left;width: 40%; color: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.CreateDate}} </p>
<p style="float: left;width: 14%; color: #060606; padding: 0; margin: 0;">发布人: </p>
<p style="float: left;width: 28%; color: #060606; padding: 0; margin: 0;">{{itemsDetail.PlanMan}} </p>
</li>
</ul>
</div>
</div>
</div> </div>
<div id="left-detail" class="mui-scroll-wrapper scroll1" style=" border: solid #DAE6EF 1px ;height: 503px; background: white; display: inline-block; width: 40%; top: 68px;"> <div id="right " class="mui-pull-right " style=" width: 60%; display: inline-block; position: relative; top: -70px ; ">
<div class="mui-scroll"> <div id="right-1" :style="sty2" style="margin-top: -2px;">
<ul class="mui-table-view" style="margin-top: 5px;" v-if="itemsLeft.length == 0">
<li class="mui-table-view-cell">无明细数据.请选择其他日期</li> <table class="mui-table" style="background: #9BD3F6; ">
</ul> <tbody class="mui-table-view-cell">
<ul :id="itemsDetail.IndexID" class="mui-table-view detail_" style="margin-top: 5px;" v-for=" itemsDetail ,n in itemsLeft" <tr>
@tap="nextPage(itemsDetail,1)"> <td style="text-align: center; width: 25%;">
<li style=" padding: 0px 15px;"> <div class="mui-input-row mui-checkbox mui-left" @click="selectAll">
<p style="float: left;width: 16%; color: #060606; padding: 0; margin: 0;"> 指令号: </p> <label style="padding:8px 0px 8px 40px ;">全选</label>
<p style="float: left;width: 40%; color: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.IndexNo}} </p> <input id="cheAll" name="checkbox1" type="checkbox">
<p style="float: left;width: 12%; color: #060606; padding: 0; margin: 0;">班组: </p> </div>
<p style="float: left;width: 32%; color: #060606; padding: 0; margin: 0;">{{itemsDetail.WorkTeam}} </p> </td>
</li> <td style="text-align: center; width: 35%;">工序</td>
<li style=" padding: 0px 15px;"> <td style="text-align: center; width: 15%;">数量</td>
<p style="float: left;width: 16%; color: #060606; padding: 0; margin: 0;"> 货号: </p> <td style="text-align: center; width: 25%;">人员</td>
<p style="float: left;width: 40%; color: #007AFF; padding: 0; margin: 0;">&nbsp;{{itemsDetail.StyleCode}} </p> </tr>
<p style="float: left;width: 14%; color: #060606; padding: 0; margin: 0;">数量: </p> </tbody>
<p style="float: left;width: 28%; color: red; padding: 0; margin: 0;">{{itemsDetail.Qty}} </p> </table>
</li>
<li style=" padding: 0px 15px;"> <div class="mui-scroll-wrapper scroll2" style=" margin-top: 32px ; height: 465px; background: white;">
<p style="float: left;width: 18%; color: #060606; padding: 0; margin: 0;"> 计划时间: </p> <div class="mui-scroll">
<p style="float: left;width: 32%; color: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.PlanDate}} </p> <!--这里放置真实显示的DOM内容-->
<p style="float: left;width: 18%; color: #060606; padding: 0; margin: 0;"> 完成时间: </p> <table class="mui-table">
<p style="float: left;width: 32%; color: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.OrderDeliveryTime}} </p> <tbody class="mui-table-view-cell">
<tr v-for="item2 ,m in itemsData2">
</li> <td class="altrowstable" style="text-align: center; width: 20%;">
<li style=" padding: 0px 11px 2px 11px;position: relative; overflow: hidden;"> <div class="mui-input-row mui-checkbox mui-left">
<p style="float: left;width: 18%; color: #060606; padding: 0; margin: 0;"> 发布时间: </p> <label>&nbsp;</label>
<p style="float: left;width: 40%; color: #060606; padding: 0; margin: 0;">&nbsp;{{itemsDetail.CreateDate}} </p> <input :id="item2.IEID" class="che" name="checkbox1" type="checkbox" @click="selectCheck()">
<p style="float: left;width: 14%; color: #060606; padding: 0; margin: 0;">发布人: </p> </div>
<p style="float: left;width: 28%; color: #060606; padding: 0; margin: 0;">{{itemsDetail.PlanMan}} </p> </td>
</li> <td class="altrowstable" style="text-align: center; width: 40%;">{{item2.IEName}}</td>
</ul> <td class="altrowstable" style="text-align: center; width: 15%;">{{item2.TotalQty}}</td>
<td class="altrowstable" style="text-align: center; width: 25%;">
<a @tap="selectPerson(item2)" v-if="item2.Workers.length == 0">
<span class="mui-icon-extra mui-icon-extra-addpeople"></span>
</a>
<a @tap="selectPerson(item2)" v-else>
<label v-for="k in item2.Workers"> {{k.UserName}}:{{k.Qty}}</label>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
</div>
<div id="right " class="mui-pull-right " style=" width: 60%; display: inline-block; position: relative; top: -70px ; ">
<div id="right-1" :style="sty2" style="margin-top: -2px;">
<table class="mui-table" style="background: #9BD3F6; "> <div id="right-dis " class="mui-pull-right " :style="sty1" style=" width: 60%; position: relative; top: -70px; background: white; ">
<table class="mui-table" style="background: white;">
<tbody class="mui-table-view-cell"> <tbody class="mui-table-view-cell">
<tr> <tr style="height: 30px; ">
<td style="text-align: center; width: 25%;"> <td style="text-align: center; border-bottom:1px solid #BBB; width: 400px;">
<div class="mui-input-row mui-checkbox mui-left" @click="selectAll"> 姓名
<label style="padding:8px 0px 8px 40px ;">全选</label> </td>
<input id="cheAll" name="checkbox1" type="checkbox"> <td style="text-align: center; border-bottom:1px solid #BBB;">
</div> 数量
</td>
<td style="text-align: center; border-bottom:1px solid #BBB; ">
<button id="offCanvasShow" type="button" class="mui-btn mui-btn-blue mui-btn-outlined">借调人员</button>
</td> </td>
<td style="text-align: center; width: 35%;">工序</td>
<td style="text-align: center; width: 15%;">数量</td>
<td style="text-align: center; width: 25%;">人员</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!-- <button id="offCanvasShow" type="button" class="mui-btn mui-btn-primary mui-btn-block" style="border: solid red 1px; padding: 5px;" >
<div class="mui-scroll-wrapper scroll2" style=" margin-top: 32px ; height: 465px; background: white;"> 显示侧滑菜单
</button> -->
<div class="mui-scroll-wrapper scroll3" style="top: 34px; width: 100%; height: 460px; background: white;">
<div class="mui-scroll"> <div class="mui-scroll">
<!--这里放置真实显示的DOM内容--> <!--这里放置真实显示的DOM内容-->
<table class="mui-table"> <div id='list'>
<tbody class="mui-table-view-cell"> <table class="mui-table">
<tr v-for="item2 ,m in itemsData2"> <tbody class="mui-table-view-cell">
<td class="altrowstable" style="text-align: center; width: 20%;"> <tr v-for="item ,m in PersonList">
<div class="mui-input-row mui-checkbox mui-left"> <td style="text-align: center; border-bottom:1px solid #BBB; width: 300px;" @click="selectChe(item)">
<label>&nbsp;</label> <div class="mui-input-row mui-checkbox mui-left">
<input :id="item2.IEID" class="che" name="checkbox1" type="checkbox" @click="selectCheck()"> <label>{{item.UserName}}</label>
</div> <input :id="item.UserID" class="che" name="checkbox1" type="checkbox">
</td> </div>
<td class="altrowstable" style="text-align: center; width: 40%;">{{item2.IEName}}</td> </td>
<td class="altrowstable" style="text-align: center; width: 15%;">{{item2.TotalQty}}</td> <td :id="'num_' + item.UserID " style="text-align: center; border-bottom:1px solid #BBB;">0</td>
<td class="altrowstable" style="text-align: center; width: 25%;"> </tr>
<a @tap="selectPerson(item2)" v-if="item2.Workers.length == 0"> </tbody>
<span class="mui-icon-extra mui-icon-extra-addpeople"></span> </table>
</a> </div>
<a @tap="selectPerson(item2)" v-else>
<label v-for="k in item2.Workers"> {{k.UserName}}:{{k.Qty}}</label>
</a>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
</div> <!-- off-canvas backdrop -->
<div class="mui-off-canvas-backdrop"></div>
<div id="right-dis " class="mui-pull-right " :style="sty1" style=" width: 60%; position: relative; top: -70px; background: white; "> <div id="right-2" style="position: absolute; bottom: 1px ; right: 1px; ">
<table class="mui-table" style="background: white;"> <button type="button" class="mui-btn mui-btn-blue " style=" width: 150px; height: 70px;" @click="sop">SOP</button>
<tbody class="mui-table-view-cell"> <button type="button" class="mui-btn mui-btn-blue " :disabled="selectPL" style="width:150px;height: 70px; " @click="selectPersonAll">批量选员</button>
<tr style="height: 30px; "> <button id="submit" type="button" class="mui-btn mui-btn-blue " style=" width: 150px; height: 70px;" @click="submit">提交</button>
<td style="text-align: center; border-bottom:1px solid #BBB; width: 400px;">
姓名
</td>
<td style="text-align: center; border-bottom:1px solid #BBB;">
数量
</td>
<td style="text-align: center; border-bottom:1px solid #BBB; ">
<button id="offCanvasShow" type="button" class="mui-btn mui-btn-blue mui-btn-outlined">借调人员</button>
</td>
</tr>
</tbody>
</table>
<!-- <button id="offCanvasShow" type="button" class="mui-btn mui-btn-primary mui-btn-block" style="border: solid red 1px; padding: 5px;" >
显示侧滑菜单
</button> -->
<div class="mui-scroll-wrapper scroll3" style="top: 34px; width: 100%; height: 460px; background: white;">
<div class="mui-scroll">
<!--这里放置真实显示的DOM内容-->
<div id='list'>
<table class="mui-table">
<tbody class="mui-table-view-cell">
<tr v-for="item ,m in PersonList">
<td style="text-align: center; border-bottom:1px solid #BBB; width: 300px;" @click="selectChe(item)">
<div class="mui-input-row mui-checkbox mui-left">
<label>{{item.UserName}}</label>
<input :id="item.UserID" class="che" name="checkbox1" type="checkbox">
</div>
</td>
<td :id="'num_' + item.UserID " style="text-align: center; border-bottom:1px solid #BBB;">0</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
<!-- 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> </div>
<script src="../dest/js/mui.min.js"></script> <script src="../dest/js/mui.min.js"></script>
<script src="../dest/js/vue.min.js"></script> <script src="../dest/js/vue.min.js"></script>
...@@ -252,9 +253,9 @@ ...@@ -252,9 +253,9 @@
plus.screen.lockOrientation("landscape-primary") //横屏 plus.screen.lockOrientation("landscape-primary") //横屏
app.init(); app.init();
} }
var app = new Vue({ var app = new Vue({
el: '#app', el: '#app',
data: { data: {
...@@ -276,11 +277,11 @@ ...@@ -276,11 +277,11 @@
sty2: "", sty2: "",
Workers: [], Workers: [],
finishDis: 0, finishDis: 0,
searchText:"", searchText: "",
searchPersonList :[], searchPersonList: [],
searchPersonListAfter :[], searchPersonListAfter: [],
}, },
computed: { computed: {
display_: function() { display_: function() {
...@@ -295,74 +296,73 @@ ...@@ -295,74 +296,73 @@
return null return null
} }
}, },
submit2_:function(){ submit2_: function() {
if(this.searchPersonListAfter.length ==0) { if (this.searchPersonListAfter.length == 0) {
return "disabled"; return "disabled";
} } else {
else{ return null;
return null ; }
}
}, },
}, },
methods: { methods: {
init: function() { init: function() {
mui.init({ mui.init({
swipeBack: false, swipeBack: false,
}); });
mui('.mui-scroll-wrapper').scroll({ mui('.mui-scroll-wrapper').scroll({
bounce: false, bounce: false,
indicators: true, //是否显示滚动条 indicators: true, //是否显示滚动条
scrollX: false, //是否横向滚动 scrollX: false, //是否横向滚动
}); });
var offCanvasWrapper = mui('#app'); var offCanvasWrapper = mui('#app');
var offCanvasSide = document.getElementById("offCanvasSide");
var moveTogether = false;
var classList = offCanvasWrapper[0].classList;
//变换侧滑动画移动效果;
document.getElementById('offCanvasShow').addEventListener('tap', function() {
offCanvasWrapper.offCanvas('show');
});
document.getElementById('offCanvasHide').addEventListener('click', function() {
offCanvasWrapper.offCanvas('close');
});
var offCanvasSide = document.getElementById("offCanvasSide");
var moveTogether = false;
var classList = offCanvasWrapper[0].classList;
//变换侧滑动画移动效果;
document.getElementById('offCanvasShow').addEventListener('tap', function() {
offCanvasWrapper.offCanvas('show');
});
document.getElementById('offCanvasHide').addEventListener('click', function() {
offCanvasWrapper.offCanvas('close');
});
this.dateTime = moment().format().substring(0, 10); this.dateTime = moment().format().substring(0, 10);
this.selectDetail = mui.currentWebview.nextDetail; this.selectDetail = mui.currentWebview.nextDetail;
if (this.selectDetail === undefined) { if (this.selectDetail === undefined) {
this.getData(); this.getData();
} else { } else {
// var that = this; // var that = this;
// this.itemsLeft = []; // this.itemsLeft = [];
// this.itemsLeft.push(this.selectDetail); // this.itemsLeft.push(this.selectDetail);
this.nextPage2(this.selectDetail,0) this.nextPage2(this.selectDetail, 0)
// setTimeout(function() { // setTimeout(function() {
// that.nextPage(that.itemsLeft[0], 1) // that.nextPage(that.itemsLeft[0], 1)
// }, 100) // }, 100)
} }
}, },
show:function(){ show: function() {
offCanvasWrapper.offCanvas('show'); offCanvasWrapper.offCanvas('show');
}, },
getData: function() { getData: function() {
...@@ -371,9 +371,9 @@ ...@@ -371,9 +371,9 @@
TaskType: 1, TaskType: 1,
Date: this.dateTime + " 00:00:00", Date: this.dateTime + " 00:00:00",
} }
Api.post('/api/vMES/TaskWork/TaskList', para, function(e) { Api.post('/api/vMES/TaskWork/TaskList', para, function(e) {
that.itemsLeft = e.items that.itemsLeft = e.items
if (e.items.length > 0) { if (e.items.length > 0) {
setTimeout(function() { setTimeout(function() {
...@@ -383,33 +383,33 @@ ...@@ -383,33 +383,33 @@
} }
}) })
}, },
searchPerson:function(){ searchPerson: function() {
var that = this; var that = this;
var para = { var para = {
text: this.searchText text: this.searchText
} }
Api.post('/api/vMES/TaskWork/SearchWorker', para, function(e) { Api.post('/api/vMES/TaskWork/SearchWorker', para, function(e) {
if (e.success) { if (e.success) {
that.searchPersonList = e.items; that.searchPersonList = e.items;
console.log("befor"+JSON.stringify(that.searchPersonList)) console.log("befor" + JSON.stringify(that.searchPersonList))
for (var i = that.searchPersonList.length -1; i >=0; i--) { for (var i = that.searchPersonList.length - 1; i >= 0; i--) {
for (var j = 0; j < that.PersonList.length; j++) { for (var j = 0; j < that.PersonList.length; j++) {
if(that.searchPersonList[i].UserID == that.PersonList[j].UserID){ if (that.searchPersonList[i].UserID == that.PersonList[j].UserID) {
that.searchPersonList.splice(i,1); that.searchPersonList.splice(i, 1);
break; 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)) mui.toast(JSON.stringify(bbb.message))
}) })
...@@ -441,19 +441,19 @@ ...@@ -441,19 +441,19 @@
}, },
getdataUser: function(o) { getdataUser: function(o) {
console.log("getdataUser" + this.IndexID); console.log("getdataUser" + this.IndexID);
mui('.scroll3').scroll().scrollTo(0, 0, 100); mui('.scroll3').scroll().scrollTo(0, 0, 100);
mui('.scroll4').scroll().scrollTo(0, 0, 100); mui('.scroll4').scroll().scrollTo(0, 0, 100);
var para = { var para = {
// WorkSectionID: 0, // WorkSectionID: 0,
WorkTeamID: this.WorkTeamID, WorkTeamID: this.WorkTeamID,
IndexID: this.IndexID IndexID: this.IndexID
}; };
var that = this; var that = this;
console.log(JSON.stringify(para)); console.log(JSON.stringify(para));
Api.post('/api/vMES/TaskWork/TaskWorker', para, function(e) { Api.post('/api/vMES/TaskWork/TaskWorker', para, function(e) {
if (e.success) { if (e.success) {
...@@ -469,66 +469,72 @@ ...@@ -469,66 +469,72 @@
}); });
}, },
submit_2:function(){ submit_2: function() {
this.searchPersonListAfter this.searchPersonListAfter
if( this.searchPersonListAfter.length == 0){ if (this.searchPersonListAfter.length == 0) {
this.playVoice("sb.mp3"); this.playVoice("sb.mp3");
mui.toast("请勾选人员"); mui.toast("请勾选人员");
return; return;
} }
if(this.PersonList.length == 0){ if (this.PersonList.length == 0) {
this.playVoice("sb.mp3"); this.playVoice("sb.mp3");
mui.toast("请先进入人员选择界面"); mui.toast("请先进入人员选择界面");
return; return;
} }
for (var i = 0; i < this.searchPersonListAfter.length; i++) { for (var i = 0; i < this.searchPersonListAfter.length; i++) {
console.log("personlist;;;" + JSON.stringify(this.PersonList)) 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.UserID = this.searchPersonListAfter[i].UserID;
temp.Code = this.searchPersonListAfter[i].Code; temp.Code = this.searchPersonListAfter[i].Code;
temp.UserName = this.searchPersonListAfter[i].UserName; temp.UserName = this.searchPersonListAfter[i].UserName;
temp.WorkType = this.searchPersonListAfter[i].WorkType; temp.WorkType = this.searchPersonListAfter[i].WorkType;
this.PersonList.push(temp); this.PersonList.push(temp);
console.log("personlist;;;after" + JSON.stringify(this.PersonList)); console.log("personlist;;;after" + JSON.stringify(this.PersonList));
for (var j = 0; j < this.searchPersonList.length; j++) { for (var j = 0; j < this.searchPersonList.length; j++) {
if(this.searchPersonList[j].UserID == this.searchPersonListAfter[i].UserID){ if (this.searchPersonList[j].UserID == this.searchPersonListAfter[i].UserID) {
this.searchPersonList.splice(j,1); this.searchPersonList.splice(j, 1);
} }
} }
} }
document.getElementById('offCanvasHide').click(); document.getElementById('offCanvasHide').click();
var that = this; var that = this;
setTimeout(function(){ setTimeout(function() {
for (var i = 0; i < that.searchPersonListAfter.length; i++) { 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.selectList2.push(that.searchPersonListAfter[i].UserID)
} }
that.searchPersonListAfter =[]; that.searchPersonListAfter = [];
that.searchPersonList =[]; that.searchPersonList = [];
},200) }, 200)
}, },
nextPage: function(o, kk) { nextPage: function(o, kk) {
console.log("nextPage"); console.log("nextPage");
this.PersonList=[]; this.PersonList = [];
this.selectList2 =[]; this.selectList2 = [];
this.searchPersonList =[]; this.searchPersonList = [];
this.searchPersonListAfter =[]; this.searchPersonListAfter = [];
var che = document.getElementsByClassName("che"); var che = document.getElementsByClassName("che");
for (var j = 0; j < che.length; j++) { for (var j = 0; j < che.length; j++) {
che[j].checked = false; che[j].checked = false;
} }
this.sty1 = "display: none"; this.sty1 = "display: none";
this.sty2 = ""; this.sty2 = "";
var sub = document.getElementById("submit") var sub = document.getElementById("submit")
...@@ -543,29 +549,29 @@ ...@@ -543,29 +549,29 @@
IndexID: o.IndexID IndexID: o.IndexID
} }
Api.post('/api/vMES/TaskWork/Task', para, function(e) { Api.post('/api/vMES/TaskWork/Task', para, function(e) {
that.WorkTeamID = e.data.Main.WorkTeamID; that.WorkTeamID = e.data.Main.WorkTeamID;
// that.itemsLeft.push(e.data.Main ) // that.itemsLeft.push(e.data.Main )
that.itemsData2 = e.data.IETask; that.itemsData2 = e.data.IETask;
that.TotalQty = e.data.Main.Qty; that.TotalQty = e.data.Main.Qty;
}) })
mui('.scroll2').scroll().scrollTo(0, 0, 100); mui('.scroll2').scroll().scrollTo(0, 0, 100);
mui('.scroll3').scroll().scrollTo(0, 0, 100); mui('.scroll3').scroll().scrollTo(0, 0, 100);
mui('.scroll4').scroll().scrollTo(0, 0, 100); mui('.scroll4').scroll().scrollTo(0, 0, 100);
}, },
nextPage2: function(o, kk) { nextPage2: function(o, kk) {
var che = document.getElementsByClassName("che"); var che = document.getElementsByClassName("che");
for (var j = 0; j < che.length; j++) { for (var j = 0; j < che.length; j++) {
che[j].checked = false; che[j].checked = false;
} }
this.PersonList=[]; this.PersonList = [];
this.selectList2 =[]; this.selectList2 = [];
this.searchPersonList =[]; this.searchPersonList = [];
this.searchPersonListAfter =[]; this.searchPersonListAfter = [];
this.sty1 = "display: none"; this.sty1 = "display: none";
this.sty2 = ""; this.sty2 = "";
var sub = document.getElementById("submit") var sub = document.getElementById("submit")
...@@ -583,7 +589,7 @@ ...@@ -583,7 +589,7 @@
console.log(JSON.stringify(e)) console.log(JSON.stringify(e))
that.WorkTeamID = e.data.Main.WorkTeamID; that.WorkTeamID = e.data.Main.WorkTeamID;
that.itemsLeft.push(e.data.Main ) that.itemsLeft.push(e.data.Main)
that.itemsData2 = e.data.IETask; that.itemsData2 = e.data.IETask;
that.TotalQty = e.data.Main.Qty; that.TotalQty = e.data.Main.Qty;
}) })
...@@ -604,7 +610,7 @@ ...@@ -604,7 +610,7 @@
che[j].checked = true; che[j].checked = true;
} }
} }
} }
} }
}, },
selectPerson: function(obj) { selectPerson: function(obj) {
...@@ -628,7 +634,7 @@ ...@@ -628,7 +634,7 @@
this.Workers = []; this.Workers = [];
var sub = document.getElementById("submit") var sub = document.getElementById("submit")
sub.innerHTML = "保存" sub.innerHTML = "保存"
this.selectif_PL =0; this.selectif_PL = 0;
this.getdataUser() this.getdataUser()
}, },
...@@ -674,29 +680,28 @@ ...@@ -674,29 +680,28 @@
}, },
selectPersonList: function(obj) { selectPersonList: function(obj) {
var ss = document.getElementById( "personlist_" + obj.UserID) var ss = document.getElementById("personlist_" + obj.UserID)
console.log(ss) console.log(ss)
if (ss.checked) { if (ss.checked) {
this.searchPersonListAfter.push(obj) this.searchPersonListAfter.push(obj)
console.log("add ;;;" + JSON.stringify( this.searchPersonListAfter)); console.log("add ;;;" + JSON.stringify(this.searchPersonListAfter));
} } else {
else{ for (var i = 0; i < this.searchPersonListAfter.length; i++) {
for (var i = 0; i < this.searchPersonListAfter.length; i++) { if (this.searchPersonListAfter[i].UserID == obj.UserID) {
if(this.searchPersonListAfter[i].UserID == obj.UserID){ this.searchPersonListAfter.splice(i, 1);
this.searchPersonListAfter.splice(i,1) ; console.log("move ;;;" + JSON.stringify(this.searchPersonListAfter));
console.log("move ;;;" + JSON.stringify( this.searchPersonListAfter)); return;
return ;
}
} }
} }
}
},
},
submit_person: function() { submit_person: function() {
var tempPara = []; var tempPara = [];
if (this.selectList2.length > 0) { if (this.selectList2.length > 0) {
for (var i = 0; i < this.selectList.length; i++) { for (var i = 0; i < this.selectList.length; i++) {
...@@ -717,7 +722,7 @@ ...@@ -717,7 +722,7 @@
mui.toast("请选择派工人员"); mui.toast("请选择派工人员");
return; return;
} }
this.selectList2 =[]; this.selectList2 = [];
var that = this; var that = this;
var para = { var para = {
IndexID: this.IndexID, IndexID: this.IndexID,
...@@ -746,11 +751,11 @@ ...@@ -746,11 +751,11 @@
}) })
}, },
sop: function() { sop: function() {
this.getLink(); this.getLink();
}, },
getLink: function() { getLink: function() {
var that = this; var that = this;
var para = { var para = {
ReportType: 0, ReportType: 0,
...@@ -869,8 +874,6 @@ ...@@ -869,8 +874,6 @@
if (e.success) { if (e.success) {
that.playVoice("cg.mp3"); that.playVoice("cg.mp3");
mui.toast("提交成功"); mui.toast("提交成功");
} else { } else {
that.playVoice("sb.mp3"); that.playVoice("sb.mp3");
mui.toast("提交失败: " + e.message); mui.toast("提交失败: " + e.message);
...@@ -884,22 +887,22 @@ ...@@ -884,22 +887,22 @@
} }
}, },
playVoice:function(filename){ playVoice: function(filename) {
if ( plus.audio == undefined ) { if (plus.audio == undefined) {
} else{ } else {
// 播放操作 // 播放操作
var p = plus.audio.createPlayer("_www/dest/voice/"+ filename); var p = plus.audio.createPlayer("_www/dest/voice/" + filename);
p.play( function () { p.play(function() {
//alert( "Audio play success!" ); //alert( "Audio play success!" );
}, function ( e ) { }, function(e) {
//alert( "Audio play failed: " + e.message ); //alert( "Audio play failed: " + e.message );
}); });
} }
}, },
back: function() { back: function() {
mui.back(); mui.back();
}, },
......
...@@ -75,30 +75,30 @@ ...@@ -75,30 +75,30 @@
</a> </a>
</div> </div>
<div class="application-box" types="90032"> <div class="application-box" types="90032">
<a ids="7" href="javascript:;"> <a ids="7" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/zcsb.png" alt="针车实报" /></div> <div class="application-img"><img src="../dest/img/application/zcsb.png" alt="针车实报" /></div>
<h3 class="application-tit" title="针车实报V2">针车实报</h3> <h3 class="application-tit" title="针车实报V2">针车实报</h3>
</a> </a>
</div> </div>
<div class="application-box" types="90033"> <div class="application-box" types="90033">
<a ids="8" href="javascript:;"> <a ids="8" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/zcsb.png" alt="成型实报" /></div> <div class="application-img"><img src="../dest/img/application/zcsb.png" alt="成型实报" /></div>
<h3 class="application-tit" title="成型实报V2">成型实报</h3> <h3 class="application-tit" title="成型实报V2">成型实报</h3>
</a> </a>
</div> </div>
<div class="application-box" types="90028"> <div class="application-box" types="90028">
<a ids="4" href="javascript:;"> <a ids="4" href="javascript:;">
<div class="application-img"><img src="../dest/img/zc.png" alt="工序交接-针车" /></div> <div class="application-img"><img src="../dest/img/zc.png" alt="工序交接-针车" /></div>
<h3 class="application-tit" title="工序交接-针车">裁断配套确认</h3> <h3 class="application-tit" title="工序交接-针车">裁断配套确认</h3>
</a> </a>
</div> </div>
<div class="application-box" types="90029"> <div class="application-box" types="90029">
<a ids="3" href="javascript:;"> <a ids="3" href="javascript:;">
<div class="application-img"><img src="../dest/img/cx.png" alt="工序交接-成型" /></div> <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> </a>
</div> </div>
<div class="application-box" types="90030"> <div class="application-box" types="90030">
...@@ -113,8 +113,12 @@ ...@@ -113,8 +113,12 @@
<h3 class="application-tit" title="针车排班表">针车排班表</h3> <h3 class="application-tit" title="针车排班表">针车排班表</h3>
</a> </a>
</div> </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="设置"> <!-- <div class="application-box" types="设置">
<a ids="999" href="javascript:;"> <a ids="999" href="javascript:;">
<div class="application-img"><img src="../dest/img/sz.png" alt="设置" /></div> <div class="application-img"><img src="../dest/img/sz.png" alt="设置" /></div>
...@@ -145,29 +149,31 @@ ...@@ -145,29 +149,31 @@
})(mui, document) })(mui, document)
} }
function init() { function init() {
mui.init(); mui.init();
var lisy = Dom.getById('lialist'); var lisy = Dom.getById('lialist');
var isds = lisy.getElementsByClassName('application-box'); var isds = lisy.getElementsByClassName('application-box');
var ucond = Dom.getById('centicon'); var ucond = Dom.getById('centicon');
var pages = ['Needlecarreport_new', 'Cutting', "Forming", "NeedleMatch", "NeedlecarHandover", var pages = ['Needlecarreport_new', 'Cutting', "Forming", "NeedleMatch", "NeedlecarHandover",
"MyWork","NeedlecarPBB","NeedlecarreportV2","FormingV2"]; "MyWork", "NeedlecarPBB", "NeedlecarreportV2", "FormingV2","NeedleDispatch"
];
//var tits = ['色卡档案', '样品企划', '样品客户意见', '款式图片档案', '下单管理', '生产进度表', '消息提醒', '业务审批', '订货主场','针车实报','设置']; //var tits = ['色卡档案', '样品企划', '样品客户意见', '款式图片档案', '下单管理', '生产进度表', '消息提醒', '业务审批', '订货主场','针车实报','设置'];
var lab1 = document.getElementsByTagName("a"); var lab1 = document.getElementsByTagName("a");
function onGetDataSuccess(e) { function onGetDataSuccess(e) {
//console.log("GetModuleList::" + JSON.stringify(e)) //console.log("GetModuleList::" + JSON.stringify(e))
var isSuccess = e.success; var isSuccess = e.success;
if (isSuccess) { if (isSuccess) {
var items = e.items; var items = e.items;
console.log(JSON.stringify(items)) //console.log(JSON.stringify(items))
//手动在结尾添加了一个设置项目 //手动在结尾添加了一个设置项目
// items.push({ // items.push({
// Code: "设置" // Code: "设置"
// }); // });
//console.log(JSON.stringify(items)); console.log(JSON.stringify(items));
for (var i = 0; i < items.length; i++) { for (var i = 0; i < items.length; i++) {
for (var j = 0; j < isds.length; j++) { for (var j = 0; j < isds.length; j++) {
...@@ -192,7 +198,7 @@ ...@@ -192,7 +198,7 @@
} }
} }
//console.log("GetModuleList::begin" ) //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() { mui(".application-box").on('tap', 'a', function() {
......
{ {
"@platforms" : [ "android", "iPhone", "iPad" ], "@platforms" : [ "android", "iPhone", "iPad" ],
"id" : "H544710A8", /*应用的标识,创建应用时自动生成,勿手动修改*/ "id" : "H544710A8T", /*应用的标识,创建应用时自动生成,勿手动修改*/
"name" : "飞天兔MES", /*应用名称,程序桌面图标名称*/ "name" : "飞天兔MES_test", /*应用名称,程序桌面图标名称*/
"version" : { "version" : {
"name" : "1.0.1.2", /*应用版本名称*/ "name" : "1.0.1.16", /*应用版本名称*/
"code" : 338 "code" : 338
}, },
"description" : "飞天兔MES平板版", /*应用描述信息*/ "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