|
@@ -1291,14 +1291,31 @@ class Sale extends Base
|
|
|
if (isset($standing_book_data['companyNo'])) unset($standing_book_data['companyNo']);
|
|
|
if (isset($standing_book_data['customer_code'])) unset($standing_book_data['customer_code']);
|
|
|
|
|
|
- if ($key == 0) Db::name('standing_book')->where('projectNo', $plan['projectNo'])->update($standing_book_data);
|
|
|
- else {
|
|
|
- $temp = Db::name('standing_book')->where('projectNo', $plan['projectNo'])->find();
|
|
|
- if (!empty($temp)) {
|
|
|
- unset($temp['id']);
|
|
|
- $temp = array_merge($temp, $standing_book_data);
|
|
|
- $temp['standBookNo'] = makeNo('IO');
|
|
|
- Db::name('standing_book')->insert($temp);
|
|
|
+
|
|
|
+ //普通商品
|
|
|
+ if ($feedback['data_source'] == 1) {
|
|
|
+ if ($key == 0) Db::name('standing_book')->where('projectNo', $plan['projectNo'])->update($standing_book_data);
|
|
|
+ else {
|
|
|
+ $temp = Db::name('standing_book')->where('projectNo', $plan['projectNo'])->find();
|
|
|
+ if (!empty($temp)) {
|
|
|
+ unset($temp['id']);
|
|
|
+ $temp = array_merge($temp, $standing_book_data);
|
|
|
+ $temp['standBookNo'] = makeNo('IO');
|
|
|
+ Db::name('standing_book')->insert($temp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ //项目类竞价单
|
|
|
+ if ($key == 0) Db::name('standing_book')->where('projectNo', $plan['projectNo'])->where('infoNo', $standing_book_data['infoNo'])->update($standing_book_data);
|
|
|
+ else {
|
|
|
+ $temp = Db::name('standing_book')->where('projectNo', $plan['projectNo'])->where('infoNo', $standing_book_data['infoNo'])->find();
|
|
|
+ if (!empty($temp)) {
|
|
|
+ unset($temp['id']);
|
|
|
+ $temp = array_merge($temp, $standing_book_data);
|
|
|
+ $temp['standBookNo'] = makeNo('IO');
|
|
|
+ Db::name('standing_book')->insert($temp);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1447,6 +1464,7 @@ class Sale extends Base
|
|
|
if($datainfo>0){
|
|
|
$standing_book_data['sale_id'] = $datainfo;
|
|
|
$standing_book_data['customer_code']=$datas['customer_code'];
|
|
|
+ $standing_book_data['infoNo']=$goodinfo['infoNo'];
|
|
|
//修改状态,添加待办
|
|
|
ActionLog::logAdd($this->post['token'], [
|
|
|
"order_code" =>$orderCode,//项目编码
|