diff --git a/app/data/controller/StoreItem.php b/app/data/controller/StoreItem.php new file mode 100644 index 000000000..d10583e34 --- /dev/null +++ b/app/data/controller/StoreItem.php @@ -0,0 +1,82 @@ +title = '实体门店管理'; + $query = $this->_query($this->table); + $query->like('name')->equal('status')->dateBetween('create_at'); + $query->where(['deleted' => 0])->order('sort desc,id desc')->page(); + } + + /** + * 添加实体门店 + * @auth true + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function add() + { + $this->_form($this->table, 'form'); + } + + /** + * 编辑实体门店 + * @auth true + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function edit() + { + $this->_form($this->table, 'form'); + } + + /** + * 修改实体门店状态 + * @auth true + * @throws \think\db\exception\DbException + */ + public function state() + { + $this->_save($this->table, $this->_vali([ + 'status.in:0,1' => '状态值范围异常!', + 'status.require' => '状态值不能为空!', + ])); + } + + /** + * 删除实体门店 + * @auth true + * @throws \think\db\exception\DbException + */ + public function remove() + { + $this->_delete($this->table); + } +} \ No newline at end of file diff --git a/app/data/controller/StoreUsed.php b/app/data/controller/StoreUsed.php new file mode 100644 index 000000000..d79444cc7 --- /dev/null +++ b/app/data/controller/StoreUsed.php @@ -0,0 +1,48 @@ +title = '门店核销管理'; + $query = $this->_query($this->table); + $query->order('id desc')->equal('status')->dateBetween('create_at')->page(); + } + + /** + * 修改核销状态 + * @auth true + * @throws \think\db\exception\DbException + */ + public function state() + { + $this->_save($this->table, $this->_vali([ + 'status.in:0,1' => '状态值范围异常!', + 'status.require' => '状态值不能为空!', + ])); + } + +} \ No newline at end of file diff --git a/app/data/controller/StoreUser.php b/app/data/controller/StoreUser.php new file mode 100644 index 000000000..1c96b22eb --- /dev/null +++ b/app/data/controller/StoreUser.php @@ -0,0 +1,83 @@ +title = '门店店员管理'; + $query = $this->_query($this->table); + $query->like('name')->equal('status')->dateBetween('create_at'); + $query->where(['deleted' => 0])->order('sort desc,id desc')->page(); + } + + /** + * 添加门店店员 + * @auth true + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function add() + { + $this->_form($this->table, 'form'); + } + + /** + * 编辑门店店员 + * @auth true + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function edit() + { + $this->_form($this->table, 'form'); + } + + /** + * 修改门店店员状态 + * @auth true + * @throws \think\db\exception\DbException + */ + public function state() + { + $this->_save($this->table, $this->_vali([ + 'status.in:0,1' => '状态值范围异常!', + 'status.require' => '状态值不能为空!', + ])); + } + + /** + * 删除门店店员 + * @auth true + * @throws \think\db\exception\DbException + */ + public function remove() + { + $this->_delete($this->table); + } + +} \ No newline at end of file diff --git a/app/data/view/store_item/form.html b/app/data/view/store_item/form.html new file mode 100644 index 000000000..e75eac2c2 --- /dev/null +++ b/app/data/view/store_item/form.html @@ -0,0 +1,23 @@ +
+
+ +
+ 标签描述 + Mark Remark + +
+
+
+ {notempty name='vo.id'}{/notempty} +
+ + +
+
\ No newline at end of file diff --git a/app/data/view/store_item/index.html b/app/data/view/store_item/index.html new file mode 100644 index 000000000..b1204a667 --- /dev/null +++ b/app/data/view/store_item/index.html @@ -0,0 +1,64 @@ +{extend name="../../admin/view/main"} + +{block name="button"} + + + + + + +{/block} + +{block name='content'} +
+ {include file='store_item/index_search'} + + {notempty name='list'} + + + + + + + + + + + {/notempty} + + {foreach $list as $key=>$vo} + + + + + + + + + {/foreach} + +
+ + + + 标签名称标签状态创建时间
+ + + + {$vo.name|default=''}{if $vo.status eq 0}已禁用{elseif $vo.status eq 1}使用中{/if}{$vo.create_at|format_datetime} + {if auth("edit")} + 编 辑 + {/if} + {if auth("state") and $vo.status eq 1} + 禁 用 + {/if} + {if auth("state") and $vo.status eq 0} + 启 用 + {/if} + {if auth("remove")} + 删 除 + {/if} +
+ {empty name='list'}没有记录哦{else}{$pagehtml|raw|default=''}{/empty} +
+{/block} \ No newline at end of file diff --git a/app/data/view/store_item/index_search.html b/app/data/view/store_item/index_search.html new file mode 100644 index 000000000..1e8597282 --- /dev/null +++ b/app/data/view/store_item/index_search.html @@ -0,0 +1,35 @@ +
+ 条件搜索 + +
+ + \ No newline at end of file diff --git a/app/data/view/store_used/form.html b/app/data/view/store_used/form.html new file mode 100644 index 000000000..e75eac2c2 --- /dev/null +++ b/app/data/view/store_used/form.html @@ -0,0 +1,23 @@ +
+
+ +
+ 标签描述 + Mark Remark + +
+
+
+ {notempty name='vo.id'}{/notempty} +
+ + +
+
\ No newline at end of file diff --git a/app/data/view/store_used/index.html b/app/data/view/store_used/index.html new file mode 100644 index 000000000..294d6acac --- /dev/null +++ b/app/data/view/store_used/index.html @@ -0,0 +1,64 @@ +{extend name="../../admin/view/main"} + +{block name="button"} + + + + + + +{/block} + +{block name='content'} +
+ {include file='store_used/index_search'} + + {notempty name='list'} + + + + + + + + + + + {/notempty} + + {foreach $list as $key=>$vo} + + + + + + + + + {/foreach} + +
+ + + + 标签名称标签状态创建时间
+ + + + {$vo.name|default=''}{if $vo.status eq 0}已禁用{elseif $vo.status eq 1}使用中{/if}{$vo.create_at|format_datetime} + {if auth("edit")} + 编 辑 + {/if} + {if auth("state") and $vo.status eq 1} + 禁 用 + {/if} + {if auth("state") and $vo.status eq 0} + 启 用 + {/if} + {if auth("remove")} + 删 除 + {/if} +
+ {empty name='list'}没有记录哦{else}{$pagehtml|raw|default=''}{/empty} +
+{/block} \ No newline at end of file diff --git a/app/data/view/store_used/index_search.html b/app/data/view/store_used/index_search.html new file mode 100644 index 000000000..1e8597282 --- /dev/null +++ b/app/data/view/store_used/index_search.html @@ -0,0 +1,35 @@ +
+ 条件搜索 + +
+ + \ No newline at end of file diff --git a/app/data/view/store_user/form.html b/app/data/view/store_user/form.html new file mode 100644 index 000000000..e75eac2c2 --- /dev/null +++ b/app/data/view/store_user/form.html @@ -0,0 +1,23 @@ +
+
+ +
+ 标签描述 + Mark Remark + +
+
+
+ {notempty name='vo.id'}{/notempty} +
+ + +
+
\ No newline at end of file diff --git a/app/data/view/store_user/index.html b/app/data/view/store_user/index.html new file mode 100644 index 000000000..d2e07c3bd --- /dev/null +++ b/app/data/view/store_user/index.html @@ -0,0 +1,64 @@ +{extend name="../../admin/view/main"} + +{block name="button"} + + + + + + +{/block} + +{block name='content'} +
+ {include file='store_user/index_search'} + + {notempty name='list'} + + + + + + + + + + + {/notempty} + + {foreach $list as $key=>$vo} + + + + + + + + + {/foreach} + +
+ + + + 标签名称标签状态创建时间
+ + + + {$vo.name|default=''}{if $vo.status eq 0}已禁用{elseif $vo.status eq 1}使用中{/if}{$vo.create_at|format_datetime} + {if auth("edit")} + 编 辑 + {/if} + {if auth("state") and $vo.status eq 1} + 禁 用 + {/if} + {if auth("state") and $vo.status eq 0} + 启 用 + {/if} + {if auth("remove")} + 删 除 + {/if} +
+ {empty name='list'}没有记录哦{else}{$pagehtml|raw|default=''}{/empty} +
+{/block} \ No newline at end of file diff --git a/app/data/view/store_user/index_search.html b/app/data/view/store_user/index_search.html new file mode 100644 index 000000000..1e8597282 --- /dev/null +++ b/app/data/view/store_user/index_search.html @@ -0,0 +1,35 @@ +
+ 条件搜索 + +
+ + \ No newline at end of file