Bläddra i källkod

Merge remote-tracking branch 'origin/master'

gogs 1 år sedan
förälder
incheckning
ebf378d24a

+ 361 - 305
.idea/workspace.xml

@@ -1,24 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="176ce5b1-6b6f-444a-bf9c-bbc11ffdb486" name="变更" comment="1">
-      <change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
+    <list default="true" id="176ce5b1-6b6f-444a-bf9c-bbc11ffdb486" name="变更" comment="">
+      <change afterPath="$PROJECT_DIR$/app/Jobs/ProcessDataJob.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/app/Model/ErrorTable.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/app/Model/U8Job.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/app/Service/U8ServerService.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/Authenticate.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/Authenticate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/CheckForMaintenanceMode.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/CheckForMaintenanceMode.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/CheckLogin.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/CheckLogin.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/CheckToken.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/CheckToken.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/EncryptCookies.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/EncryptCookies.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/RedirectIfAuthenticated.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/RedirectIfAuthenticated.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/RequestLog.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/RequestLog.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/TrimStrings.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/TrimStrings.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/TrustProxies.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/TrustProxies.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Middleware/VerifyCsrfToken.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/VerifyCsrfToken.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Model/PurchaseOrder.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Model/PurchaseOrder.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/Model/SalesOrder.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Model/SalesOrder.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/app/Service/CheckService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Service/CheckService.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Service/EmployeeService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Service/EmployeeService.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Service/PurchaseOrderService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Service/PurchaseOrderService.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Service/ReturnExchangeOrderService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Service/ReturnExchangeOrderService.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/Service/InvoiceOrderService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Service/InvoiceOrderService.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/Service/ProductService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Service/ProductService.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/Service/SalesOrderService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Service/SalesOrderService.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -162,10 +155,10 @@
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
       <recent name="D:\phpstudy_pro\WWW\t_nine\app\Model" />
+      <recent name="D:\phpstudy_pro\WWW\t_nine\app\Jobs" />
       <recent name="D:\phpstudy_pro\WWW\t_nine\app\Service" />
+      <recent name="D:\phpstudy_pro\WWW\t_nine\app\Import" />
       <recent name="D:\phpstudy_pro\WWW\t_nine\app\Http\Controllers\Api" />
-      <recent name="D:\phpstudy_pro\WWW\t_nine\app\Scopes" />
-      <recent name="D:\phpstudy_pro\WWW\t_nine\config" />
     </key>
   </component>
   <component name="RunManager">
@@ -229,359 +222,398 @@
       <workItem from="1704157369380" duration="20149000" />
       <workItem from="1704244039029" duration="21883000" />
       <workItem from="1704329760217" duration="29863000" />
-      <workItem from="1704416328387" duration="8686000" />
-    </task>
-    <task id="LOCAL-00172" summary="1">
-      <created>1703583245378</created>
-      <option name="number" value="00172" />
-      <option name="presentableId" value="LOCAL-00172" />
-      <option name="project" value="LOCAL" />
-      <updated>1703583245378</updated>
-    </task>
-    <task id="LOCAL-00173" summary="1">
-      <created>1703585628202</created>
-      <option name="number" value="00173" />
-      <option name="presentableId" value="LOCAL-00173" />
-      <option name="project" value="LOCAL" />
-      <updated>1703585628202</updated>
-    </task>
-    <task id="LOCAL-00174" summary="1">
-      <created>1703657262400</created>
-      <option name="number" value="00174" />
-      <option name="presentableId" value="LOCAL-00174" />
-      <option name="project" value="LOCAL" />
-      <updated>1703657262401</updated>
-    </task>
-    <task id="LOCAL-00175" summary="1">
-      <created>1703669328774</created>
-      <option name="number" value="00175" />
-      <option name="presentableId" value="LOCAL-00175" />
-      <option name="project" value="LOCAL" />
-      <updated>1703669328774</updated>
-    </task>
-    <task id="LOCAL-00176" summary="1">
-      <created>1703731913810</created>
-      <option name="number" value="00176" />
-      <option name="presentableId" value="LOCAL-00176" />
-      <option name="project" value="LOCAL" />
-      <updated>1703731913811</updated>
-    </task>
-    <task id="LOCAL-00177" summary="1">
-      <created>1703751835169</created>
-      <option name="number" value="00177" />
-      <option name="presentableId" value="LOCAL-00177" />
+      <workItem from="1704416328387" duration="26739000" />
+      <workItem from="1704676074743" duration="5686000" />
+      <workItem from="1704761793355" duration="4531000" />
+      <workItem from="1704847964844" duration="591000" />
+      <workItem from="1704867151378" duration="153000" />
+      <workItem from="1704934833905" duration="8910000" />
+      <workItem from="1705020715512" duration="5595000" />
+      <workItem from="1705034260826" duration="12089000" />
+      <workItem from="1705107431430" duration="36589000" />
+      <workItem from="1705414912306" duration="594000" />
+      <workItem from="1705452775259" duration="25204000" />
+      <workItem from="1705540424670" duration="17030000" />
+      <workItem from="1705624970506" duration="20758000" />
+      <workItem from="1705709597246" duration="1527000" />
+      <workItem from="1705718397750" duration="3747000" />
+      <workItem from="1705887301166" duration="13213000" />
+      <workItem from="1705971438817" duration="6976000" />
+      <workItem from="1706057370827" duration="9451000" />
+      <workItem from="1706144032392" duration="2392000" />
+      <workItem from="1706251771834" duration="6923000" />
+      <workItem from="1706493262624" duration="2815000" />
+      <workItem from="1706601660898" duration="1269000" />
+      <workItem from="1706751844740" duration="571000" />
+      <workItem from="1706840778799" duration="6731000" />
+      <workItem from="1707094587066" duration="9884000" />
+      <workItem from="1707181451295" duration="2932000" />
+      <workItem from="1707267897344" duration="7263000" />
+      <workItem from="1708304127142" duration="11247000" />
+      <workItem from="1708390341238" duration="4848000" />
+      <workItem from="1708408122356" duration="4699000" />
+      <workItem from="1708478150660" duration="6388000" />
+      <workItem from="1708563560848" duration="14413000" />
+      <workItem from="1708649793729" duration="33145000" />
+      <workItem from="1708749432203" duration="8418000" />
+      <workItem from="1708788357692" duration="3491000" />
+      <workItem from="1708855053155" duration="12892000" />
+      <workItem from="1708928684736" duration="1196000" />
+      <workItem from="1708995251552" duration="2539000" />
+      <workItem from="1709082036084" duration="20609000" />
+      <workItem from="1709167932063" duration="8544000" />
+      <workItem from="1709260961711" duration="9785000" />
+    </task>
+    <task id="LOCAL-00229" summary="1">
+      <created>1704449078067</created>
+      <option name="number" value="00229" />
+      <option name="presentableId" value="LOCAL-00229" />
+      <option name="project" value="LOCAL" />
+      <updated>1704449078067</updated>
+    </task>
+    <task id="LOCAL-00230" summary="1">
+      <created>1704935550744</created>
+      <option name="number" value="00230" />
+      <option name="presentableId" value="LOCAL-00230" />
+      <option name="project" value="LOCAL" />
+      <updated>1704935550744</updated>
+    </task>
+    <task id="LOCAL-00231" summary="1">
+      <created>1705050949090</created>
+      <option name="number" value="00231" />
+      <option name="presentableId" value="LOCAL-00231" />
+      <option name="project" value="LOCAL" />
+      <updated>1705050949090</updated>
+    </task>
+    <task id="LOCAL-00232" summary="1">
+      <created>1705051779717</created>
+      <option name="number" value="00232" />
+      <option name="presentableId" value="LOCAL-00232" />
+      <option name="project" value="LOCAL" />
+      <updated>1705051779717</updated>
+    </task>
+    <task id="LOCAL-00233" summary="1">
+      <created>1705204177677</created>
+      <option name="number" value="00233" />
+      <option name="presentableId" value="LOCAL-00233" />
+      <option name="project" value="LOCAL" />
+      <updated>1705204177678</updated>
+    </task>
+    <task id="LOCAL-00234" summary="1">
+      <created>1705223124499</created>
+      <option name="number" value="00234" />
+      <option name="presentableId" value="LOCAL-00234" />
+      <option name="project" value="LOCAL" />
+      <updated>1705223124499</updated>
+    </task>
+    <task id="LOCAL-00235" summary="1">
+      <created>1705239281929</created>
+      <option name="number" value="00235" />
+      <option name="presentableId" value="LOCAL-00235" />
+      <option name="project" value="LOCAL" />
+      <updated>1705239281929</updated>
+    </task>
+    <task id="LOCAL-00236" summary="1">
+      <created>1705239438436</created>
+      <option name="number" value="00236" />
+      <option name="presentableId" value="LOCAL-00236" />
+      <option name="project" value="LOCAL" />
+      <updated>1705239438436</updated>
+    </task>
+    <task id="LOCAL-00237" summary="1">
+      <created>1705473563158</created>
+      <option name="number" value="00237" />
+      <option name="presentableId" value="LOCAL-00237" />
+      <option name="project" value="LOCAL" />
+      <updated>1705473563158</updated>
+    </task>
+    <task id="LOCAL-00238" summary="1">
+      <created>1705486452971</created>
+      <option name="number" value="00238" />
+      <option name="presentableId" value="LOCAL-00238" />
+      <option name="project" value="LOCAL" />
+      <updated>1705486452971</updated>
+    </task>
+    <task id="LOCAL-00239" summary="1">
+      <created>1705560334309</created>
+      <option name="number" value="00239" />
+      <option name="presentableId" value="LOCAL-00239" />
       <option name="project" value="LOCAL" />
