Compare commits
No commits in common. "733ef4c15ed1dd972eea8e40e3f4dc8da0bc93dc" and "5626596d32ad9c5e0d28fd57ce2f39891fbf9ca6" have entirely different histories.
733ef4c15e
...
5626596d32
|
|
@ -966,30 +966,41 @@ export default {
|
||||||
},
|
},
|
||||||
getMaterialList() {
|
getMaterialList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {
|
this.$API.mtm.material.list
|
||||||
query: {
|
.req({ page: 0, type: 20, count__gte: 1 })
|
||||||
"select_dept": "",
|
.then((res) => {
|
||||||
"groupby_dept": "",
|
let data = [];
|
||||||
"material_types": "20",
|
if (res.length > 0) {
|
||||||
"select_material": "material.name as material_name",
|
res.forEach((item) => {
|
||||||
"groupby_material": "material.name",
|
|
||||||
"select_material_name": "",
|
|
||||||
"groupby_material_name": ""
|
|
||||||
}
|
|
||||||
};
|
|
||||||
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
|
|
||||||
let data = [];
|
|
||||||
let list = res.data2.ds0;
|
|
||||||
if (list.length > 0) {
|
|
||||||
list.forEach((item) => {
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.material_name ;
|
let colorText = "";
|
||||||
|
if (
|
||||||
|
item.count_safe !== null &&
|
||||||
|
item.count_safe < item.count
|
||||||
|
) {
|
||||||
|
colorText =
|
||||||
|
'<span style="color:red;">' +
|
||||||
|
item.count +
|
||||||
|
"</span>";
|
||||||
|
} else {
|
||||||
|
colorText =
|
||||||
|
'<span style="color:green;">' +
|
||||||
|
item.count +
|
||||||
|
"</span>";
|
||||||
|
}
|
||||||
|
arr[0] =
|
||||||
|
item.name +
|
||||||
|
"|" +
|
||||||
|
item.specification +
|
||||||
|
"|" +
|
||||||
|
item.model;
|
||||||
arr[1] = item.count;
|
arr[1] = item.count;
|
||||||
data.push(arr);
|
data.push(arr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
that.taskBoard.data = data;
|
that.taskBoard.data = data;
|
||||||
})
|
// console.log('getMaterialList', data)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
showTime() {
|
showTime() {
|
||||||
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");
|
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue