|
|
|
|
@ -133,11 +133,36 @@ export default {
|
|
|
|
|
[]
|
|
|
|
|
]);
|
|
|
|
|
const cellStyle = function (row, column, rowIndex, columnIndex) {
|
|
|
|
|
let back = column.table == "TFS_ViewMaterial" ? "background:rgb(246, 246, 246)" : ""
|
|
|
|
|
let back = column.table == "TFS_ViewMaterial" ? "background:rgb(246, 246, 246)" : "";
|
|
|
|
|
let info=row["info"];
|
|
|
|
|
debugger
|
|
|
|
|
switch (info[column.key+"Type"]) {
|
|
|
|
|
case "1":
|
|
|
|
|
return document.getElementsByClassName(column.key+"_"+rowIndex+"_"+columnIndex)[0].classList.add("one");
|
|
|
|
|
case "2":
|
|
|
|
|
return document.getElementsByClassName(column.key+"_"+rowIndex+"_"+columnIndex)[0].classList.add("twe");
|
|
|
|
|
case "3":
|
|
|
|
|
return document.getElementsByClassName(column.key+"_"+rowIndex+"_"+columnIndex)[0].classList.add("three");
|
|
|
|
|
case "4":
|
|
|
|
|
return document.getElementsByClassName(column.key+"_"+rowIndex+"_"+columnIndex)[0].classList.add("four");
|
|
|
|
|
}
|
|
|
|
|
return back;
|
|
|
|
|
}
|
|
|
|
|
const cellClassName = function (row, column, rowIndex, columnIndex) {
|
|
|
|
|
return column.cellClass || "";
|
|
|
|
|
debugger
|
|
|
|
|
// let info=row["info"];
|
|
|
|
|
// switch (info[column.key+"Type"]) {
|
|
|
|
|
// case "1":
|
|
|
|
|
// return column.cellClass = column.cellClass + " one";
|
|
|
|
|
// case "2":
|
|
|
|
|
// return column.cellClass = column.cellClass + " twe";
|
|
|
|
|
// case "3":
|
|
|
|
|
// return column.cellClass = column.cellClass + " three";
|
|
|
|
|
// case "4":
|
|
|
|
|
// return column.cellClass = column.cellClass + " four";
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return column.cellClass = column.key+"_"+rowIndex+"_"+columnIndex;
|
|
|
|
|
}
|
|
|
|
|
const inputCodeValue = ref("");
|
|
|
|
|
const inputDescValue = ref("");
|
|
|
|
|
@ -202,6 +227,29 @@ export default {
|
|
|
|
|
teamId: this.dataInfoObj.FTeamID,
|
|
|
|
|
viewType: this.dataInfoObj.FViewType
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let FTpye2IDList=this.getParamValues("FTypeID2",_data.rows);
|
|
|
|
|
|
|
|
|
|
FTpye2IDList=FTpye2IDList.filter(function(value,index,self){
|
|
|
|
|
return self.indexOf(value) === index;
|
|
|
|
|
});
|
|
|
|
|
let TypeInfo={};
|
|
|
|
|
let $thie=this;
|
|
|
|
|
FTpye2IDList.forEach((item, i)=>{
|
|
|
|
|
|
|
|
|
|
// let result = $this.getInfoData({
|
|
|
|
|
// "FDataID": item,
|
|
|
|
|
// "FType": 1
|
|
|
|
|
// }) || null;
|
|
|
|
|
// TypeInfo.push(result);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// let result = await getInfoData({
|
|
|
|
|
// "FDataID": data.FTypeID2,
|
|
|
|
|
// "FType": 1
|
|
|
|
|
// }) || null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let freezingCols = await GetFreezingColumns();
|
|
|
|
|
console.log('_data', _data);
|
|
|
|
|
if (this.dataInfoObj.FViewType == 1 || this.dataInfoObj.FViewType == 10) {
|
|
|
|
|
@ -315,7 +363,6 @@ export default {
|
|
|
|
|
// item.FTypeID2 = fType2?fType2.FName:item.FTypeID2;
|
|
|
|
|
//}
|
|
|
|
|
});
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
|
|
let saveId = this.dataInfoObj.FViewType + "_" + this.dataInfoObj.FID;
|
|
|
|
|
localStorage.setItem('EditView' + saveId, JSON.stringify(_data.rows));
|
|
|
|
|
@ -341,6 +388,7 @@ export default {
|
|
|
|
|
item.FTypeID1 = fType1 ? fType1.FName : item.FTypeID1;
|
|
|
|
|
item.FTypeID2 = fType2 ? fType2.FName : item.FTypeID2;
|
|
|
|
|
}
|
|
|
|
|
item["info"]=_data.infos.find(s => s.FDataID == item.FMaterialID) || null;
|
|
|
|
|
return item;
|
|
|
|
|
});
|
|
|
|
|
this.dataColumn = dataColumn;
|
|
|
|
|
@ -362,8 +410,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
this._changeType(_data.rows[0], 2);
|
|
|
|
|
// this._changeType(_data.rows[0], 2);
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
layer.close(idx);
|
|
|
|
|
}, 500);
|
|
|
|
|
@ -386,6 +433,16 @@ export default {
|
|
|
|
|
// this.setFreezingColumns();
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
getParamValues(name,arr){
|
|
|
|
|
var ret = []
|
|
|
|
|
for (var i = 0, len = arr.length; i < len; i++) {
|
|
|
|
|
if(arr[i][name])
|
|
|
|
|
{
|
|
|
|
|
ret.push(arr[i][name])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return ret
|
|
|
|
|
},
|
|
|
|
|
cancelClick(isRefresh) {
|
|
|
|
|
isRefresh = isRefresh == undefined ? false : isRefresh;
|
|
|
|
|
this.$emit('cancelClick', isRefresh);
|
|
|
|
|
@ -399,7 +456,6 @@ export default {
|
|
|
|
|
"FDataID": data.FTypeID2,
|
|
|
|
|
"FType": 1
|
|
|
|
|
}) || null;
|
|
|
|
|
|
|
|
|
|
if (result != null && result.FID) {
|
|
|
|
|
let col7 = this.dataColumn.filter(s => s.fieldType == 7) || [];
|
|
|
|
|
console.log('this.typeList[0]', this.typeList[0].filter(t => t.FValue == data.FTypeID1)[0]);
|
|
|
|
|
@ -432,7 +488,34 @@ export default {
|
|
|
|
|
if (typeName.indexOf("成品") > 0) {
|
|
|
|
|
data.FViewType = 1
|
|
|
|
|
}
|
|
|
|
|
this.dataList.map(function(item){
|
|
|
|
|
|
|
|
|
|
if(item.FID==data.FID)
|
|
|
|
|
{
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
|
|
item.info=result;
|
|
|
|
|
}
|
|
|
|
|
return item;
|
|
|
|
|
})
|
|
|
|
|
// this.dataColumn.forEach((item,i){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
// for(let key in this.dataList){
|
|
|
|
|
// debugger
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// this.dataList.map(function(item){
|
|
|
|
|
// debugger
|
|
|
|
|
// let list=result.find(s=>s.FDataID==data.FTypeID2)||"";
|
|
|
|
|
|
|
|
|
|
// if(list)
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
this.dataColumn.map(function (item) {
|
|
|
|
|
// let str = result[item.key + "Type"];
|
|
|
|
|
|
|
|
|
|
@ -521,7 +604,6 @@ export default {
|
|
|
|
|
if (updateLog != "") {
|
|
|
|
|
delete updateObj.LogList
|
|
|
|
|
// 发送保存请求
|
|
|
|
|
debugger
|
|
|
|
|
console.log('updateObj', updateObj);
|
|
|
|
|
let _result = await updateBatchById4(updateObj);
|
|
|
|
|
if (_result.Code === 200) {
|
|
|
|
|
|