fix:禅道245

This commit is contained in:
shijing 2025-12-18 13:58:08 +08:00
parent 30f677d119
commit d9557dfa7a
1 changed files with 18 additions and 29 deletions

View File

@ -966,41 +966,30 @@ export default {
},
getMaterialList() {
let that = this;
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 = [];
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>";
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": ""
}
arr[0] =
item.name +
"|" +
item.specification +
"|" +
item.model;
};
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 = [];
arr[0] = item.material_name ;
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");