后台增加修改收款记录
This commit is contained in:
@@ -1306,6 +1306,7 @@ class Orders extends HD_Controller
|
||||
'show_img' => 0,
|
||||
'descrip' => $item['descrip'],
|
||||
'img' => $item['img'] ? build_qiniu_image_url($item['img']) : '',
|
||||
'admin_id' => $item['admin_id'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1360,7 +1361,9 @@ class Orders extends HD_Controller
|
||||
public function add_paylog()
|
||||
{
|
||||
$id = $this->input->get_post('id');
|
||||
$log_id = $this->input->get_post('log_id');
|
||||
$row = $this->receiver_orders_v2_model->get(['id' => $id]);
|
||||
$order_row = $this->app_liche_orders_model->get(['id'=>$log_id,'o_id'=>$row['id']]);
|
||||
$srv_price = $this->orders_v2_entity->order_srv_money($row['id']);
|
||||
$need_price = $this->orders_v2_entity->recevable_price($row['id']);
|
||||
$car_price = $need_price-$srv_price;
|
||||
@@ -1375,6 +1378,9 @@ class Orders extends HD_Controller
|
||||
if (!$money || !$row || !$wx_mchid) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '参数错误');
|
||||
}
|
||||
if($order_row["id"]){ //修改订单更新旧订单为无效订单
|
||||
$this->app_liche_orders_model->update(['status'=>-1],['id'=>$order_row['id']]);
|
||||
}
|
||||
$p_row = $this->app_liche_orders_model->get(['pid'=>0,'o_id'=>$row['id']]);
|
||||
$last_p_row = $this->app_liche_orders_model->get(['o_id'=>$row['id'],'type'=>3,'pid'=>$p_row['id'],'status>='=>0]); //尾款父订单
|
||||
|
||||
@@ -1469,6 +1475,7 @@ class Orders extends HD_Controller
|
||||
$this->data['type'] = $type;
|
||||
$this->data['companys'] = $companys;
|
||||
$this->data['id'] = $this->input->get('id');
|
||||
$this->data['order_row'] = $order_row;
|
||||
return $this->show_view('receiver/orderv2/get/add_paylog');
|
||||
}
|
||||
//取消配车
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<form class="am-form am-form-horizontal" action="/receiver/orderv2/orders/add_paylog" data-auto="true" method="post"
|
||||
style="width: 90%;padding-top: 10px">
|
||||
<input type="hidden" name="id" value="<?= $id ?>">
|
||||
<input type="hidden" name="log_id" value="<?= intval($order_row["id"]) ?>">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">支付金额:</label>
|
||||
<div class="am-para-input">
|
||||
<input type="number" value="" name="money">
|
||||
<input type="number" value="<?=$order_row["total_price"]?>" name="money">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +14,7 @@
|
||||
<div class="am-para-input w150">
|
||||
<select name="type">
|
||||
<?foreach($type as $item){?>
|
||||
<option value="<?=$item['id']?>"><?=$item['name']?></option>
|
||||
<option <?=$order_row["type"]==$item["id"] ? "selected" : ""?> value="<?=$item['id']?>"><?=$item['name']?></option>
|
||||
<?}?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -24,7 +25,7 @@
|
||||
<div class="am-para-input w150">
|
||||
<select name="wx_mchid">
|
||||
<?foreach($companys as $item){?>
|
||||
<option value="<?=$item['wx_mchid']?>"><?=$item['short']?></option>
|
||||
<option <?=$order_row["mch_id"]==$item["wx_mchid"] ? "selected" : ""?> value="<?=$item['wx_mchid']?>"><?=$item['short']?></option>
|
||||
<?}?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -42,7 +43,7 @@
|
||||
onchange="$(this).next('img').attr('src', $(this).data('srcs') || this.value)"
|
||||
value="" class="layui-input">
|
||||
<img data-tips-image style="height:auto;max-height:32px;min-width:32px"
|
||||
src=""/>
|
||||
src="<?=$order_row["img"] ? build_qiniu_image_url($order_row["img"]):""?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
@@ -57,7 +58,7 @@
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">备注:</label>
|
||||
<div class="am-para-input">
|
||||
<textarea name="descrip"></textarea>
|
||||
<textarea name="descrip"><?=$order_row["descrip"]?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
<th>操作人</th>
|
||||
<th>备注</th>
|
||||
<th>支付截图</th>
|
||||
<th>付款时间</th>
|
||||
<th>付款时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -42,6 +43,13 @@
|
||||
</template>
|
||||
</td>
|
||||
<td>{{item.pay_time}}</td>
|
||||
<td>
|
||||
<a href="javascript:;"
|
||||
class="am-btn am-btn-primary am-btn-xs" v-if="item.admin_id>0"
|
||||
:data-modal="'/receiver/orderv2/orders/add_paylog?id=<?=$id?>&log_id='+item.id">
|
||||
修改
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user