Esempio n. 1
0
function down_BaseInfo($list)
{
    $map['title'] = '认筹单信息';
    $map['fields'] = array(array('title' => '姓名', 'field' => 'cname', 'type' => 0), array('title' => '性别', 'field' => 'grender', 'type' => 0), array('title' => '手机号码', 'field' => 'mobile', 'type' => 2), array('title' => '证件号码', 'field' => 'cardid', 'type' => 2), array('title' => '产品', 'field' => 'product', 'type' => 0), array('title' => '附属权益人', 'field' => 'holdername', 'type' => 0), array('title' => '通讯地址', 'field' => 'address', 'type' => 0), array('title' => '是否本地户口', 'field' => 'local', 'type' => 0), array('title' => '意向户型', 'field' => 'housetype', 'type' => 0), array('title' => '具体意向1', 'field' => 'intendroom1', 'type' => 0), array('title' => '具体意向2', 'field' => 'intendroom2', 'type' => 0), array('title' => '具体意向3', 'field' => 'intendroom3', 'type' => 0), array('title' => '业务员', 'field' => 'salesman', 'type' => 0), array('title' => '状态', 'field' => 'status', 'type' => 0), array('title' => '创建时间', 'field' => 'createtime', 'type' => 1));
    global $status;
    foreach ($list as &$item) {
        $item['local'] = $item['local'] == 1 ? '是' : '否';
        $item['address'] = biz_getAllCustomerField($item['cid'], 'Address');
        // 具体意向处理
        $rooms = $item['intendroom'];
        $rooms = explode(',', $rooms);
        $item['intendroom1'] = isset($rooms[0]) ? $rooms[0] : '';
        $item['intendroom2'] = isset($rooms[1]) ? $rooms[1] : '';
        $item['intendroom3'] = isset($rooms[2]) ? $rooms[2] : '';
        $item['status'] = $status[$item['pretype']];
    }
    unset($item);
    downExcel($map, $list);
}
Esempio n. 2
0
function biz_getChipsCustomerInfo($chips, $hasCard = false)
{
    $res = array('guid' => $chips['cid'], 'name' => $chips['cname'], 'card' => $chips['cardid']);
    if (!empty($chips['holderguid'])) {
        $res['guid'] .= "," . $chips['holderguid'];
        $res['name'] .= "," . $chips['holdername'];
        if ($hasCard) {
            $res['card'] .= "," . biz_getAllCustomerField($chips['holderguid'], 'CardID');
        }
    }
    return $res;
}