-      <updated>1703751835169</updated>
+      <updated>1705560334310</updated>
     </task>
-    <task id="LOCAL-00178" summary="1">
-      <created>1703843218578</created>
-      <option name="number" value="00178" />
-      <option name="presentableId" value="LOCAL-00178" />
+    <task id="LOCAL-00240" summary="1">
+      <created>1705561248803</created>
+      <option name="number" value="00240" />
+      <option name="presentableId" value="LOCAL-00240" />
       <option name="project" value="LOCAL" />
-      <updated>1703843218579</updated>
+      <updated>1705561248803</updated>
     </task>
-    <task id="LOCAL-00179" summary="1">
-      <created>1703843978667</created>
-      <option name="number" value="00179" />
-      <option name="presentableId" value="LOCAL-00179" />
+    <task id="LOCAL-00241" summary="1">
+      <created>1705568012263</created>
+      <option name="number" value="00241" />
+      <option name="presentableId" value="LOCAL-00241" />
       <option name="project" value="LOCAL" />
-      <updated>1703843978667</updated>
+      <updated>1705568012263</updated>
     </task>
-    <task id="LOCAL-00180" summary="1">
-      <created>1704164439745</created>
-      <option name="number" value="00180" />
-      <option name="presentableId" value="LOCAL-00180" />
+    <task id="LOCAL-00242" summary="1">
+      <created>1705568969205</created>
+      <option name="number" value="00242" />
+      <option name="presentableId" value="LOCAL-00242" />
       <option name="project" value="LOCAL" />
-      <updated>1704164439745</updated>
+      <updated>1705568969206</updated>
     </task>
-    <task id="LOCAL-00181" summary="1">
-      <created>1704164674332</created>
-      <option name="number" value="00181" />
-      <option name="presentableId" value="LOCAL-00181" />
+    <task id="LOCAL-00243" summary="1">
+      <created>1705633375746</created>
+      <option name="number" value="00243" />
+      <option name="presentableId" value="LOCAL-00243" />
       <option name="project" value="LOCAL" />
-      <updated>1704164674332</updated>
+      <updated>1705633375747</updated>
     </task>
-    <task id="LOCAL-00182" summary="1">
-      <created>1704178634002</created>
-      <option name="number" value="00182" />
-      <option name="presentableId" value="LOCAL-00182" />
+    <task id="LOCAL-00244" summary="1">
+      <created>1705637433590</created>
+      <option name="number" value="00244" />
+      <option name="presentableId" value="LOCAL-00244" />
       <option name="project" value="LOCAL" />
-      <updated>1704178634002</updated>
+      <updated>1705637433590</updated>
     </task>
-    <task id="LOCAL-00183" summary="1">
-      <created>1704179303081</created>
-      <option name="number" value="00183" />
-      <option name="presentableId" value="LOCAL-00183" />
+    <task id="LOCAL-00245" summary="1">
+      <created>1705644953983</created>
+      <option name="number" value="00245" />
+      <option name="presentableId" value="LOCAL-00245" />
       <option name="project" value="LOCAL" />
-      <updated>1704179303081</updated>
+      <updated>1705644953983</updated>
     </task>
-    <task id="LOCAL-00184" summary="1">
-      <created>1704248235927</created>
-      <option name="number" value="00184" />
-      <option name="presentableId" value="LOCAL-00184" />
+    <task id="LOCAL-00246" summary="1">
+      <created>1705648296981</created>
+      <option name="number" value="00246" />
+      <option name="presentableId" value="LOCAL-00246" />
       <option name="project" value="LOCAL" />
-      <updated>1704248235928</updated>
+      <updated>1705648296981</updated>
     </task>
-    <task id="LOCAL-00185" summary="1">
-      <created>1704250284857</created>
-      <option name="number" value="00185" />
-      <option name="presentableId" value="LOCAL-00185" />
+    <task id="LOCAL-00247" summary="1">
+      <created>1705648908877</created>
+      <option name="number" value="00247" />
+      <option name="presentableId" value="LOCAL-00247" />
       <option name="project" value="LOCAL" />
-      <updated>1704250284857</updated>
+      <updated>1705648908877</updated>
     </task>
-    <task id="LOCAL-00186" summary="1">
-      <created>1704260680916</created>
-      <option name="number" value="00186" />
-      <option name="presentableId" value="LOCAL-00186" />
+    <task id="LOCAL-00248" summary="1">
+      <created>1705650443100</created>
+      <option name="number" value="00248" />
+      <option name="presentableId" value="LOCAL-00248" />
       <option name="project" value="LOCAL" />
-      <updated>1704260680916</updated>
+      <updated>1705650443100</updated>
     </task>
-    <task id="LOCAL-00187" summary="1">
-      <created>1704263676175</created>
-      <option name="number" value="00187" />
-      <option name="presentableId" value="LOCAL-00187" />
+    <task id="LOCAL-00249" summary="1">
+      <created>1705654677045</created>
+      <option name="number" value="00249" />
+      <option name="presentableId" value="LOCAL-00249" />
       <option name="project" value="LOCAL" />
-      <updated>1704263676175</updated>
+      <updated>1705654677046</updated>
     </task>
-    <task id="LOCAL-00188" summary="1">
-      <created>1704263958094</created>
-      <option name="number" value="00188" />
-      <option name="presentableId" value="LOCAL-00188" />
+    <task id="LOCAL-00250" summary="1">
+      <created>1705657222963</created>
+      <option name="number" value="00250" />
+      <option name="presentableId" value="LOCAL-00250" />
       <option name="project" value="LOCAL" />
-      <updated>1704263958095</updated>
+      <updated>1705657222963</updated>
     </task>
-    <task id="LOCAL-00189" summary="1">
-      <created>1704332520949</created>
-      <option name="number" value="00189" />
-      <option name="presentableId" value="LOCAL-00189" />
+    <task id="LOCAL-00251" summary="1">
+      <created>1705711006670</created>
+      <option name="number" value="00251" />
+      <option name="presentableId" value="LOCAL-00251" />
       <option name="project" value="LOCAL" />
-      <updated>1704332520949</updated>
+      <updated>1705711006672</updated>
     </task>
-    <task id="LOCAL-00190" summary="1">
-      <created>1704334559929</created>
-      <option name="number" value="00190" />
-      <option name="presentableId" value="LOCAL-00190" />
+    <task id="LOCAL-00252" summary="1">
+      <created>1705726975651</created>
+      <option name="number" value="00252" />
+      <option name="presentableId" value="LOCAL-00252" />
       <option name="project" value="LOCAL" />
-      <updated>1704334559929</updated>
+      <updated>1705726975652</updated>
     </task>
-    <task id="LOCAL-00191" summary="1">
-      <created>1704343938193</created>
-      <option name="number" value="00191" />
-      <option name="presentableId" value="LOCAL-00191" />
+    <task id="LOCAL-00253" summary="1">
+      <created>1705727110391</created>
+      <option name="number" value="00253" />
+      <option name="presentableId" value="LOCAL-00253" />
       <option name="project" value="LOCAL" />
-      <updated>1704343938193</updated>
+      <updated>1705727110392</updated>
     </task>
-    <task id="LOCAL-00192" summary="1">
-      <created>1704346460971</created>
-      <option name="number" value="00192" />
-      <option name="presentableId" value="LOCAL-00192" />
+    <task id="LOCAL-00254" summary="1">
+      <created>1705727512756</created>
+      <option name="number" value="00254" />
+      <option name="presentableId" value="LOCAL-00254" />
       <option name="project" value="LOCAL" />
-      <updated>1704346460971</updated>
+      <updated>1705727512756</updated>
     </task>
-    <task id="LOCAL-00193" summary="1">
-      <created>1704346694713</created>
-      <option name="number" value="00193" />
-      <option name="presentableId" value="LOCAL-00193" />
+    <task id="LOCAL-00255" summary="1">
+      <created>1705729419379</created>
+      <option name="number" value="00255" />
+      <option name="presentableId" value="LOCAL-00255" />
       <option name="project" value="LOCAL" />
