transfer_105
This commit is contained in:
@@ -467,6 +467,35 @@ class Transfer extends HD_Controller
|
||||
return $this->show_view('items/transfer/get_add', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:短信提醒
|
||||
* Created on: 2022/1/5 10:05
|
||||
* Created by: dengbw
|
||||
* @return bool
|
||||
*/
|
||||
public function get_send_alisms()
|
||||
{
|
||||
$ids = $this->input->get('ids');
|
||||
if (!$ids) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '请选择需要操作的数据!');
|
||||
}
|
||||
$res = $this->mdTransfer->select(["id in({$ids})" => null, 'status in(0,1)' => null], 'id desc', 0, 0, 'id,item_id');
|
||||
foreach ($res as $key => $value) {
|
||||
$res_r = $this->mdTransferRemind->select(['status' => 1, 'tran_id' => $value['id']], 'type asc', 0, 0, 'uid');
|
||||
$res_a = $this->mdTransferAdmin->select(['status' => 1, 'tran_id' => $value['id']], 'type asc', 0, 0, 'uid');
|
||||
$item_info = $this->item_info($value['item_id'], 1);
|
||||
if ($res_r) {//门店调拨短信提醒
|
||||
$send_uids = array_unique(array_column($res_r, 'uid'));
|
||||
$this->send_alisms(['uids' => $send_uids, 'type' => 1, 'item_info' => $item_info]);
|
||||
}
|
||||
if ($res_a) {//信息员调拨短信提醒
|
||||
$send_admins = array_unique(array_column($res_a, 'uid'));
|
||||
$this->send_alisms(['uids' => $send_admins, 'type' => 2, 'item_info' => $item_info]);
|
||||
}
|
||||
}
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '短信提醒成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/修改调拨
|
||||
* @return bool
|
||||
|
||||
@@ -231,6 +231,7 @@
|
||||
class="am-btn am-btn-success w100 am-btn-sm">新增
|
||||
</button>
|
||||
<button type="button" id="export" class="am-btn am-btn-success am-btn-sm w100">导出</button>
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" onclick="sendAlisms();">短信提醒</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -240,12 +241,15 @@
|
||||
<table class="am-table am-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">
|
||||
<label class="checkall"><input type="checkbox" data-check-target=".order-ids"> 全选</label>
|
||||
</th>
|
||||
<th width="15%"><span>车辆</span></th>
|
||||
<th width="15%"><span>车架号</span></th>
|
||||
<th width="7%"><span>运输人员</span></th>
|
||||
<th width="14%"><span>车架号</span></th>
|
||||
<th width="6%"><span>运输人员</span></th>
|
||||
<th width="11%"><span>调拨时间</span></th>
|
||||
<th width="20%"><span>提车人</span></th>
|
||||
<th width="20%"><span>接车人</span></th>
|
||||
<th width="19%"><span>提车人</span></th>
|
||||
<th width="19%"><span>接车人</span></th>
|
||||
<th width="5%"><span>异常</span></th>
|
||||
<th width="7%"><span>状态</span></th>
|
||||
<th width="5%"><span>操作</span></th>
|
||||
@@ -255,6 +259,7 @@
|
||||
<? if ($lists) {
|
||||
foreach ($lists as $v) { ?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids[]" class="order-ids" value="<?= $v['id'] ?>"/></td>
|
||||
<td><?= $v['title'] ?></td>
|
||||
<td><?= $v['vin'] ?></td>
|
||||
<td><?= $v['transport_name'] ?></td>
|
||||
@@ -673,5 +678,17 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
function sendAlisms() {
|
||||
var ids = function () {
|
||||
var data = [];
|
||||
return $(".order-ids").map(function () {
|
||||
(this.checked) && data.push(this.value);
|
||||
}), data.join(',');
|
||||
}.call(this);
|
||||
if (ids.length < 1) {
|
||||
return $.msg.tips('请选择需要操作的数据!');
|
||||
}
|
||||
return $.form.modal("/items/transfer/get_send_alisms?ids=" + ids, 'open_type=modal', "短信提醒");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user