module.exports = {
	card_url:function (item){
		var url='/packageA/pages/details_serviceCard/details_serviceCard?order_id='+item.order_id;
		if(item.presell && item.presell.presell_type==0 && item.order_status<3 && item.presell.deposit_pay_time>0 && item.presell.tail_pay_state==0)
			url='/packageC/pages/presell/cart/cart?is_fwk=1&order_id='+item.order_id
		return url;
	},
	for_mat_val:function (e){
        if(e===undefined) return '-';
        if(e===null) return '-';
        if(e==="null") return '-';
        if(e==="") return '-';
	    	return e;
  },
  toFix: function (val, count) {

    if(val===undefined) return '-';
    if(val===null) return '-';
    if(val==="null") return '-';
    if(val==="") return '-';
		if (!val) {
			return "0";
		}
		val = parseFloat(val);
		return parseFloat(val.toFixed(count))
	},
}