import { toSupply,toType, toStage, toFee,toStatus,toFeeType,toPoint,toConfirm,isTrue } from "@/utils/stringFun";
import { toDatetime,toDate } from "@/utils/date";


export default {
	companyDetail:[
		{ label: "企业名称", span:8,  key: 'company'},
		{ label: "统一信用代码", span:8, key: 'credit_code' },
		{ label: "企业状态", span:8,  key: 'status', filters:toStatus},
		
		{ label: "推荐渠道商", span:8,  key: 'channel'},
		{ label: "企业法人", span:8,  key: 'legal_person'},
		{ label: "法人证件", span:8,  key: 'legal_person_code'},
		
		{ label: "所在区域", span:8,  key: 'region'},
		{ label: "详细地址", span:8,  key: 'address'},
		{ label: "入库时间", span:8,  key: 'create_at', filters:toDatetime}
	],
	companyContact:[
		{ label: "联系人", span:8,  key: 'contact'},
		{ label: "联系电话", span:8,  key: 'phone'},
		{ label: "平台账号", span:8,  key: 'username'}
	],
	companyCooperation:[
		{ label: "合作开始", span:8,  key: 'cooperation_start_at', filters:toDate},
		{ label: "合作截止", span:8,  key: 'cooperation_end_at', filters:toDate}
	],
	companySign:[
		{ label: "业务员", span:8,  key: 'sign_username'},
		{ label: "签约平台", span:8,  key: 'sign_company'},
		{ label: "签约时间", span:8,  key: 'confirm_at', filters:toDatetime},

		{ label: "收费方式", span:8,  key: 'fee_type',filters:toFeeType},
		{ label: "每笔费用", span:8,  key: 'tax_fee', filters:toFee},
		{ label: "开票税点", span:8,  key: 'tax_point', filters:toPoint}
	],

	makerDetail:[
		{ label: "创客的ID", span:8, key: 'id', },
		{ label: "创客名字", span:8,  key: 'name'},
		{ label: "实名认证", span:8,  key: 'identify', filters:(val)=>{return val?'已经认证':"还未认证"}},
		{ label: "创客手机", span:8,  key: 'phone'},
		{ label: "身份证号", span:8,  key: 'card_code'},
		{ label: "银行卡号", span:8,  key: 'band_code'},
		{ label: "创建时间", span:8,  key: 'created_at', filters:toDatetime}
	],
	makerFee:[
		{ label: "业务员", span:8,  key: 'saleman'},
		{ label: "个体户", span:8,  key: 'self_employed', filters:isTrue},
		{ label: "审核通过", span:8,  key: 'confirm', filters:isTrue},
		{ label: "服务费", span:8,  key: 'service_fee',filters:toPoint},
		{ label: "最小收费", span:8,  key: 'min_fee', filters:toFee},
		{ label: "开票税点", span:8,  key: 'tax_point', filters:toPoint}
	],
	taskData: [
		{ label: "任务单据号", span:8, key: 'id', },
		{ label: "任务标题", span:8,  key: 'title'},
		{ label: "任务状态", span:8,  filters:toStage},
		{ label: "指派人员", span:8,  key: 'maker'},
		{ label: "任务分类", span:8,  key: 'category'},
		
		{ label: "任务类型", span:8,  key: 'type', filters:toType},
		{ label: "预算金额", span:8,  key: 'budget_fee',filters:toFee},
		{ label: "任务天数", span:8,  key: 'need_day'},
		{ label: "所需人数", span:8,  key: 'need_people'},
		
		{ label: "投标截止", span:8,  key: 'bid_end_at', filters:toDate},
		{ label: "联系人", span:8,  key: 'contact'},
		{ label: "联系电话", span:8,  key: 'phone'},
		{ label: "所属企业", span:8,  key: 'company'},

		{ label: "交付图片", span:8, tag:'img', key: 'deliver_img'},
		{ label: "转账图片", span:8, tag:'img', key: 'pay_img'},
		{ label: "发票图片", span:8, tag:'img', key: 'invoice_img'},

		{ label: "创建时间", span:8,  key: 'created_at', filters:toDatetime},
		{ label: "指定创客", span:8,  tag: 'button', action:'selectMaker', show:(item)=>{ return item.maker==''}}
	],
	b2bData: [
		{ label: "所属企业", span:8,  key: 'company'},
		{ label: "任务单据号", span:8, key: 'id', },
		{ label: "是否供应方", span:8,  key: 'supply', filters:toSupply},

		{ label: "产品名称", span:8,  key: 'product'},
		{ label: "产品数量", span:8,  key: 'amount'},
		{ label: "任务状态", span:8,  key: 'confirm', filters:toConfirm},
		
		{ label: "交易金额", span:8,  key: 'fee',filters:toFee},
		{ label: "关联企业", span:8,  key: 'target'},
		{ label: "业务员", span:8,  key: 'saleman'},
		{ label: "联系人", span:8,  key: 'contact'},
		{ label: "联系电话", span:8,  key: 'phone'},
		
		{ label: "创建时间", span:8,  key: 'created_at', filters:toDatetime}
	]
}
