|
@@ -31,7 +31,6 @@ function getExprInfo (field) {
|
|
|
*/
|
|
|
function customColDisplay () {
|
|
|
const defaultSetting = [
|
|
|
- { title: '签约合同', fields: ['deal_qty', 'deal_tp'], visible: true },
|
|
|
{ title: '本期计量合同', fields: ['contract_qty', 'contract_tp'], visible: true },
|
|
|
{ title: '本期数量变更', fields: ['qc_qty', 'qc_tp', 'qc_bgl'], visible: true },
|
|
|
{ title: '本期完成计量', fields: ['gather_qty', 'gather_tp'], visible: true },
|
|
@@ -43,11 +42,18 @@ function customColDisplay () {
|
|
|
{ title: '备注', fields: ['memo'], visible: true },
|
|
|
{ title: '总额计量', fields: ['is_tp'], visible: true},
|
|
|
];
|
|
|
- if (checkTzMeasureType()) {
|
|
|
- defaultSetting.splice(0, 1);
|
|
|
+ if (!checkTzMeasureType()) {
|
|
|
+ defaultSetting.unshift({ title: '台账', fields: ['quantity', 'total_price'], visible: true}, { title: '签约合同', fields: ['deal_qty', 'deal_tp'], visible: true });
|
|
|
}
|
|
|
const settingStr = Cookies.get(ckColSetting);
|
|
|
- return settingStr ? JSON.parse(settingStr) : defaultSetting;
|
|
|
+ if (settingStr) {
|
|
|
+ const customSetting = JSON.parse(settingStr);
|
|
|
+ for (const ds of defaultSetting) {
|
|
|
+ const cs = customSetting.find(x => {return x.title === ds.title});
|
|
|
+ if (cs) ds.visible = cs.visible;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return defaultSetting;
|
|
|
}
|
|
|
|
|
|
/**
|