作者 郭盛
1 个管道 的构建 失败 耗费 2 秒

发票信息

... ... @@ -2,11 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/application/admin/view/order/fapiao.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/admin/controller/Order.php" afterPath="$PROJECT_DIR$/application/admin/controller/Order.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/admin/view/order/fapiao.html" afterPath="$PROJECT_DIR$/application/admin/view/order/fapiao.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/assets/js/backend/order.js" afterPath="$PROJECT_DIR$/public/assets/js/backend/order.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
... ... @@ -17,21 +16,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="order.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/assets/js/backend/order.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352">
<caret line="34" column="50" lean-forward="true" selection-start-line="34" selection-start-column="50" selection-end-line="34" selection-end-column="50" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="User.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="329">
<caret line="1820" column="11" lean-forward="true" selection-start-line="1820" selection-start-column="11" selection-end-line="1820" selection-end-column="11" />
<state relative-caret-position="-371">
<caret line="1794" column="5" lean-forward="false" selection-start-line="1794" selection-start-column="5" selection-end-line="1794" selection-end-column="5" />
<folding>
<element signature="e#365#484#0#PHP" expanded="false" />
<element signature="e#490#1228#0#PHP" expanded="false" />
... ... @@ -98,6 +87,7 @@
<element signature="e#59104#59818#0#PHP" expanded="false" />
<element signature="e#59824#60251#0#PHP" expanded="false" />
<element signature="e#60256#60725#0#PHP" expanded="false" />
<element signature="e#60732#61937#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -106,26 +96,16 @@
<file leaf-file-name="Order.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/admin/controller/Order.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="544">
<caret line="37" column="29" lean-forward="false" selection-start-line="37" selection-start-column="29" selection-end-line="37" selection-end-column="29" />
<state relative-caret-position="529">
<caret line="40" column="21" lean-forward="false" selection-start-line="40" selection-start-column="21" selection-end-line="40" selection-end-column="21" />
<folding>
<element signature="e#40#74#0#PHP" expanded="true" />
<element signature="e#769#2955#0#PHP" expanded="false" />
<element signature="e#951#3137#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="fapiao.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/admin/view/order/fapiao.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1300">
<caret line="52" column="0" lean-forward="true" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
... ... @@ -200,9 +180,9 @@
<option value="$PROJECT_DIR$/application/admin/view/accredit/index.html" />
<option value="$PROJECT_DIR$/public/assets/js/backend/accredit.js" />
<option value="$PROJECT_DIR$/application/admin/lang/zh-cn/order.php" />
<option value="$PROJECT_DIR$/application/admin/view/order/fapiao.html" />
<option value="$PROJECT_DIR$/public/assets/js/backend/order.js" />
<option value="$PROJECT_DIR$/application/admin/controller/Order.php" />
<option value="$PROJECT_DIR$/application/admin/view/order/fapiao.html" />
<option value="$PROJECT_DIR$/application/api/controller/User.php" />
</list>
</option>
... ... @@ -221,9 +201,9 @@
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="288" />
<option name="y" value="80" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="123" />
<option name="y" value="82" />
<option name="width" value="1624" />
<option name="height" value="916" />
</component>
... ... @@ -422,7 +402,7 @@
<workItem from="1575773423431" duration="694000" />
<workItem from="1575776183372" duration="2267000" />
<workItem from="1575790089275" duration="377000" />
<workItem from="1575851041026" duration="8499000" />
<workItem from="1575851041026" duration="10422000" />
</task>
<task id="LOCAL-00001" summary="调试">
<created>1574145133364</created>
... ... @@ -435,7 +415,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="348966000" />
<option name="totallyTimeSpent" value="350889000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
... ... @@ -447,9 +427,10 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="288" y="80" width="1624" height="916" extended-state="0" />
<frame x="123" y="82" width="1624" height="916" extended-state="1" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15345268" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.15345268" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
... ... @@ -457,7 +438,7 @@
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.169448" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.169448" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
... ... @@ -839,45 +820,45 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/view/order/fapiao.html">
<entry file="file://$PROJECT_DIR$/public/assets/js/backend/pic.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1300">
<caret line="52" column="0" lean-forward="true" selection-start-line="52" selection-start-column="0" selection-end-line="52" selection-end-column="0" />
<state relative-caret-position="675">
<caret line="44" column="24" lean-forward="true" selection-start-line="44" selection-start-column="24" selection-end-line="44" selection-end-column="152" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/assets/js/backend/pic.js">
<entry file="file://$PROJECT_DIR$/public/assets/js/backend/order.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="44" column="24" lean-forward="true" selection-start-line="44" selection-start-column="24" selection-end-line="44" selection-end-column="152" />
<state relative-caret-position="352">
<caret line="34" column="50" lean-forward="true" selection-start-line="34" selection-start-column="50" selection-end-line="34" selection-end-column="50" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/controller/Order.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="544">
<caret line="37" column="29" lean-forward="false" selection-start-line="37" selection-start-column="29" selection-end-line="37" selection-end-column="29" />
<state relative-caret-position="529">
<caret line="40" column="21" lean-forward="false" selection-start-line="40" selection-start-column="21" selection-end-line="40" selection-end-column="21" />
<folding>
<element signature="e#40#74#0#PHP" expanded="true" />
<element signature="e#769#2955#0#PHP" expanded="false" />
<element signature="e#951#3137#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/assets/js/backend/order.js">
<entry file="file://$PROJECT_DIR$/application/admin/view/order/fapiao.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352">
<caret line="34" column="50" lean-forward="true" selection-start-line="34" selection-start-column="50" selection-end-line="34" selection-end-column="50" />
<state relative-caret-position="129">
<caret line="31" column="10" lean-forward="true" selection-start-line="31" selection-start-column="10" selection-end-line="31" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="329">
<caret line="1820" column="11" lean-forward="true" selection-start-line="1820" selection-start-column="11" selection-end-line="1820" selection-end-column="11" />
<state relative-caret-position="-371">
<caret line="1794" column="5" lean-forward="false" selection-start-line="1794" selection-start-column="5" selection-end-line="1794" selection-end-column="5" />
<folding>
<element signature="e#365#484#0#PHP" expanded="false" />
<element signature="e#490#1228#0#PHP" expanded="false" />
... ... @@ -944,6 +925,7 @@
<element signature="e#59104#59818#0#PHP" expanded="false" />
<element signature="e#59824#60251#0#PHP" expanded="false" />
<element signature="e#60256#60725#0#PHP" expanded="false" />
<element signature="e#60732#61937#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -35,7 +35,13 @@ class Order extends Backend
public function fapiao(){
$id = $this->request->param('ids');
$data = Db::name('');
$order_id = ','.$id.',';
$data = Db::name('invoice')
->whereLike('order_id',$order_id)
->find();
$this->assign('data',$data);
return $this->view->fetch();
}
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<label class="control-label col-xs-12 col-sm-2">公司名称:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
{$data.name}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pic_id')}:</label>
<label class="control-label col-xs-12 col-sm-2">公司电话:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pic_id" data-rule="required" data-source="pic/index" class="form-control selectpage" name="row[pic_id]" type="text" value="{$row.pic_id|htmlentities}">
{$data.tel}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Video_id')}:</label>
<label class="control-label col-xs-12 col-sm-2">公司地址:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-video_id" data-rule="required" data-source="video/index" class="form-control selectpage" name="row[video_id]" type="text" value="{$row.video_id|htmlentities}">
{$data.adress}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>
<label class="control-label col-xs-12 col-sm-2">税号:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-total" class="form-control" step="0.01" name="row[total]" type="number" value="{$row.total|htmlentities}">
{$data.duty}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<label class="control-label col-xs-12 col-sm-2">银行名称:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-status" class="form-control" name="row[status]" type="number" value="{$row.status|htmlentities}">
{$data.bank}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Num')}:</label>
<label class="control-label col-xs-12 col-sm-2">银行账号:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-num" class="form-control" name="row[num]" type="text" value="{$row.num|htmlentities}">
{$data.card}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Paytime')}:</label>
<label class="control-label col-xs-12 col-sm-2">联系人名称:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-paytime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[paytime]" type="text" value="{:$row.paytime?datetime($row.paytime):''}">
{$data.linkname}
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">联系人电话:</label>
<div class="col-xs-12 col-sm-8">
{$data.tel}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">联系人地址:</label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
{$data.linkadress}
</div>
</div>
</form>
... ...
... ... @@ -1793,8 +1793,8 @@ class User extends Api
*/
public function invoice()
{
$param['user_id'] = $this->uid;
$param = $this->request->param();
$param['user_id'] = $this->uid;
$validate = new Validate([
'order_id'=>'require',
'name'=>'require',
... ... @@ -1822,6 +1822,12 @@ class User extends Api
if (!$validate->check($param)) {
$this->error($validate->getError());
}
$info = Db::name('invoice')
->whereLike('order_id',$param['order_id'])
->find();
if(!empty($info)){
$this->error(['code'=>2,'msg'=>'您已经提交过发票了']);
}
$param['createtime'] = time();
$data = Db::name('invoice')
->insertGetId($param);
... ...
... ... @@ -6847,7 +6847,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2019-12-09 11:02:11 </div>
Generated on 2019-12-09 11:34:15 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...