|
|
@@ -1482,11 +1482,19 @@ class WorkOrder extends Api
|
|
|
$this->error('请求错误');
|
|
|
}
|
|
|
$param = $this->request->param();
|
|
|
- if (empty($param)){
|
|
|
+ if (isset($param['cilent']) === false){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
+ if (isset($param['productCode'])){
|
|
|
+ $where = [
|
|
|
+ '客户编号' => ['like',$param['cilent'].'%'],
|
|
|
+ '产品编号' => ['like',$param['productCode'].'%']
|
|
|
+ ];
|
|
|
+ }else{
|
|
|
+ $where = ['客户编号'=>['like',$param['cilent'].'%']];
|
|
|
+ }
|
|
|
$list = \db('产品_基本资料')
|
|
|
- ->where('客户编号',$param['cilent'])
|
|
|
+ ->where($where)
|
|
|
->field('rtrim(产品编号) as 产品编号,rtrim(产品名称) as 产品名称')
|
|
|
->select();
|
|
|
if (empty($list)){
|