diff --git a/app/admin/controller/shop/LocalLife.php b/app/admin/controller/shop/LocalLife.php deleted file mode 100644 index b16ca652..00000000 --- a/app/admin/controller/shop/LocalLife.php +++ /dev/null @@ -1,25 +0,0 @@ - LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表 - 'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型 - 'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型 - 'tx_map_key' => ConfigServer::get('map', 'tx_map_key') - ]); - } -} \ No newline at end of file diff --git a/app/admin/controller/shop/LocalStore.php b/app/admin/controller/shop/LocalStore.php new file mode 100644 index 00000000..f5bcdb9c --- /dev/null +++ b/app/admin/controller/shop/LocalStore.php @@ -0,0 +1,65 @@ +request->isAjax()) { + $get = $this->request->get(); + $lists = LocalStoreLogic::lists(); + return JsonServer::success('获取成功', $lists); + } + return View(); + } + + public function add() + { + return view('', [ + 'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表 + 'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型 + 'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型 + 'tx_map_key' => ConfigServer::get('map', 'tx_map_key') + ]); + } + + public function edit() + { + $id = $this->request->get('id'); + if ($this->request->isAjax()) { + $post = $this->request->post(); + } + return view('', [ + 'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表 + 'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型 + 'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型 + 'tx_map_key' => ConfigServer::get('map', 'tx_map_key'), + 'id' => $id + ]); + } + + /** + * @notes 审核操作 + */ + public function operation() + { + if ($this->request->isAjax()) { + $post = $this->request->post(); + if ($post['state'] == 1 || $post['state'] == 2) { + if (LocalStoreLogic::update_state($post['id'], $post['state'])) { + return JsonServer::success('操作成功'); + } + } + return JsonServer::error('操作失败'); + } + } +} \ No newline at end of file diff --git a/app/admin/logic/shop/LocalStoreLogic.php b/app/admin/logic/shop/LocalStoreLogic.php new file mode 100644 index 00000000..05f7bf21 --- /dev/null +++ b/app/admin/logic/shop/LocalStoreLogic.php @@ -0,0 +1,22 @@ + LocalStore::with('info')->select()->toArray() + ); + } + + public static function update_state($id, $state) + { + return LocalStore::where(['lstore_id' => $id])->update(['store_state' => $state]); + } +} \ No newline at end of file diff --git a/app/admin/view/shop/local_life/add.html b/app/admin/view/shop/local_store/add.html similarity index 100% rename from app/admin/view/shop/local_life/add.html rename to app/admin/view/shop/local_store/add.html diff --git a/app/admin/view/shop/local_store/edit.html b/app/admin/view/shop/local_store/edit.html new file mode 100644 index 00000000..4313314f --- /dev/null +++ b/app/admin/view/shop/local_store/edit.html @@ -0,0 +1,385 @@ +{layout name="layout2" /} + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
建议尺寸:宽200像素*高200像素的jpg,jpeg,png图片
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+ +
+
经度
+
+
+
+ +
+
纬度
+
+
+
+
+ +
+
+
+
+ +
+ + +
+
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/app/admin/view/shop/local_life/lists.html b/app/admin/view/shop/local_store/lists.html similarity index 62% rename from app/admin/view/shop/local_life/lists.html rename to app/admin/view/shop/local_store/lists.html index 255d0bbe..00ced3fe 100644 --- a/app/admin/view/shop/local_life/lists.html +++ b/app/admin/view/shop/local_store/lists.html @@ -37,17 +37,44 @@
- - + + + + - @@ -55,25 +82,45 @@ layui.use(["table", "form"], function () { var table = layui.table; var form = layui.form; - like.tableLists("#like-table-lists", "{:url()}", [ - {field: "id", width: 60, title: "ID"} - , {field: "storeInfo", width: 200, title: "营业执照", templet: "#table-business-license"} - , {field: "name", width: 120, align: "center", title: "法人/负责人名称"} - , {field: "image", width: 200, align: "center", title: "商户地址"} - , {field: "sort", width: 200, align: "center", title: "门店名称/商户简称"} - , {field: "sort", width: 120, align: "center", title: "商户联系人"} - , {field: "sort", width: 150, align: "center", title: "联系电话"} - , {title: "操作", width: 150, align: "center", fixed: "right", toolbar: "#table-operation"} + {field: "lstore_id", width: 60, title: "ID"} + , {field: "businessLicense", width: 120, align: "center", title: "营业执照", toolbar: '#businesslicense-operation'} + , {field: "rgiNo", width: 120, align: "center", title: "地区号"} + , {field: "dominationBankNo", width: 120, align: "center", title: "地区号"} + , {field: "crftType1", width: 120, align: "center", title: "商户证件类型"} + , {field: "crftNo1", width: 120, align: "center", title: "证件号码"} + , {field: "crftName2", width: 120, align: "center", title: "法人/负责人名称"} + , {field: "crftType2", width: 120, align: "center", title: "法人/负责人证件类型"} + , {field: "crftNo2", width: 120, align: "center", title: "法人/负责人证件号码"} + , {field: "lidaddr", width: 200, align: "center", title: "商户地址"} + , {field: "chnsName", width: 200, align: "center", title: "商户中文名称"} + , {field: "englName", width: 200, align: "center", title: "商户英文名称"} + , {field: "shortName", width: 200, align: "center", title: "门店名称/商户简称"} + , {field: "postCode", width: 200, align: "center", title: "邮政编码"} + , {field: "merconat", width: 120, align: "center", title: "商户联系人"} + , {field: "mertel", width: 150, align: "center", title: "联系电话"} + , {field: "ebankConFlag", width: 150, align: "center", title: "关联企业网银", toolbar: '#ebank-operation'} + , {field: "shopHomeConFlag", width: 150, align: "center", title: "开通商户之家", toolbar: '#shophome-operation'} + , {field: "mcssAdminFlag", width: 150, align: "center", title: "开通商户之家管理员", toolbar: '#mcssadmin-operation'} + , {field: "creditSwitch", width: 150, align: "center", title: "受理信用卡", toolbar: '#creditwwitch-operation'} + , {field: "accntType1", width: 150, align: "center", title: "结算账户类型"} + , {field: "accntNo1", width: 150, align: "center", title: "消费结算卡号/账户"} + , {field: "address", width: 150, align: "center", title: "地理位置"} + , {fixed: 'right', title: '操作', width: 280, align: 'center', toolbar: '#localstore-operation'} ]); + //图片放大 + $(document).on('click', '.image-show', function () { + var src = $(this).attr('src'); + like.showImg(src,600); + }); var active = { add: function () { layer.open({ type: 2 , title: "新增本地生活商家" - , content: "{:url('shop.LocalLife/add')}" + , content: "{:url('shop.LocalStore/add')}" , area: ['90%', '90%'] , btn: ["确定", "取消"] , yes: function (index, layero) { @@ -103,9 +150,9 @@ edit: function (obj) { layer.open({ type: 2 - , title: "编辑主营类目" - , content: "{:url('shop.Category/edit')}?id=" + obj.data.id - , area: ["550px", "400px"] + , title: "编辑本地生活" + , content: "{:url('shop.LocalStore/edit')}?id=" + obj.data.lstore_id + , area: ['90%', '90%'] , btn: ["确定", "取消"] , yes: function (index, layero) { var iframeWindow = window["layui-layer-iframe" + index]; diff --git a/app/common/model/LocalStore.php b/app/common/model/LocalStore.php new file mode 100644 index 00000000..1bccf927 --- /dev/null +++ b/app/common/model/LocalStore.php @@ -0,0 +1,16 @@ +belongsTo(User::class, 'user_id', 'id')->field('id, nickname'); + } +} \ No newline at end of file