HTML
<input type="button" onclick="$('#DetermineEndTime').dialog('open');" class="button" value="确定结束时间" style="cursor:pointer">
<div id="DetermineEndTime" style="display:none" title="提示信息">
<h3 style='text-align:center'>确定结束时间<h3>";
<input type='hidden' name='op_pack_end'>
</div>
Js
<script>
//初始化
$(function(){
$("#DetermineEndTime").dialog({
autoOpen: false,
width: 300,
height: 150,
modal: true,
show: "slide",
buttons: {
"确定": function () {
$(this).dialog("close");
submitEndTime();
},
"取消": function () {
$(this).dialog("close");
}
}
});
});
function submitEndTime() {
var orders_code_ch = $('#orders_code_ch').val();
$.ajax({
type: "post",
async: false,
dataType: "json",
url: "/warehouse/pack-check/determine-end-time/",
data: {"orders_code_ch": orders_code_ch},
success: function (json) {
alertTip(json.msg);
}
});
}
</script>
/*
* 控制器
* 获取质检总数量
*/
class Warehouse_PackCheckController extends Zend_Controller_Action {
public function determineEndTimeAction() {
$result = array('ask' => 0, 'msg' => '');
$orders_code_ch = $this->_request->getParam("orders_code_ch", "");
$op_code = Order_Service_OrderPickup::getByValue($orders_code_ch, "op_code");
if (empty($op_code)) {
$result['msg'] = "请输入下架单号";
die(json_encode($result));
} else {
if ($op_code['op_pack_end'] == "0000-00-00 00:00:00" || $op_code['op_pack_end'] == "") {
$time = array(
"op_pack_end" => date("Y-m-d H:i:s"),
);
$update = Order_Service_OrderPickup::update($time, $op_code['op_id']);
$result = array('ask' => 1, 'msg' => '打包结束时间更新成功');
die(json_encode($result));
} else {
$result['msg'] = "该订单已打包结束";
die(json_encode($result));
}
}
}
}
打包时间统计功能优化
最新推荐文章于 2024-01-18 16:10:44 发布