-      <updated>1704346694713</updated>
+      <updated>1705729419379</updated>
     </task>
-    <task id="LOCAL-00194" summary="1">
-      <created>1704347206668</created>
-      <option name="number" value="00194" />
-      <option name="presentableId" value="LOCAL-00194" />
+    <task id="LOCAL-00256" summary="1">
+      <created>1705902264955</created>
+      <option name="number" value="00256" />
+      <option name="presentableId" value="LOCAL-00256" />
       <option name="project" value="LOCAL" />
-      <updated>1704347206668</updated>
+      <updated>1705902264956</updated>
     </task>
-    <task id="LOCAL-00195" summary="1">
-      <created>1704347412646</created>
-      <option name="number" value="00195" />
-      <option name="presentableId" value="LOCAL-00195" />
+    <task id="LOCAL-00257" summary="1">
+      <created>1705991254540</created>
+      <option name="number" value="00257" />
+      <option name="presentableId" value="LOCAL-00257" />
       <option name="project" value="LOCAL" />
-      <updated>1704347412646</updated>
+      <updated>1705991254541</updated>
     </task>
-    <task id="LOCAL-00196" summary="1">
-      <created>1704347629035</created>
-      <option name="number" value="00196" />
-      <option name="presentableId" value="LOCAL-00196" />
+    <task id="LOCAL-00258" summary="1">
+      <created>1706004631863</created>
+      <option name="number" value="00258" />
+      <option name="presentableId" value="LOCAL-00258" />
       <option name="project" value="LOCAL" />
-      <updated>1704347629035</updated>
+      <updated>1706004631863</updated>
     </task>
-    <task id="LOCAL-00197" summary="1">
-      <created>1704348640957</created>
-      <option name="number" value="00197" />
-      <option name="presentableId" value="LOCAL-00197" />
+    <task id="LOCAL-00259" summary="1">
+      <created>1706256007902</created>
+      <option name="number" value="00259" />
+      <option name="presentableId" value="LOCAL-00259" />
       <option name="project" value="LOCAL" />
-      <updated>1704348640957</updated>
+      <updated>1706256007902</updated>
     </task>
-    <task id="LOCAL-00198" summary="1">
-      <created>1704349046152</created>
-      <option name="number" value="00198" />
-      <option name="presentableId" value="LOCAL-00198" />
+    <task id="LOCAL-00260" summary="1">
+      <created>1707110065752</created>
+      <option name="number" value="00260" />
+      <option name="presentableId" value="LOCAL-00260" />
       <option name="project" value="LOCAL" />
-      <updated>1704349046152</updated>
+      <updated>1707110065753</updated>
     </task>
-    <task id="LOCAL-00199" summary="1">
-      <created>1704349133489</created>
-      <option name="number" value="00199" />
-      <option name="presentableId" value="LOCAL-00199" />
+    <task id="LOCAL-00261" summary="1">
+      <created>1707115056203</created>
+      <option name="number" value="00261" />
+      <option name="presentableId" value="LOCAL-00261" />
       <option name="project" value="LOCAL" />
-      <updated>1704349133489</updated>
+      <updated>1707115056203</updated>
     </task>
-    <task id="LOCAL-00200" summary="1">
-      <created>1704349258502</created>
-      <option name="number" value="00200" />
-      <option name="presentableId" value="LOCAL-00200" />
+    <task id="LOCAL-00262" summary="1">
+      <created>1707122881613</created>
+      <option name="number" value="00262" />
+      <option name="presentableId" value="LOCAL-00262" />
       <option name="project" value="LOCAL" />
-      <updated>1704349258502</updated>
+      <updated>1707122881613</updated>
     </task>
-    <task id="LOCAL-00201" summary="1">
-      <created>1704349379510</created>
-      <option name="number" value="00201" />
-      <option name="presentableId" value="LOCAL-00201" />
+    <task id="LOCAL-00263" summary="1">
+      <created>1707125561996</created>
+      <option name="number" value="00263" />
+      <option name="presentableId" value="LOCAL-00263" />
       <option name="project" value="LOCAL" />
-      <updated>1704349379510</updated>
+      <updated>1707125561996</updated>
     </task>
-    <task id="LOCAL-00202" summary="1">
-      <created>1704349465060</created>
-      <option name="number" value="00202" />
-      <option name="presentableId" value="LOCAL-00202" />
+    <task id="LOCAL-00264" summary="新增微信端区分是否绑定账号">
+      <created>1707200010484</created>
+      <option name="number" value="00264" />
+      <option name="presentableId" value="LOCAL-00264" />
       <option name="project" value="LOCAL" />
-      <updated>1704349465060</updated>
+      <updated>1707200010484</updated>
     </task>
-    <task id="LOCAL-00203" summary="1">
-      <created>1704350378577</created>
-      <option name="number" value="00203" />
-      <option name="presentableId" value="LOCAL-00203" />
+    <task id="LOCAL-00265" summary="1">
+      <created>1708594093608</created>
+      <option name="number" value="00265" />
+      <option name="presentableId" value="LOCAL-00265" />
       <option name="project" value="LOCAL" />
-      <updated>1704350378577</updated>
+      <updated>1708594093609</updated>
     </task>
-    <task id="LOCAL-00204" summary="1">
-      <created>1704350799099</created>
-      <option name="number" value="00204" />
-      <option name="presentableId" value="LOCAL-00204" />
+    <task id="LOCAL-00266" summary="1">
+      <created>1708671866076</created>
+      <option name="number" value="00266" />
+      <option name="presentableId" value="LOCAL-00266" />
       <option name="project" value="LOCAL" />
-      <updated>1704350799099</updated>
+      <updated>1708671866078</updated>
     </task>
-    <task id="LOCAL-00205" summary="1">
-      <created>1704350896710</created>
-      <option name="number" value="00205" />
-      <option name="presentableId" value="LOCAL-00205" />
+    <task id="LOCAL-00267" summary="1">
+      <created>1708679745249</created>
+      <option name="number" value="00267" />
+      <option name="presentableId" value="LOCAL-00267" />
       <option name="project" value="LOCAL" />
-      <updated>1704350896710</updated>
+      <updated>1708679745250</updated>
     </task>
-    <task id="LOCAL-00206" summary="1">
-      <created>1704350938245</created>
-      <option name="number" value="00206" />
-      <option name="presentableId" value="LOCAL-00206" />
+    <task id="LOCAL-00268" summary="1">
+      <created>1708754916499</created>
+      <option name="number" value="00268" />
+      <option name="presentableId" value="LOCAL-00268" />
       <option name="project" value="LOCAL" />
-      <updated>1704350938245</updated>
+      <updated>1708754916500</updated>
     </task>
-    <task id="LOCAL-00207" summary="1">
-      <created>1704351025993</created>
-      <option name="number" value="00207" />
-      <option name="presentableId" value="LOCAL-00207" />
+    <task id="LOCAL-00269" summary="1">
+      <created>1708912412166</created>
+      <option name="number" value="00269" />
+      <option name="presentableId" value="LOCAL-00269" />
       <option name="project" value="LOCAL" />
-      <updated>1704351025993</updated>
+      <updated>1708912412167</updated>
     </task>
-    <task id="LOCAL-00208" summary="1">
-      <created>1704351071869</created>
-      <option name="number" value="00208" />
-      <option name="presentableId" value="LOCAL-00208" />
+    <task id="LOCAL-00270" summary="1">
+      <created>1709028150589</created>
+      <option name="number" value="00270" />
+      <option name="presentableId" value="LOCAL-00270" />
       <option name="project" value="LOCAL" />
-      <updated>1704351071869</updated>
+      <updated>1709028150589</updated>
     </task>
-    <task id="LOCAL-00209" summary="1">
-      <created>1704351168803</created>
-      <option name="number" value="00209" />
-      <option name="presentableId" value="LOCAL-00209" />
+    <task id="LOCAL-00271" summary="1">
+      <created>1709028429480</created>
+      <option name="number" value="00271" />
+      <option name="presentableId" value="LOCAL-00271" />
       <option name="project" value="LOCAL" />
-      <updated>1704351168803</updated>
+      <updated>1709028429480</updated>
     </task>
-    <task id="LOCAL-00210" summary="1">
-      <created>1704351388209</created>
-      <option name="number" value="00210" />
-      <option name="presentableId" value="LOCAL-00210" />
+    <task id="LOCAL-00272" summary="1">
+      <created>1709105613826</created>
+      <option name="number" value="00272" />
+      <option name="presentableId" value="LOCAL-00272" />
       <option name="project" value="LOCAL" />
-      <updated>1704351388209</updated>
+      <updated>1709105613826</updated>
     </task>
-    <task id="LOCAL-00211" summary="1">
-      <created>1704351441475</created>
-      <option name="number" value="00211" />
-      <option name="presentableId" value="LOCAL-00211" />
+    <task id="LOCAL-00273" summary="1">
+      <created>1709115828930</created>
+      <option name="number" value="00273" />
+      <option name="presentableId" value="LOCAL-00273" />
       <option name="project" value="LOCAL" />
