Compare commits

..

No commits in common. "733ef4c15ed1dd972eea8e40e3f4dc8da0bc93dc" and "5626596d32ad9c5e0d28fd57ce2f39891fbf9ca6" have entirely different histories.

1 changed files with 29 additions and 18 deletions

View File

@ -966,30 +966,41 @@ export default {
},
getMaterialList() {
let that = this;
let obj = {
query: {
"select_dept": "",
"groupby_dept": "",
"material_types": "20",
"select_material": "material.name as material_name",
"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) => {
this.$API.mtm.material.list
.req({ page: 0, type: 20, count__gte: 1 })
.then((res) => {
let data = [];
if (res.length > 0) {
res.forEach((item) => {
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;
data.push(arr);
});
}
that.taskBoard.data = data;
})
// console.log('getMaterialList', data)
});
},
showTime() {
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");