文件
mashangyoujiu/Application/Common/Model/SStockOutOrderModel.class.php

56 行
2.8 KiB
PHP
可执行文件

<?php
/*
* 门店出库单模型 - 数据对象模型
*/
namespace Common\Model;
use Think\Model;
//[1.4.98]
class SStockOutOrderModel extends JBaseModel
{
protected $tableName = 'retail_store_stock_out_order';
protected $fields = array(
'id', //int(11) NOT NULL AUTO_INCREMENT,
'merchant_id', //int(11) DEFAULT '0' COMMENT '商户id',
'store_id', //门店id
'supplier_id', //供货商id
'transfer_to_store_id', //调拨至门店的id
'warehouse_record_id', //调拨出库的商户或者门店的入库单id
'warehouse_id', //int(11) DEFAULT '0' COMMENT '仓库id',
'order_number', //varchar(255) DEFAULT '' COMMENT '订单号',
'money_total', // decimal(10,2) DEFAULT '0.00' COMMENT '金额',
'goods_species', //int(11) DEFAULT '0' COMMENT '商品总种类',
'real_goods_species', //对方实收货多少种
'real_money_total', //对方实收金额
'remarks', //text COMMENT '备注',
'status', //tinyint(1) DEFAULT '0' COMMENT '0未出库 1出库成功',
'type', //0其他出库 1退货出库 2盘亏出库 3调拨出库
'warehousing_status', //商户或门店 是否入库 0未入库 1已入库
'examine_status', //门店调拨出库商户审核 0未审核 1审核通过 2审核失败
'add_time', //varchar(10) DEFAULT '' COMMENT '出库时间',
'warehouse_time', //入库时间
'operator_id', //操作人员id
'operator_type', //操作人身份 0 后台操作人(包括商户与店长) 1收银员
'total_cost_price', //出库总成本价
'real_total_cost_money', //1无拒收 2有拒收
'refuse_status', //1无拒收 2有拒收
'refuse_goods_species', //拒收的商品种数
'refuse_total_cost_money', //拒收的总成本价
'refuse_total_stock_money', //拒收的总出库价
'refuse_time', //拒收的时间
);
/**
* 门店验证是否已入库
*/
public function store_param_verify($id)
{
$warehousing_status = $this->getFindField(array("warehouse_record_id"=>$id),"warehousing_status");
if($warehousing_status == 1){
$res['status'] = 0;
$res['msg'] = '已入库,请勿重复操作';
}else{
$res['status'] = 1;
$res['msg'] = '验证成功';
}
return $res;
}
}