-      <updated>1704351441475</updated>
+      <updated>1709115828930</updated>
     </task>
-    <task id="LOCAL-00212" summary="1">
-      <created>1704351927666</created>
-      <option name="number" value="00212" />
-      <option name="presentableId" value="LOCAL-00212" />
+    <task id="LOCAL-00274" summary="1">
+      <created>1709115879429</created>
+      <option name="number" value="00274" />
+      <option name="presentableId" value="LOCAL-00274" />
       <option name="project" value="LOCAL" />
-      <updated>1704351927666</updated>
+      <updated>1709115879429</updated>
     </task>
-    <task id="LOCAL-00213" summary="1">
-      <created>1704353323758</created>
-      <option name="number" value="00213" />
-      <option name="presentableId" value="LOCAL-00213" />
+    <task id="LOCAL-00275" summary="1">
+      <created>1709176864882</created>
+      <option name="number" value="00275" />
+      <option name="presentableId" value="LOCAL-00275" />
       <option name="project" value="LOCAL" />
-      <updated>1704353323759</updated>
+      <updated>1709176864883</updated>
     </task>
-    <task id="LOCAL-00214" summary="1">
-      <created>1704353450861</created>
-      <option name="number" value="00214" />
-      <option name="presentableId" value="LOCAL-00214" />
+    <task id="LOCAL-00276" summary="1">
+      <created>1709189537300</created>
+      <option name="number" value="00276" />
+      <option name="presentableId" value="LOCAL-00276" />
       <option name="project" value="LOCAL" />
-      <updated>1704353450861</updated>
+      <updated>1709189537300</updated>
     </task>
-    <task id="LOCAL-00215" summary="1">
-      <created>1704357113365</created>
-      <option name="number" value="00215" />
-      <option name="presentableId" value="LOCAL-00215" />
+    <task id="LOCAL-00277" summary="1">
+      <created>1709193138747</created>
+      <option name="number" value="00277" />
+      <option name="presentableId" value="LOCAL-00277" />
       <option name="project" value="LOCAL" />
-      <updated>1704357113365</updated>
+      <updated>1709193138747</updated>
     </task>
-    <task id="LOCAL-00216" summary="1">
-      <created>1704357281861</created>
-      <option name="number" value="00216" />
-      <option name="presentableId" value="LOCAL-00216" />
-      <option name="project" value="LOCAL" />
-      <updated>1704357281861</updated>
-    </task>
-    <task id="LOCAL-00217" summary="1">
-      <created>1704357531710</created>
-      <option name="number" value="00217" />
-      <option name="presentableId" value="LOCAL-00217" />
-      <option name="project" value="LOCAL" />
-      <updated>1704357531710</updated>
-    </task>
-    <task id="LOCAL-00218" summary="1">
-      <created>1704361462020</created>
-      <option name="number" value="00218" />
-      <option name="presentableId" value="LOCAL-00218" />
-      <option name="project" value="LOCAL" />
-      <updated>1704361462020</updated>
-    </task>
-    <task id="LOCAL-00219" summary="1">
-      <created>1704362565288</created>
-      <option name="number" value="00219" />
-      <option name="presentableId" value="LOCAL-00219" />
-      <option name="project" value="LOCAL" />
-      <updated>1704362565288</updated>
-    </task>
-    <task id="LOCAL-00220" summary="1">
-      <created>1704363120349</created>
-      <option name="number" value="00220" />
-      <option name="presentableId" value="LOCAL-00220" />
-      <option name="project" value="LOCAL" />
-      <updated>1704363120349</updated>
-    </task>
-    <option name="localTasksCounter" value="221" />
+    <option name="localTasksCounter" value="278" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="3" />
   </component>
   <component name="VcsManagerConfiguration">
-    <MESSAGE value="产品根据范围呈现数据" />
     <MESSAGE value="发货单" />
     <MESSAGE value="采购单状态更新" />
     <MESSAGE value="收货单" />
@@ -605,6 +637,7 @@
     <MESSAGE value="现存量" />
     <MESSAGE value="修改" />
     <MESSAGE value="做到产品加上自定义的钱" />
+    <MESSAGE value="新增微信端区分是否绑定账号" />
     <MESSAGE value="1" />
     <option name="LAST_COMMIT_MESSAGE" value="1" />
   </component>
@@ -622,7 +655,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php-line-method">
           <url>file://$PROJECT_DIR$/app/Service/EmployeeService.php</url>
-          <line>328</line>
+          <line>329</line>
           <properties>
             <option name="className" value="\App\Service\EmployeeService" />
             <option name="methodName" value="roleEdit" />
@@ -631,7 +664,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php-line-method">
           <url>file://$PROJECT_DIR$/app/Service/EmployeeService.php</url>
-          <line>1064</line>
+          <line>1089</line>
           <properties>
             <option name="className" value="\App\Service\EmployeeService" />
             <option name="methodName" value="getPersonRole" />
@@ -640,7 +673,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php-line-method">
           <url>file://$PROJECT_DIR$/app/Service/EmployeeService.php</url>
-          <line>364</line>
+          <line>365</line>
           <properties>
             <option name="className" value="\App\Service\EmployeeService" />
             <option name="methodName" value="roleDel" />
@@ -649,7 +682,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php-line-method">
           <url>file://$PROJECT_DIR$/app/Service/SalesOrderService.php</url>
-          <line>846</line>
+          <line>922</line>
           <properties>
             <option name="className" value="\App\Service\SalesOrderService" />
             <option name="methodName" value="salesOrderDispatchCompanyRule" />
@@ -667,7 +700,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php-line-method">
           <url>file://$PROJECT_DIR$/app/Service/CustomerService.php</url>
-          <line>437</line>
+          <line>444</line>
           <properties>
             <option name="className" value="\App\Service\CustomerService" />
             <option name="methodName" value="customerList" />
@@ -676,7 +709,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php-line-method">
           <url>file://$PROJECT_DIR$/app/Service/RangeService.php</url>
-          <line>281</line>
+          <line>313</line>
           <properties>
             <option name="className" value="\App\Service\RangeService" />
             <option name="methodName" value="supplierRange" />
@@ -692,29 +725,37 @@
           </properties>
           <option name="timeStamp" value="28" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" type="php-line-method">
+          <url>file://$PROJECT_DIR$/app/Service/EmployeeService.php</url>
+          <line>1230</line>
+          <properties>
+            <option name="className" value="\App\Service\EmployeeService" />
+            <option name="methodName" value="getLoginDepart" />
+          </properties>
+          <option name="timeStamp" value="31" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="php-line-method">
+          <url>file://$PROJECT_DIR$/app/Import/Import.php</url>
+          <line>171</line>
+          <properties>
+            <option name="className" value="\App\Import\Import" />
+            <option name="methodName" value="checkData" />
+          </properties>
+          <option name="timeStamp" value="36" />
+        </line-breakpoint>
         <line-breakpoint enabled="true" type="php">
           <url>file://$PROJECT_DIR$/app/Service/OperationLogService.php</url>
-          <line>130</line>
+          <line>299</line>
           <option name="timeStamp" value="8" />
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php">
-          <url>file://$PROJECT_DIR$/app/Service/SalesOrderService.php</url>
-          <line>214</line>
-          <option name="timeStamp" value="9" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" type="php">
           <url>file://$PROJECT_DIR$/app/Service/CustomerService.php</url>
           <line>212</line>
           <option name="timeStamp" value="10" />
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php">
-          <url>file://$PROJECT_DIR$/app/Service/EmployeeService.php</url>
-          <line>758</line>
-          <option name="timeStamp" value="12" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" type="php">
           <url>file://$PROJECT_DIR$/app/Service/ConstructionService.php</url>
-          <line>90</line>
+          <line>95</line>
           <option name="timeStamp" value="15" />
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php">
@@ -727,6 +768,21 @@
           <line>186</line>
           <option name="timeStamp" value="26" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" type="php">
+          <url>file://$PROJECT_DIR$/config/oa.php</url>
+          <line>547</line>
+          <option name="timeStamp" value="29" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="php">
+          <url>file://$PROJECT_DIR$/config/oa.php</url>
+          <line>6</line>
+          <option name="timeStamp" value="33" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="php">
+          <url>file://$PROJECT_DIR$/config/excel/product.php</url>
+          <line>2</line>
+          <option name="timeStamp" value="35" />
+        </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
   </component>

+ 35 - 0
app/Http/Controllers/Api/TableHeadController.php

