wupengfei 2 years ago
parent
commit
84d5356942

+ 5 - 4
.idea/workspace.xml

@@ -3,7 +3,8 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/api/controller/UserCenter.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/UserCenter.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/operate/controller/SupplierGoods.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/SupplierGoods.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/operate/view/supplier_goods/form.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/view/supplier_goods/form.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -294,7 +295,7 @@
       <workItem from="1681692707179" duration="23967000" />
       <workItem from="1681779545042" duration="19230000" />
       <workItem from="1681866032563" duration="20122000" />
-      <workItem from="1681952639054" duration="879000" />
+      <workItem from="1681952639054" duration="1945000" />
     </task>
     <servers />
   </component>
@@ -420,10 +421,10 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="1211" y="541" key="#com.intellij.fileTypes.FileTypeChooser/0.0.2560.1400@0.0.2560.1400" timestamp="1675311007920" />
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1681890894707">
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1681954550793">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1681890894707" />
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1681954550793" />
     <state x="420" y="147" width="1942" height="1088" key="DiffContextDialog" timestamp="1681953355372">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 12 - 0
application/operate/controller/SupplierGoods.php

@@ -1,6 +1,7 @@
 <?php
 namespace app\operate\controller;
 use app\common\model\DatumIntro;
+use app\common\model\User;
 use library\Controller;
 use think\Db;
 
@@ -187,6 +188,17 @@ class SupplierGoods extends Controller
         $this->goods_cate = make_tree($all_cate);
         $this->assign('waitSecond','1');
         $this->assign("jumpUrl",$_SERVER["HTTP_REFERER"]);
+        if($this->request->isPost()) {
+            if(!$data['release_time']) $data['release_time'] = date("Y-m-d H:i:s");
+            if(!empty($post['phone'])) {
+                $user_id = User::where('phone|email',$post['phone'])->value('id');
+                if(!$user_id) $this->error('账号未注册');
+                $data['user_id'] =  $user_id;
+            }else{
+                $data['user_id'] = '';
+            }
+        }
+
     }
 
     protected function _form_result($id)

+ 14 - 0
application/operate/view/supplier_goods/form.html

@@ -178,6 +178,20 @@
                         </div>
                     </div>
 
+                    <div class="layui-form-item">
+                        <label class="layui-form-label ">会员账号</label>
+                        <div class="layui-input-block">
+                            <input name="phone"   value='{$vo.phone|default=""}' placeholder="请输入会员会员账号" class="layui-input">
+                        </div>
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label ">上架时间</label>
+                        <div class="layui-input-block">
+                            <input name="release_time"   value='{$vo.release_time|default=""}'  class="layui-input">
+                        </div>
+                    </div>
+
                     <div class="layui-form-item layui-row layui-col-space15">
                         <label class="layui-col-xs9 relative">
                             <span class="color-green label-required-prev">图片</span>