| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- 'use strict';
- /**
- * 合同管理
- *
- * @author ELlisran
- * @date 2019/10/20
- * @version
- */
- // 类型
- const type = {
- expenses: 1,
- income: 2,
- };
- const typeMap = {
- 1: 'expenses',
- 2: 'income',
- };
- const typeName = {
- 1: '支付',
- 2: '回款',
- };
- const colSet = {
- [type.expenses]: [
- { name: '合同类型', field: 'type', fixed: ['alias'], gd: true },
- { name: '甲方', field: 'party_a', fixed: ['alias'], gd: true },
- { name: '乙方', field: 'party_b', fixed: ['alias'], gd: true },
- { name: '累计应付', field: 'yf_price', fixed: ['alias'] },
- { name: '应付进度', field: 'stackedBar', fixed: ['alias'] },
- { name: '累计实付', field: 'sf_price', fixed: ['alias'] },
- { name: '实付进度', field: 'stackedBarSf', fixed: ['alias'] },
- { name: '备注1', field: 'remark1', fixed: [] },
- { name: '备注2', field: 'remark2', fixed: [] },
- { name: '计算1', field: 'calc', fixed: [] },
- { name: '计算2', field: 'calc2', fixed: [] },
- ],
- [type.income]: [
- { name: '合同类型', field: 'type', fixed: ['alias'], gd: true },
- { name: '甲方', field: 'party_a', fixed: ['alias'], gd: true },
- { name: '乙方', field: 'party_b', fixed: ['alias'], gd: true },
- { name: '累计应回', field: 'yf_price', fixed: ['alias'] },
- { name: '应回进度', field: 'stackedBar', fixed: ['alias'] },
- { name: '累计实回', field: 'sf_price', fixed: ['alias'] },
- { name: '实回进度', field: 'stackedBarSf', fixed: ['alias'] },
- { name: '备注1', field: 'remark1', fixed: [] },
- { name: '备注2', field: 'remark2', fixed: [] },
- { name: '计算1', field: 'calc', fixed: [] },
- { name: '计算2', field: 'calc2', fixed: [] },
- ],
- };
- const defaultColSet = {
- [type.expenses]: [
- { field: 'type', show: 1, gd: true },
- { field: 'party_a', show: 0, gd: true },
- { field: 'party_b', show: 0, gd: true },
- { field: 'yf_price', show: 1 },
- { field: 'stackedBar', show: 1 },
- { field: 'sf_price', show: 0 },
- { field: 'stackedBarSf', show: 0 },
- { field: 'remark1', show: 0, alias: '备注1' },
- { field: 'remark2', show: 0, alias: '备注2' },
- { field: 'calc', show: 0, alias: '计算1' },
- { field: 'calc2', show: 0, alias: '计算2' },
- ],
- [type.income]: [
- { field: 'type', show: 1, gd: true },
- { field: 'party_a', show: 0, gd: true },
- { field: 'party_b', show: 0, gd: true },
- { field: 'yf_price', show: 1 },
- { field: 'stackedBar', show: 1 },
- { field: 'sf_price', show: 0 },
- { field: 'stackedBarSf', show: 0 },
- { field: 'remark1', show: 0, alias: '备注1' },
- { field: 'remark2', show: 0, alias: '备注2' },
- { field: 'calc', show: 0, alias: '计算1' },
- { field: 'calc2', show: 0, alias: '计算2' },
- ],
- };
- const attributeSet = [
- { name: '数值', field: 'num_val', fixed: [], type: 'int', type_name: '数字' },
- { name: '丙方', field: 'party_c', fixed: [], type: 'text', type_name: '文本' },
- { name: '丁方', field: 'party_d', fixed: [], type: 'text', type_name: '文本' },
- { name: '文本', field: 'text', fixed: [], type: 'text', type_name: '文本' },
- { name: '合同内容', field: 'contract_content', fixed: [], type: 'long_text', type_name: '长文本', tip: '独占一行,上限1000' },
- { name: '支付条件', field: 'pay_condition', fixed: [], type: 'long_text', type_name: '长文本', tip: '独占一行,上限1000' },
- ];
- const defaultAttributeSet = [
- { field: 'num_val', show: 0, alias: '数值' },
- { field: 'party_c', show: 0, alias: '丙方' },
- { field: 'party_d', show: 0, alias: '丁方' },
- { field: 'text', show: 0, alias: '文本' },
- { field: 'contract_content', show: 0, alias: '合同内容' },
- { field: 'pay_condition', show: 0, alias: '支付条件' },
- ];
- const defaultAttribute = {
- num_val: null,
- party_c: '',
- party_d: '',
- text: '',
- contract_content: '',
- pay_condition: '',
- };
- module.exports = {
- type,
- typeMap,
- typeName,
- colSet,
- defaultColSet,
- attributeSet,
- defaultAttributeSet,
- defaultAttribute,
- };
|