@@ -0,0 +1,35 @@
+<?php
+
+namespace App\Http\Controllers\Api;
+
+use App\Service\TableHeadService;
+use Illuminate\Http\Request;
+
+class TableHeadController extends BaseController
+{
+    public function tableHeadAdd(Request $request)
+    {
+        $service = new TableHeadService();
+        $userData = $request->userData->toArray();
+        list($status,$data) = $service->tableheadAdd($request->all(),$userData);
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
+    public function tableHeadGet(Request $request)
+    {
+        $service = new TableHeadService();
+        $userData = $request->userData->toArray();
+        list($status,$data) = $service->tableheadGet($request->all(),$userData);
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+}

+ 3 - 0
app/Model/BasicType.php

@@ -34,5 +34,8 @@ class BasicType extends UseScopeBaseModel
         21 => '跟进方式',
         22 => '产品价格',
         23 => '安装地点',
+        24 => '平台类型',
+        25 => '业务类型',
+        26 => '销售类型',
     ];
 }

+ 3 - 3
app/Model/Construction.php

@@ -24,9 +24,9 @@ class Construction extends UseScopeBaseModel
     const STATE_ONE = 1;//待确认
     const STATE_TWO = 2;//已确认
     public static $name = [
-        self::STATE_ZERO => '未确认',
-        self::STATE_ONE => '待确认',
-        self::STATE_TWO => '已确认',
+        self::STATE_ZERO => '未施工',
+        self::STATE_ONE => '施工中',
+        self::STATE_TWO => '已施工',
     ];
     const range_function = 'constructionRange';
 }

+ 15 - 3
app/Model/SalesOrder.php

@@ -19,15 +19,18 @@ class SalesOrder extends UseScopeBaseModel
     const Model_type_one = 1; // 线下订单合同
     const Model_type_two = 2; // 分社订货合同
     const Model_type_three = 3; // 二手车精品加装合同
+    const Model_type_four = 4; // 线上订单合同
     public static $model_type = [
         self::Model_type_one,
         self::Model_type_two,
-        self::Model_type_three
+        self::Model_type_three,
+        self::Model_type_four,
     ];
     public static $model_type_title = [
         self::Model_type_one => '线下订单合同',
         self::Model_type_two => '分社订货合同',
         self::Model_type_three => '二手车精品加装合同',
+        self::Model_type_four => '线上订单合同',
     ];
 
     //安装件
@@ -60,9 +63,18 @@ class SalesOrder extends UseScopeBaseModel
         self::State2_one => '已发货',
     ];
 
+    //发货状态
+    const invoice_zero = 0;//未发货
+    const invoice_one = 1;//已发货
+    public static $invoice_state = [
+        self::invoice_zero => '未发货',
+        self::invoice_one => '已发货',
+    ];
+
     public static $prefix = [
-        self::Model_type_one => 'T9XS.',
+        self::Model_type_one => 'T9XX.',
         self::Model_type_two => 'T9SO.',
-        self::Model_type_three => 'T9XS.'
+        self::Model_type_three => 'T9XX.',
+        self::Model_type_four => 'T9XS.'
     ];
 }

+ 14 - 0
app/Model/TableSetting.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace App\Model;
+
+use Illuminate\Database\Eloquent\Model;
+
+
+class TableSetting extends Model
+{
+    protected $table = "table_setting"; //指定表
+    const CREATED_AT = 'crt_time';
+    const UPDATED_AT = 'upd_time';
+    protected $dateFormat = 'U';
+}

+ 41 - 20
app/Service/CheckService.php

@@ -208,7 +208,19 @@ class CheckService extends Service
 
         InvoiceOrder::where('del_time',0)->where('order_number',$data['order_number'])
             ->update(['state' => InvoiceOrder::STATE_TWO]);
-        SalesOrder::where('id',$model->sales_order_id)->update(['state' => SalesOrder::State2_one]);
+        $sale = SalesOrder::where('id',$model->sales_order_id)->first();
+        if($sale['sales_order_type'] == SalesOrder::Order_type_one){
+            //安装件更新发货状态
+            SalesOrder::where('id',$model->sales_order_id)
+                ->update(['invoice_state' => SalesOrder::invoice_one]);
+        }else{
+            //快递件更新 单据状态 发货状态
+            SalesOrder::where('id',$model->sales_order_id)
+                ->update([
+                    'state' => SalesOrder::State2_one,
+                    'invoice_state' => SalesOrder::invoice_one
+                ]);
+        }
 
         return [true, $model->toArray()];
     }
@@ -302,7 +314,7 @@ class CheckService extends Service
         return [true,''];
     }
 
-    //todo
+    //分社订货合同
     public function createPurchaseOrderSales($order){
         //没有供应商 不创建合同
         if(empty($order['supplier'])) return [true, ''];
@@ -325,6 +337,7 @@ class CheckService extends Service
             ->get()->toArray();
         if(empty($product)) return [false, '采购订单产品数据不能为空'];
 
+        $time = time();
         $depart_id = Depart::where('del_time',0)->where('parent_id',0)->where('is_main',1)->value('id');
         $model = new SalesOrder();
         $model->model_type = SalesOrder::Model_type_two;
@@ -336,47 +349,55 @@ class CheckService extends Service
         $model->other_fee = $order['other_fee'];
         $model->discount_fee = $order['discount_fee'];
         $model->contract_fee = $order['purchase_total'];
+        $model->sign_time = $time;
+
         $model->save();
         $sales_order_id = $model->id;
 
         //产品字典
         $product_map = (new ProductService())->getProductDetail(array_column($product,'product_id'));
 
-        //获取产品采购使用金额
-        $map = (new ProductService())->getProductPrice(array_column($product,'product_id'),1);
-        //获取部门目前使用的分社价
-        $basic_type_id = Depart::where('id',$order['top_depart_id'])->value('basic_type_id');
-        //产品对应的分社价
-        $new_map = [];
-        foreach ($map as $product_id => $value){
-            foreach ($value as $v){
-                if($v['basic_type_id'] == $basic_type_id && ! empty($v['price'])) $new_map[$product_id] = $v['price'];
-            }
-        }
+//        //获取产品采购使用金额
+//        $map = (new ProductService())->getProductPrice(array_column($product,'product_id'));
+//        //获取部门目前使用的分社价
+//        $basic_type_id = Depart::where('id',$order['top_depart_id'])->value('basic_type_id');
+//        //产品对应的分社价
+//        $new_map = [];
+//        foreach ($map as $product_id => $value){
+//            foreach ($value as $v){
+//                if($v['basic_type_id'] == $basic_type_id && ! empty($v['price'])) $new_map[$product_id] = $v['price'];
+//            }
+//        }
 
         $insert = [];
         $product_total = 0;
         foreach ($product as $value){
             $tmp = $product_map[$value['product_id']] ?? [];
-            $fs_price = $new_map[$value['product_id']] ?? 0;
+//            $fs_price = $new_map[$value['product_id']] ?? 0;
             //有分社价就是分社价格 没有就是零售
-            $price = $fs_price ? $fs_price : $tmp['retail_price'];
-            $product_total += $price * $value['number'];
+//            $price = $fs_price ? $fs_price : $tmp['retail_price'];
+            $product_total += $value['price'] * $value['number'];
             $insert[] = [
                 'sales_order_id' => $sales_order_id,
                 'product_id' => $value['product_id'],
                 'number' => $value['number'],
-                'basic_type_id' => $basic_type_id,
-                'price' => $price,
+                'basic_type_id' => $value['basic_type_id'],
+                'price' => $value['price'],
                 'cost' => $tmp['cost'] ?? 0,
                 'retail_price' => $tmp['retail_price'] ?? 0,
+                'final_amount' => $value['price'] * $value['number'],
             ];
         }
         $bool = SalesOrderProductInfo::insert($insert);
         if(! $bool) return [false,'合同生成失败!'];
 
-        //反写产品总计
-        SalesOrder::where('id',$sales_order_id)->update(['product_total' => $product_total]);
+        //反写数据
+        $rate = ($product_total + $order['other_fee'] - $order['discount_fee']) / ($product_total + $order['other_fee'] ?? 1);
+        SalesOrder::where('id',$sales_order_id)->update([
+            'product_total' => $product_total,
+            'rate' =>$rate
+        ]);
+
         return [true,''];
     }
 

+ 30 - 0
app/Service/ConstructionService.php

@@ -7,6 +7,7 @@ use App\Model\Construction;
 use App\Model\ConstructionInfo;
 use App\Model\ConstructionProductInfo;
 use App\Model\Customer;
+use App\Model\Depart;
 use App\Model\Employee;
 use App\Model\SalesOrder;
 use App\Model\SalesOrderProductInfo;
@@ -539,6 +540,10 @@ class ConstructionService extends Service
         $storehouse = Storehouse::whereIn('id',array_unique(array_column($data['data'],'storehouse_id')))
             ->pluck('title','id')
             ->toArray();
