mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-10 00:15:32 +08:00
1. 【新增】售后单售后原因类型支持搜索
2. 【新增】手工创建订单折扣可输入正数 3. 【优化】盘点申请单确认 4. 【修复】采购退货单模拟出库失败问题 5. 【新增】订单金额客户实付与结算金额 6. 【优化】仓库发货统计报表物料名称显示 7. 【优化】自有仓储虚拟发货逻辑 8. 【修复】基础物料分类管理问题
This commit is contained in:
@@ -14,15 +14,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
class desktop_ctl_export extends desktop_controller{
|
||||
|
||||
/**
|
||||
* __construct
|
||||
* @param mixed $app app
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function __construct($app)
|
||||
{
|
||||
parent::__construct($app);
|
||||
@@ -33,6 +27,7 @@ class desktop_ctl_export extends desktop_controller{
|
||||
$exptempObj = app::get('desktop')->model('export_template');
|
||||
$temps =$exptempObj->getList('et_id,et_name',array('et_type'=>$type),0,-1);
|
||||
$this->pagedata['temps'] = $temps;
|
||||
$this->pagedata['type'] = $type;
|
||||
return $this->display("export/template.html");
|
||||
}
|
||||
|
||||
@@ -74,4 +69,27 @@ class desktop_ctl_export extends desktop_controller{
|
||||
$this->pagedata['need_detail'] = $curr_filter['need_detail'];
|
||||
return $this->display("export/templatedetail.html");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定的导出模板
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function deleteTemp(){
|
||||
$this->begin('javascript:location.reload();');
|
||||
|
||||
$et_id = $_POST['et_id'];
|
||||
if(empty($et_id)){
|
||||
$this->end(false, '模板ID不能为空');
|
||||
}
|
||||
|
||||
$exptempObj = app::get('desktop')->model('export_template');
|
||||
$result = $exptempObj->delete(array('et_id'=>$et_id));
|
||||
|
||||
if($result){
|
||||
$this->end(true, '删除成功');
|
||||
}else{
|
||||
$this->end(false, '删除失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +35,17 @@ class desktop_ctl_rpcnotify extends desktop_controller{
|
||||
}//End Function
|
||||
|
||||
function index(){
|
||||
// 清除三个月前的通知,直接用SQL执行
|
||||
$threeMonthsAgo = strtotime('-3 months');
|
||||
$db = kernel::database();
|
||||
$table = app::get('base')->model('rpcnotify')->table_name(true);
|
||||
$sql = "DELETE FROM {$table} WHERE notifytime < {$threeMonthsAgo}";
|
||||
$db->exec($sql);
|
||||
|
||||
$this->finder('base_mdl_rpcnotify',array(
|
||||
'title'=>app::get('desktop')->_('消息通知'),
|
||||
'actions'=>array(
|
||||
array('label'=>app::get('desktop')->_('标记为未读'), 'id'=>'id-rpcynotify-submit', 'submit'=>'index.php?ctl=rpcnotify&act=unread'),
|
||||
array('label'=>app::get('desktop')->_('标记为已读'), 'id'=>'id-rpcynotify-submit', 'submit'=>'index.php?ctl=rpcnotify&act=read'),
|
||||
),
|
||||
'use_buildin_recycle' => false,
|
||||
@@ -80,12 +87,45 @@ class desktop_ctl_rpcnotify extends desktop_controller{
|
||||
$cacheInfo[$infoKey]['status'] = 'true';
|
||||
cachecore::store('system_notice_data', $cacheInfo, 1800);
|
||||
}
|
||||
$data = array('status'=>'true','id'=>$val);
|
||||
$data = array('status'=>'true','id'=>$val,'read_user'=>kernel::single('desktop_user')->get_login_name());
|
||||
$flag = app::get('base')->model('rpcnotify')->save( $data );
|
||||
if( $flag == false ) break;
|
||||
}
|
||||
}else {
|
||||
$data = array('status'=>'true');
|
||||
$data = array('status'=>'true','read_user'=>kernel::single('desktop_user')->get_login_name());
|
||||
$filter = array();
|
||||
$flag = app::get('base')->model('rpcnotify')->update( $data, $filter );
|
||||
}
|
||||
$this->end( $flag, ($flag ? app::get('desktop')->_('操作成功') : app::get('desktop')->_('操作失败')) );
|
||||
}
|
||||
|
||||
public function unread() {
|
||||
if (!$_POST['from']) {
|
||||
$this->begin( kernel::router()->gen_url( array('app'=>'desktop','ctl'=>'rpcnotify','act'=>'index') ) );
|
||||
}else{
|
||||
$this->begin( kernel::router()->gen_url( array('app'=>'desktop','ctl'=>'dashboard','act'=>'index') ) );
|
||||
}
|
||||
|
||||
$id = $_POST['id'];
|
||||
$is_selected_all = $_POST['isSelectedAll'];
|
||||
|
||||
if( !$id && !$is_selected_all)
|
||||
$this->end( false, app::get('desktop')->_('操作失败') );
|
||||
if ($id) {
|
||||
//桌面消息缓存
|
||||
$cacheInfo = cachecore::fetch('system_notice_data');
|
||||
foreach( (array)$id as $val ) {
|
||||
if ($cacheInfo) {
|
||||
$infoKey = array_search($val, array_column($cacheInfo, 'id'));
|
||||
$cacheInfo[$infoKey]['status'] = 'false';
|
||||
cachecore::store('system_notice_data', $cacheInfo, 1800);
|
||||
}
|
||||
$data = array('status'=>'false','id'=>$val,'read_user'=>'');
|
||||
$flag = app::get('base')->model('rpcnotify')->save( $data );
|
||||
if( $flag == false ) break;
|
||||
}
|
||||
}else {
|
||||
$data = array('status'=>'false','read_user'=>'');
|
||||
$filter = array();
|
||||
$flag = app::get('base')->model('rpcnotify')->update( $data, $filter );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user