mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-04 14:36:50 +08:00
55 lines
1.6 KiB
PHP
55 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
* Copyright 2012-2026 ShopeX (https://www.shopex.cn)
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
class wms_mdl_product_serial extends dbeav_model{
|
|
|
|
//是否有导出配置
|
|
var $has_export_cnf = true;
|
|
var $export_name = '唯一码列表';
|
|
|
|
//删除不需要导出的字段
|
|
/**
|
|
* disabled_export_cols
|
|
* @param mixed $cols cols
|
|
* @return mixed 返回值
|
|
*/
|
|
public function disabled_export_cols(&$cols){
|
|
unset($cols['column_edit']);
|
|
}
|
|
|
|
/**
|
|
* 唯一码是否可用
|
|
* @param String $serial_number
|
|
* @param String $bn
|
|
* @param String $branch_id
|
|
* @return Boolean
|
|
*/
|
|
public function checkSerial($serial_number, $bn, $branch_id){
|
|
if (!$serial_number || !$bn || !$branch_id) {
|
|
return false;
|
|
}
|
|
$filter['serial_number'] = $serial_number;
|
|
$filter['bn'] = $bn;
|
|
$filter['branch_id'] = $branch_id;
|
|
$serialData = $this->dump($filter);
|
|
if($serialData['serial_id'] > 0 && $serialData['status'] == 0){
|
|
return true;
|
|
}else{
|
|
return false;
|
|
}
|
|
}
|
|
} |