+
+        //分派的总社或分社
+        $dispatch = $this->getDispatchData($data['data']);
+
         foreach ($data['data'] as $key => $value){
             $address = '';
             if(! empty($value['address1'])) {
@@ -561,11 +566,36 @@ class ConstructionService extends Service
             $data['data'][$key]['state_title'] = Construction::$name[$value['state']] ?? '';
             $data['data'][$key]['sales_order_number'] = $sales[$value['sales_order_id']] ?? '';
             $data['data'][$key]['storehouse_title'] = $storehouse[$value['storehouse_id']] ?? '';
+            $data['data'][$key]['dispatch_company'] = $dispatch[$value['sales_order_id']] ?? '';
         }
 
         return $data;
     }
 
+    public function getDispatchData($data){
+        $search_id = [];
+        foreach ($data as $value){
+            $search_id[] = $value['sales_order_id'];
+        }
+        if(empty($search_id)) return [];
+
+        $see = SeeRange::where('del_time',0)
+            ->whereIn('data_id',$search_id)
+            ->where('data_type',SeeRange::type_seven)
+            ->where('type',SeeRange::data_three)
+            ->select('data_id','param_id')
+            ->get()->toArray();
+        $map = Depart::whereIn('id',array_unique(array_column($see,'param_id')))
+            ->pluck('title','id')
+            ->toArray();
+        $see_array = [];
+        foreach ($see as $value){
+            $see_array[$value['data_id']] = $map[$value['param_id']] ?? "";
+        }
+
+        return $see_array;
+    }
+
     /**
      * 获取施工单号
      * @param $data

+ 1 - 1
app/Service/InvoiceOrderService.php

@@ -297,7 +297,7 @@ class InvoiceOrderService extends Service
                 ->where('id',$data['sales_order_id'])
                 ->first();
             if(empty($sales)) return [false,'合同不存在或已被删除'];
-            if($sales['sales_order_type'] != SalesOrder::Order_type_two) return [false,'非快递件合同'];
+//            if($sales['sales_order_type'] != SalesOrder::Order_type_two) return [false,'非快递件合同'];
         }
 
         //所属部门 以及  顶级部门

+ 9 - 1
app/Service/ProductInventoryService.php

@@ -357,7 +357,7 @@ class ProductInventoryService extends Service
     public function productInventorySetList($data, $user){
         $model = ProductInventorySet::TopClear($user,$data);
         $model = $model->where('del_time',0)
-            ->select('id','top_depart_id','param_one','param_two')
+            ->select('id','top_depart_id','param_one','param_two','param_three')
             ->orderby('id', 'desc');
         $list = $model->get()->toArray();
         $map = Depart::whereIn('id',array_column($list,'top_depart_id'))->pluck('title','id')->toArray();
@@ -383,6 +383,14 @@ class ProductInventoryService extends Service
                 ->update(['param_two' => $data['param_two']]);
         }
 
+        if(isset($data['param_three'])){
+            $res = $this->checkNumber($data['param_three']);
+            if(! $res) return [false, '比例请输入不超过两位小数并且大于0的数值'];
+            if($data['param_three'] < 3) return [false,'比例不能小于3%'];
+            ProductInventorySet::where('id',$data['id'])
+                ->update(['param_three' => $data['param_three']]);
+        }
+
         return [true, ''];
     }
 }

+ 9 - 8
app/Service/ProductService.php

@@ -185,7 +185,8 @@ class ProductService extends Service
             $model->product_category = $data['product_category'] ?? '';
             $model->title = $data['title'];
             $model->code = $data['code'] ?? '';
-            $model->sn_code = $data['sn_code'] ?? '';
+            $model->warranty_time = $data['warranty_time'] ?? 0;
+            $model->install_time = $data['install_time'] ?? 0;
             $model->size = $data['size'] ?? '';
             $model->unit = $data['unit'] ?? 0;
             $model->bar_code = $data['bar_code'] ?? '';
@@ -283,7 +284,8 @@ class ProductService extends Service
             $model->product_category = $data['product_category'] ?? '';
             $model->title = $data['title'];
             $model->code = $data['code'] ?? '';
-            $model->sn_code = $data['sn_code'] ?? '';
+            $model->warranty_time = $data['warranty_time'] ?? 0;
+            $model->install_time = $data['install_time'] ?? 0;
             $model->size = $data['size'] ?? '';
             $model->unit = $data['unit'] ?? 0;
             $model->bar_code = $data['bar_code'] ?? '';
@@ -506,7 +508,7 @@ class ProductService extends Service
     public function productList($data,$user){
         $model = Product::ProductClear($user,$data);
         $model = $model->where('del_time',0)
-            ->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','state','crt_id','crt_time','mark','depart_id','top_depart_id','sn_code')
+            ->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','state','crt_id','crt_time','mark','depart_id','top_depart_id','install_time')
             ->orderby('id', 'desc');
 
         if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
@@ -530,7 +532,7 @@ class ProductService extends Service
         if(! empty($list)) {
             $productList = Product::where('del_time',0)
                 ->whereIn('product_category_id',array_column($list,'id'))
-                ->select('id','product_category_id','title','code','sn_code')
+                ->select('id','product_category_id','title','code')
                 ->get()->toArray();
             $productMap = [];
             foreach ($productList as $value){
@@ -557,7 +559,6 @@ class ProductService extends Service
         if(empty($data['title'])) return [false,'产品名称不能为空'];
         if(empty($data['product_category_id'])) return [false,'产品分类不能为空'];
         if(empty($data['code'])) return [false,'产品编码不能为空'];
-        if(empty($data['sn_code'])) return [false,'产品SN编码不能为空'];
         if(empty($data['cost'])) return [false,'成本不能为空'];
         $res = $this->checkNumber($data['cost']);
         if(! $res) return [false,'成本请输入不超过两位小数并且大于0的数值'];
@@ -588,17 +589,17 @@ class ProductService extends Service
         $top_depart_id = $user['head'] ?? [];
         $top_depart_id = $top_depart_id['id'] ?? 0;
         if($is_add){
-            $bool = Product::whereRaw("(binary code = '{$data['code']}' OR title = '{$data['title']}' OR sn_code = '{$data['sn_code']}') AND (top_depart_id = {$data['top_depart_id']} OR top_depart_id = {$top_depart_id})")
+            $bool = Product::whereRaw("(binary code = '{$data['code']}' OR title = '{$data['title']}') AND (top_depart_id = {$data['top_depart_id']} OR top_depart_id = {$top_depart_id})")
                 ->where('del_time',0)
                 ->exists();
         }else{
             if(empty($data['id'])) return [false,'ID不能为空'];
-            $bool = Product::whereRaw("(binary code = '{$data['code']}' OR title = '{$data['title']}' OR sn_code = '{$data['sn_code']}') AND (top_depart_id = {$data['top_depart_id']} OR top_depart_id = {$top_depart_id})")
+            $bool = Product::whereRaw("(binary code = '{$data['code']}' OR title = '{$data['title']}') AND (top_depart_id = {$data['top_depart_id']} OR top_depart_id = {$top_depart_id})")
                 ->where('id','<>',$data['id'])
                 ->where('del_time',0)
                 ->exists();
         }
-        if($bool) return [false,'产品名称、编码与SN编码不能重复'];
+        if($bool) return [false,'产品名称、编码不能重复'];
 
         return [true, $data];
     }

+ 110 - 12
app/Service/SalesOrderService.php

@@ -7,7 +7,9 @@ use App\Model\BookingList;
 use App\Model\Construction;
 use App\Model\Customer;
 use App\Model\CustomerInfo;
+use App\Model\Depart;
 use App\Model\Employee;
+use App\Model\InvoiceOrder;
 use App\Model\Product;
 use App\Model\SalesOrder;
 use App\Model\SalesOrderInfo;
@@ -47,6 +49,10 @@ class SalesOrderService extends Service
             $model->title = $data['title'] ?? '';
             $model->selling_price = $data['selling_price'] ?? 0;
             $model->vin_no = $data['vin_no'] ?? '';
+            $model->business_type = $data['business_type'] ?? 0;
+            $model->sale_type = $data['sale_type'] ?? 0;
+            $model->plat_type = $data['plat_type'] ?? 0;
+            $model->plat_order = $data['plat_order'] ?? '';
             $model->order_type = $data['order_type'] ?? 0;
             $model->deal_type = $data['deal_type'] ?? 0;
             $model->customer_id = $data['customer_id'] ?? 0;
@@ -164,6 +170,16 @@ class SalesOrderService extends Service
             return [false,$exception->getMessage()];
         }
 
+        if(! empty($data['check'])) {
+            list($status,$msg) = (new CheckService())->checkAll([
+                "id" => $data['id'],
+                "order_number" => $data['order_number'],
+                "opt_case" => CheckService::eight,
+                "menu_id" => $data['menu_id']
+            ],$user);
+            if(! $status) return [false, '保存成功,合同确认失败,异常信息:' . $msg];
+        }
+
         return [true,''];
     }
 
@@ -187,6 +203,10 @@ class SalesOrderService extends Service
             $model->title = $data['title'] ?? '';
             $model->selling_price = $data['selling_price'] ?? 0;
             $model->vin_no = $data['vin_no'] ?? '';
+            $model->business_type = $data['business_type'] ?? 0;
+            $model->sale_type = $data['sale_type'] ?? 0;
+            $model->plat_type = $data['plat_type'] ?? 0;
+            $model->plat_order = $data['plat_order'] ?? '';
             $model->order_type = $data['order_type'] ?? 0;
             $model->deal_type = $data['deal_type'] ?? 0;
             $model->customer_id = $data['customer_id'] ?? 0;
@@ -299,6 +319,17 @@ class SalesOrderService extends Service
             DB::rollBack();
             return [false,$exception->getLine().':'.$exception->getMessage()];
         }
+
+        if(! empty($data['check'])) {
+            list($status,$msg) = (new CheckService())->checkAll([
+                "id" => $model->id,
+                "order_number" => $data['order_number'],
+                "opt_case" => CheckService::eight,
+                "menu_id" => $data['menu_id']
+            ],$user);
+            if(! $status) return [false, '保存成功,合同确认失败,异常信息:' . $msg];
+        }
+
         (new OperationLogService())->setOperationList($data,$user);
 
         return [true,''];
@@ -359,6 +390,9 @@ class SalesOrderService extends Service
         $sales['sales_order_type_title'] = SalesOrder::$order_type[$sales['sales_order_type']] ?? '';
         $sales['activity_product'] = $sales['file'] = $sales['employee_one'] = $sales['employee_two'] = $sales['employee_three'] = $sales['product'] = $sales['dispatch_depart_one'] = $sales['dispatch_employee'] = $sales['dispatch_depart_two'] = [];
         $array = [
+            $sales['business_type'],
+            $sales['sale_type'],
+            $sales['plat_type'],
             $sales['order_type'],
             $sales['deal_type'],
             $sales['contract_state'],
@@ -373,6 +407,9 @@ class SalesOrderService extends Service
             ->toArray();
         $sales = [$sales];
         foreach ($sales as $key => $value){
+            $sales[$key]['business_type_title'] = $basic_map[$value['business_type']] ?? '';
+            $sales[$key]['sale_type_title'] = $basic_map[$value['sale_type']] ?? '';
+            $sales[$key]['plat_type_title'] = $basic_map[$value['plat_type']] ?? '';
             $sales[$key]['order_type_title'] = $basic_map[$value['order_type']] ?? '';
             $sales[$key]['deal_type_title'] = $basic_map[$value['deal_type']] ?? '';
             $sales[$key]['contract_state_title'] = $basic_map[$value['contract_state']] ?? '';
@@ -508,7 +545,7 @@ class SalesOrderService extends Service
     public function salesOrderList($data,$user){
         $model = SalesOrder::Clear($user,$data);
         $model = $model->where('del_time',0)
-            ->select('title','id','sales_order_type','model_type','order_number','selling_price','vin_no','car_type','order_type','deal_type','customer_id','sign_time','contract_state','crt_id','crt_time','mark','product_total','rate','construction_time','handover_time','expire_time','other_fee','discount_fee','contract_fee','contract_type','pay_way','send_state','logistics_company','logistics_number','car_type','year','mileage','color','original_set','processing','state')
+            ->select('title','id','sales_order_type','model_type','order_number','selling_price','vin_no','car_type','order_type','deal_type','customer_id','sign_time','contract_state','crt_id','crt_time','mark','product_total','rate','construction_time','handover_time','expire_time','other_fee','discount_fee','contract_fee','contract_type','pay_way','send_state','logistics_company','logistics_number','car_type','year','mileage','color','original_set','processing','state','invoice_state','plat_type','business_type','sale_type','plat_order')
             ->orderby('id', 'desc');
 
         if(! empty($data['order_number'])) $model->where('order_number','LIKE', '%'.$data['order_number'].'%');
@@ -563,9 +600,9 @@ class SalesOrderService extends Service
      * @return array
      */
     public function salesOrderRule(&$data, $user, $is_add = true){
-        if(empty($data['sales_order_type'])) return [false,'合同类型不能为空'];
         if(empty($data['model_type'])) return [false,'订单模板类型不能为空'];
-        if(! in_array($data['model_type'],SalesOrder::$model_type)) return [false,'订单模板类型错误'];
+        if(! in_array($data['model_type'],SalesOrder::$model_type)) return [false,'合同模板错误'];
+        if(empty($data['sales_order_type'])) return [false,'类型不能为空'];
         if(empty($data['order_number'])) return [false,'合同编号不能为空'];
 //        if(empty($data['customer_id'])) return [false,'请选择客户'];
 //        if(empty($data['employee_one'])) return [false,'请选择签订人'];
@@ -650,7 +687,7 @@ class SalesOrderService extends Service
     public function fillData($data,$ergs){
         if(empty($data['data'])) return $data;
 
-        $array = array_unique(array_merge_recursive(array_column($data['data'],'order_type'),array_column($data['data'],'deal_type'),array_column($data['data'],'contract_state'),array_column($data['data'],'car_type'),array_column($data['data'],'pay_way'),array_column($data['data'],'logistics_company'),array_column($data['data'],'send_state'),array_column($data['data'],'contract_type')));
+        $array = array_unique(array_merge_recursive(array_column($data['data'],'order_type'),array_column($data['data'],'deal_type'),array_column($data['data'],'contract_state'),array_column($data['data'],'car_type'),array_column($data['data'],'pay_way'),array_column($data['data'],'logistics_company'),array_column($data['data'],'send_state'),array_column($data['data'],'contract_type'),array_column($data['data'],'plat_type'),array_column($data['data'],'business_type'),array_column($data['data'],'sale_type')));
         $basic_map = BasicType::whereIn('id',$array)
             ->pluck('title','id')
             ->toArray();
@@ -661,7 +698,7 @@ class SalesOrderService extends Service
             ->pluck('title','id')
             ->toArray();
 
-        $product = $fee = [];
+        $product = [];
         if(! empty($ergs['product'])){
             $sales_p_info = SalesOrderProductInfo::where('del_time',0)
                 ->whereIn('sales_order_id',array_column($data['data'],'id'))
@@ -677,19 +714,32 @@ class SalesOrderService extends Service
                 $value['unit'] = $tmp['unit'] ?? "";
                 $value['bar_code'] = $tmp['bar_code'] ?? "";
                 $value['basic_type_title'] = $basic_price[$value['basic_type_id']] ?? "";
+                $value['install_time'] = $tmp['install_time'] ?? 0;
                 $product[$value['sales_order_id']][] = $value;
             }
-            $sales_o_info = SalesOrderOtherFee::where('del_time',0)
-                ->where('sales_order_id',array_column($data['data'],'id'))
-                ->get()->toArray();
-            foreach ($sales_o_info as $value){
-                $fee[$value['sales_order_id']][] = $value;
-            }
         }
 
+        //获取分社订货合同关联的发货单
+        $invoiceData = $this->getInvoiceOrderData($data['data']);
+
+        //分派的总社或分社
+        $dispatch = $this->getDispatchData($data['data']);
+
         //获取金额列表
         $money = (new BookingListService())->getAllAmount(array_column($data['data'],'id'), BookingList::data_type_one);
+
+        //指派金额
+        $fee = [];
+        $sales_o_info = SalesOrderOtherFee::where('del_time',0)
+            ->whereIn('sales_order_id',array_column($data['data'],'id'))
+            ->get()->toArray();
+        foreach ($sales_o_info as $value){
+            $fee[$value['sales_order_id']][] = $value;
+        }
         foreach ($data['data'] as $key => $value){
+            $data['data'][$key]['business_type_title'] = $basic_map[$value['business_type']] ?? '';
+            $data['data'][$key]['sale_type_title'] = $basic_map[$value['sale_type']] ?? '';
+            $data['data'][$key]['plat_type_title'] = $basic_map[$value['plat_type']] ?? '';
             $data['data'][$key]['sales_order_type_title'] = SalesOrder::$order_type[$value['sales_order_type']] ?? '';
             $data['data'][$key]['model_type_title'] = SalesOrder::$model_type_title[$value['model_type']] ?? '';
             $data['data'][$key]['order_type_title'] = $basic_map[$value['order_type']] ?? '';
@@ -714,6 +764,9 @@ class SalesOrderService extends Service
             }else{
                 $data['data'][$key]['state_name'] = SalesOrder::$state2[$value['state']] ?? '';
             }
+            $data['data'][$key]['invoice_state_name'] = SalesOrder::$invoice_state[$value['invoice_state']] ?? '';
+            $data['data'][$key]['invoice_arr'] = $invoiceData[$value['id']] ?? [];
+            $data['data'][$key]['dispatch_company'] = $dispatch[$value['id']] ?? '';
 
             //合同对应的金额数据
             $tmp = $money[$value['id']] ?? [];
@@ -932,7 +985,7 @@ class SalesOrderService extends Service
 
     public function salesOrderListsalesOrderWxList($data,$user){
         $model = SalesOrder::where('del_time',0)
-            ->select('title','id','sales_order_type','model_type','order_number','selling_price','vin_no','car_type','order_type','deal_type','customer_id','sign_time','contract_state','crt_id','crt_time','mark','product_total','rate','construction_time','handover_time','expire_time','other_fee','discount_fee','contract_fee','contract_type','pay_way','send_state','logistics_company','logistics_number','car_type','year','mileage','color','original_set','processing','state')
+            ->select('title','id','sales_order_type','model_type','order_number','selling_price','vin_no','car_type','order_type','deal_type','customer_id','sign_time','contract_state','crt_id','crt_time','mark','product_total','rate','construction_time','handover_time','expire_time','other_fee','discount_fee','contract_fee','contract_type','pay_way','send_state','logistics_company','logistics_number','car_type','year','mileage','color','original_set','processing','state','invoice_state','plat_type','business_type','sale_type','plat_order')
             ->orderby('id', 'desc');
 
         if(! empty($data['openid'])){
@@ -953,4 +1006,49 @@ class SalesOrderService extends Service
 
         return [true, $list];
     }
+
+    public function getInvoiceOrderData($data){
+        //分社订货模板
+        $search_id = [];
+        foreach ($data as $value){
+            if(! empty($value['invoice_state'])) $search_id[] = $value['id'];
+        }
+        if(empty($search_id)) return [];
+
+        $invoice = InvoiceOrder::where('del_time',0)
+            ->whereIn('sales_order_id',$search_id)
+            ->select('sales_order_id','order_number')
+            ->get()->toArray();
+        $invoice_array = [];
+        foreach ($invoice as $value){
+            $invoice_array[$value['sales_order_id']][] = $value['order_number'];
+        }
+
+        return $invoice_array;
+    }
+
+    public function getDispatchData($data){
+        //分社订货模板
+        $search_id = [];
+        foreach ($data as $value){
+            if($value['state'] >= SalesOrder::State_four) $search_id[] = $value['id'];
+        }
+        if(empty($search_id)) return [];
+
+        $see = SeeRange::where('del_time',0)
+            ->whereIn('data_id',$search_id)
+            ->where('data_type',SeeRange::type_seven)
+            ->where('type',SeeRange::data_three)
+            ->select('data_id','param_id')
+            ->get()->toArray();
+        $map = Depart::whereIn('id',array_unique(array_column($see,'param_id')))
+            ->pluck('title','id')
+            ->toArray();
+        $see_array = [];
+        foreach ($see as $value){
+            $see_array[$value['data_id']] = $map[$value['param_id']] ?? "";
+        }
+
+        return $see_array;
+    }
 }

+ 62 - 0
app/Service/TableHeadService.php

@@ -0,0 +1,62 @@
+<?php
+
+namespace App\Service;
+
+use App\Model\TableSetting;
+use Illuminate\Support\Facades\DB;
+
+class TableHeadService extends Service
+{
+    public function tableheadAdd($data, $user){
+        if(empty($data['table_head'])) return [false,'自定义表头不能为空'];
+        if(empty($data['menu_id'])) return [false, 'menu_id不能为空'];
+
+        $time = time();
+        $insert = [];
+        foreach ($data['table_head'] as $value){
+            if(empty($value['key'])) return [false, 'key不能为空'];
+            if(empty($value['value'])) return [false, 'value不能为空'];
+            if(empty($value['sort'])) return [false, 'sort不能为空'];
+            if(empty($value['is_show'])) return [false, 'is_show不能为空'];
+
+            $insert[] = [
+                'key' => $value['key'],
+                'value' => $value['value'],
+                'sort' => $value['sort'],
+                'is_show' => $value['is_show'],
+                'menu_id' => $data['menu_id'],
+                'crt_time' => $time,
+                'crt_id' => $user['id'],
+            ];
+        }
+
+        DB::beginTransaction();
+        try{
+            TableSetting::where('del_time',0)
+                ->where('crt_id',$user['id'])
+                ->where('menu_id',$data['menu_id'])
+                ->update(['del_time' => $time]);
+            TableSetting::insert($insert);
+
+            DB::commit();
+        }catch (\Exception $exception){
+            DB::rollBack();
+            return [false, $exception->getMessage()];
+        }
+
+        return [true,''];
+    }
+
+    public function tableheadGet($data, $user){
+        if(empty($data['menu_id'])) return [false,'menu_id不能为空!'];
+
+        $header = config("header.{$data['menu_id']}") ?? [];
+
+        foreach ($header as $key => $value){
+            $header[$key]['sort'] = $key + 1;
+            $header[$key]['is_show'] = 1;
+        }
+
+        return [true, $header];
+    }
+}

+ 1 - 6
config/excel/product.php

@@ -20,11 +20,6 @@ return [
             'rule' => '',
             'other_rule' => 'require|unique:Product',
         ],
-        '产品SN编码' => [
-            'key' =>'sn_code',
-            'rule' => '',
-            'other_rule' => 'require|unique:Product',
-        ],
         '规格' => [
             'key' =>'size',
             'rule' =>'',
@@ -64,7 +59,7 @@ return [
     "other_field_func" => "fillInsertProductData",// (特殊)需要填充的其它字段 这里是为了前端组件渲染的数据
     "table" => [
         "Product" => [
-            "field" => ["title","product_category_id","code","size","unit","bar_code","cost","retail_price","crt_id","mark","sn_code","crt_time","depart_id","top_depart_id"],
+            "field" => ["title","product_category_id","code","size","unit","bar_code","cost","retail_price","crt_id","mark","crt_time","depart_id","top_depart_id"],
         ],
         "ProductPriceDetail" => [
             "field_array" => [

+ 117 - 0
config/header/37.php

@@ -0,0 +1,117 @@
+<?php
+/**
+ * '菜单ID' => [
+ *     '字段英文名' =》 '字段中文名'
+ * ]
+ */
+
+return [
+    [
+        'key' => 'order_number',
+        'value' => '合同编号',
+    ],
+    [
+        'key' => 'model_type_title',
+        'value' => '合同模板',
+    ],
+    [
+        'key' => 'sales_order_type_title',
+        'value' => '类型',
+    ],
+    [
+        'key' => 'business_type_title',
+        'value' => '业务类型',
+    ],
+    [
+        'key' => 'sale_type_title',
+        'value' => '销售类型',
+    ],
+    [
+        'key' => 'sign_time',
+        'value' => '签订时间',
+    ],
+    [
+        'key' => 'plat_order',
+        'value' => '平台单号',
+    ],
+    [
+        'key' => 'plat_type_title',
+        'value' => '平台类型',
+    ],
+    [
+        'key' => 'contract_state_title',
+        'value' => '合同状态',
+    ],
+    [
+        'key' => 'product_total',
+        'value' => '产品合计',
+    ],
+    [
+        'key' => 'rate',
+        'value' => '整单折扣率',
+    ],
+    [
+        'key' => 'other_fee',
+        'value' => '其它费用',
+    ],
+    [
+        'key' => 'discount_fee',
+        'value' => '优惠金额',
+    ],
+    [
+        'key' => 'contract_fee',
+        'value' => '合同金额',
+    ],
+    [
+        'key' => 'fee',
+        'value' => '指派金额',
+    ],
+    [
+        'key' => 'fee1',
+        'value' => '已收金额',
+    ],
+    [
+        'key' => 'fee2',
+        'value' => '未收金额',
+    ],
+    [
+        'key' => 'fee3',
+        'value' => '坏账金额',
+    ],
+    [
+        'key' => 'fee4',
+        'value' => '最终金额',
+    ],
+    [
+        'key' => 'order_type_title',
+        'value' => '订单类型',
+    ],
+    [
+        'key' => 'crt_time',
+        'value' => '创建时间',
+    ],
+    [
+        'key' => 'state_name',
+        'value' => '订单状态',
+    ],
+    [
+        'key' => 'invoice_state_name',
+        'value' => '发货状态',
+    ],
+    [
+        'key' => 'invoice_arr',
+        'value' => '发货单号',
+    ],
+    [
+        'key' => 'dispatch_company',
+        'value' => '派遣公司',
+    ],
+    [
+        'key' => 'contract_type_title',
+        'value' => '合同类型',
+    ],
+    [
+        'key' => 'pay_way_title',
+        'value' => '付款方式',
+    ],
+];

+ 5 - 0
routes/api.php

@@ -239,4 +239,9 @@ Route::group(['middleware'=> ['checkLogin']],function ($route){
     $route->any('yjMan','Api\DeleteController@yj');
     //导入
     $route->any('import','Api\ImportController@import');
+
+    //获取默认表头
+    $route->any('getTableHead','Api\TableHeadController@tableHeadGet');
+    //设置表头
+    $route->any('setTableHead','Api\TableHeadController@tableHeadAdd');
 });