|
- <?php
-
- /**
- *
- * ============================================================================
- * * 版权所有 蜘蛛出行 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: 张帅
- * PhpStorm set-prod-price.php
- * Create By 2017/3/20 17:28 $
- */
-
- use backend\modules\zzcs\assets\ZzcsNewAsset;
- use yii\widgets\Pjax;
- use yii\helpers\Html;
- use backend\modules\zzcs\models\OperaTouristCommon;
-
- ZzcsNewAsset::addCss($this, '/tourist/css/set_tourist_price.css?20180305');
- ZzcsNewAsset::addScript($this, '/tourist/js/set_tourist_price.js?v=20180305');
- ZzcsNewAsset::addCss($this, '/global/css/combo.select.css');
- ZzcsNewAsset::addScript($this, '/global/js/jquery.combo.select.js');
- ZzcsNewAsset::addScript($this, '/plug/layer/layer.js');
-
- ?>
- <style type="text/css">
- .popWindow {
- background-color: #9D9D9D;
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- filter: alpha(opacity=50);
- opacity: 0.5;
- z-index: 1;
- position: absolute;
-
- }
-
- .maskLayer {
- width: 1480px;
- position: absolute;
- z-index: 2;
- }
-
- .span_head {
- padding: 10px;
- }
-
- .search_cost{border:1px solid lightgray;padding:10px 0px 20px 20px;height: 60px;max-width: 1098px}
-
- #to_org{
- border-radius: 0;
- -webkit-box-shadow: none!important;
- box-shadow: none!important;
- color: #858585;
- background-color: #fff;
- border: 1px solid #d5d5d5;
- font-family: inherit;
- font-size: inherit;
- line-height: inherit;
- height: 30px;
- }
- .org{
- font-family: 微软雅黑;
- font-size: 13px;
- color: #393939;
- line-height: 1.5;
- }
- </style>
-
-
- <div style="margin-bottom: 10px">
- <span class="span_head"><label>产品名称:</label><a style="color: color: #428bca;" href="/zzcs/tourist/update?tourist_id=<?php echo $tourist_id?>"><?= $tourist_model->tourist_name ?></a></span><br/>
- <span class="span_head"><label>内部编号:</label><?= $tourist_model->tourist_code ?></span>
- <span class="span_head"><label>行程天数:</label><?= OperaTouristCommon::getShowDayAndNight($tourist_model->day_num, $tourist_model->night_num) ?></span>
- <span class="span_head"><label>预订截至:</label><?= $tourist_model->pre_days . '天' . $tourist_model->pre_time ?></span>
- <span class="span_head"><label>状态:</label><?= $tourist_model->is_onsale == 1 ? '上架' : '下架' ?></span>
- </div>
-
- <div class="search_cost">
- <li class="search">
- <span class="org">渠道商:</span>
- <select name="" id="to_org" onchange="getDayPriceList()">
- <option value="0" selected >通用渠道</option>
- <?php foreach($to_org_list as $val){?>
- <option value="<?php echo $val['id']?>"><?php echo $val['supplier_name']?></option>
- <?php }?>
- </select>
- </li>
- </div>
-
- <div id="date_list">
-
- <div id="date_main">
- <span id="pre_month" class="TriangleLeft" onclick="getMonthInfo('pre')">
- </span>
- <span id="select_year_month">
- <select id="select_year" onchange="getMonthInfo('set')">
- <?php for ($i = 2016; $i <= 2026; $i++) { ?>
- <option value="<?php echo $i; ?>" <?php if ($now_date['year'] == $i) {
- echo 'selected="selected"';
- } ?>><?php echo $i; ?></option>
- <?php } ?>
- </select>
- 年
- <select id="select_month" onchange="getMonthInfo('set')">
- <?php for ($i = 1; $i <= 12; $i++) { ?>
- <?php $month_vel = strlen($i) == 1 ? '0' . $i : $i ?>
- <option value="<?php echo $month_vel; ?>" <?php if ($now_date['month'] == $i) {
- echo 'selected="selected"';
- } ?>><?php echo $i; ?></option>
- <?php } ?>
- </select>
- 月
-
- <sapn id="select_all">
- 全选
- <input type="checkbox" name="check_all" id="check_all" onclick="selectDateAll(this)">
- </sapn>
-
- </span>
- <span id="last_month" class="TriangleRight" onclick="getMonthInfo('last')">
- </span>
- </div>
- <?php Pjax::begin(['id' => 'main_table', 'timeout' => 30000000]) ?>
-
- <div class="table_list">
- <table id="table_list">
- <thead>
- <tr>
- <?php foreach ($week_arr as $key => $vel) { ?>
- <th class="<?php if ($key == 1 || $key == 7) {
- echo 'rest_day';
- } else {
- echo 'work_day';
- } ?>">
- <div class="date_week"><?php echo $vel['name']; ?></div>
- <?php if ($vel['show_status'] != 0) { ?>
- <input type="checkbox" name="week_day" class="week_day" week_type="<?php echo $key; ?>"
- onclick="selectWeekDay(this)">
-
- <?php } ?>
- </th>
- <?php } ?>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($list as $week_key => $week_vel) { ?>
- <tr>
- <?php foreach ($week_vel as $day_key => $day_vel) { ?>
- <?php if (count($day_vel) > 0) { ?>
- <td t_data='<?php echo json_encode($day_vel['info']) ?>'
- class="<?php if ($day_vel['valid'] == 0) {
- echo 'no_valid';
- } else {
- if ($day_vel['is_onsale'] == 0) {
- echo 'no_sale';
- } else {
- echo 'on_sale';
- }
- } ?>"
- is_onsale="<?php echo $day_vel['is_onsale'] ?>"
- valid="<?php echo $day_vel['valid']; ?>"
- onclick="setProdPrice(this)"
- the_date="<?php echo $day_vel['date']; ?>"
-
- >
- <?php if ($day_vel['valid'] == 1) { ?>
- <input type="checkbox" name="date_day" class="date_day"
- the_date="<?php echo $day_vel['date']; ?>"
- the_x="<?php echo $day_vel['x']; ?>"
- the_y="<?php echo $day_vel['y']; ?>" onclick="selectDateDay(this)">
- <?php } ?>
- <div class="date_day_vel"><?php echo $day_vel['day'] ?></div>
- <?php ?>
- <ul class="ticket_info">
- <?php
- //如果价格为0则标红
- $color_adult_cost = $day_vel['info']['adult_cost'] == 0 ? '<span style="color: red">0</span>' : $day_vel['info']['adult_cost'];
- $color_child_cost = $day_vel['info']['child_cost'] == 0 ? '<span style="color: red">0</span>' : $day_vel['info']['child_cost'];
-
- //如果售价小于成本 则售价标红
- $color_adult_price = $day_vel['info']['adult_cost'] > $day_vel['info']['adult_price'] ? '<span style="color: red">' . $day_vel['info']['adult_price'] . '</span>' : $day_vel['info']['adult_price'];
- $color_child_price = $day_vel['info']['child_cost'] > $day_vel['info']['child_price'] ? '<span style="color: red">' . $day_vel['info']['child_price'] . '</span>' : $day_vel['info']['child_price'];
-
-
- $diff_para_desc_child = $day_vel['info']['diff_para_child'] . ($day_vel['info']['sale_type_child'] == 1 ? '元' : '%');
- $diff_para_desc_adult = $day_vel['info']['diff_para_adult'] . ($day_vel['info']['sale_type_adult'] == 1 ? '元' : '%');
- ?>
- <li><?= '成人价:' . $color_adult_price . '/' . $color_adult_cost ?></li>
- <li><?= '儿童价:' . $color_child_price . '/' . $color_child_cost ?></li>
- <li><?= '成人加价值:' . $diff_para_desc_adult ?></li>
- <li><?= '儿童加价值:' . $diff_para_desc_child ?></li>
- <li><?= '库存量:' . $day_vel['info']['limit_total_num'] . '/' . $day_vel['info']['limit_adult_num'] ?></li>
- <?php ?>
- </ul>
- <?php ?>
- </td>
- <?php } else { ?>
- <td></td>
- <?php } ?>
- <?php } ?>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- </div>
- <?php Pjax::end() ?>
- <div id="date_title">
- <span id="set_type" class="btn btn-primary" onclick="updateSetType(this)" set_type="1">批量设置</span>
-
- <span id="down_line" class="btn btn-default" onclick="updateIsOnSale('down')">下架</span>
- <span id="up_line" class="btn btn-default" onclick="updateIsOnSale('up')">上架</span>
- </div>
- </div>
- <?= \yii\helpers\Html::hiddenInput('tourist_id', $tourist_id); ?>
- <?= \yii\helpers\Html::hiddenInput('to_org_id', $to_org_id); ?>
- <!--<div id="maskLayer" class="maskLayer" style="display: none;">-->
- <div id="set_price" style="" tp_t_data="">
-
- <div class="prod_price_info form-inline">
- <span class="form-group">成人加价:<div class="input-group"><input style="width: 103px;" id="diff_para_adult"
- type="text"
- class="prod_price form-control"
- onblur="this.value = fmoney(this.value,'float');"><div
- class="input-group-addon"><i class="unit unit_adult">%</i></div></div></span>
- <span style="margin-left: 22px;" class="form-group child">加价方式:
- <label style="width: 85px"><input name="sale_type_adult" type="radio" value="1"
- onclick="changeSaleType(this,1)"/>固定值</label>
- <label style="width: 85px"><input name="sale_type_adult" type="radio" value="2" checked
- onclick="changeSaleType(this,2)"/>百分比</label>
- </span>
- </br>
- <span class="form-group">儿童加价:<div class="input-group"><input style="width: 103px;" id="diff_para_child"
- type="text"
- class="prod_price form-control"
- onblur="this.value = fmoney(this.value,'float');"><div
- class="input-group-addon"><i class="unit unit_child">%</i></div></div></span>
- <span style="margin-left: 22px;" class="form-group child">加价方式:
- <label style="width: 85px"><input name="sale_type_child" type="radio" value="1"
- onclick="changeSaleType(this,1)"/>固定值</label>
- <label style="width: 85px"><input name="sale_type_child" type="radio" value="2" checked
- onclick="changeSaleType(this,2)"/>百分比</label>
- </span>
- </div>
-
-
- <span class="btn btn-primary" id="confirm" onclick="submitProdInfo()">确定</span>
- <span class="btn btn-default" id="reset" onclick="resetProdInfo()">重置</span>
-
- </div>
- <!--</div>-->
- <div id="popWindow" class="popWindow" style="display: none;" onclick="closeDiv()">
- </div>
-
-
|