mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
去除商家经营范围
This commit is contained in:
parent
3d146fe295
commit
0a4e2e3bb8
@ -45,6 +45,25 @@
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="addHousekeepingTypeInfo.typeCd == '2002'">
|
||||
<label class="col-sm-2 col-form-label">跳转类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addHousekeepingTypeInfo.skipType">
|
||||
<option selected disabled value="">必填,请选择跳转类型</option>
|
||||
<option value="2">站内</option>
|
||||
<option value="3">站外</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="addHousekeepingTypeInfo.typeCd == '2002'">
|
||||
<label class="col-sm-2 col-form-label">URL</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addHousekeepingTypeInfo.url" type="text" placeholder="选填,请填写URL"
|
||||
class="form-control">
|
||||
<label style="color: red;">请使用浏览器打开商城,复制#号已后的全部地址。如:/pages/market/market?typeId=xxxx</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">排序</label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
@ -13,6 +13,8 @@
|
||||
hktDesc: '',
|
||||
label: '',
|
||||
seq: '',
|
||||
url: '',
|
||||
skipType: '',
|
||||
isShow: '',
|
||||
typeCd: ''
|
||||
|
||||
@ -153,6 +155,8 @@
|
||||
hktDesc: '',
|
||||
label: '',
|
||||
seq: '',
|
||||
url: '',
|
||||
skipType: '',
|
||||
isShow: '',
|
||||
typeCd: ''
|
||||
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
<div id = "addShopRangeModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b ">添加经营范围</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">选择店铺类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addShopRangeInfo.shopTypeId">
|
||||
<option selected disabled value="">必填,请选择店铺类型</option>
|
||||
<option v-for="(item,index) in shopRangeManageInfo.shopTypes" :value="item.shopTypeId">
|
||||
{{item.typeName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">范围名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addShopRangeInfo.rangeName" type="text" placeholder="必填,请填写范围名称" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">是否展示</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addShopRangeInfo.isShow">
|
||||
<option selected disabled value="">必填,请选择是否展示</option>
|
||||
<option value="Y">是</option>
|
||||
<option value="N">否</option>
|
||||
</select> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">是否默认</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addShopRangeInfo.isDefault">
|
||||
<option selected disabled value="">必填,请选择是否默认</option>
|
||||
<option value="F">自定义</option>
|
||||
<option value="T">默认</option>
|
||||
</select> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">显示序号</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addShopRangeInfo.seq" type="text" placeholder="必填,请填写显示序号" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addShopRangeInfo.remark" type="text" placeholder="选填,请填写备注" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveShopRangeInfo()" ><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,151 +0,0 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data: {
|
||||
addShopRangeInfo: {
|
||||
shopRangeId: '',
|
||||
shopRangeId: '',
|
||||
shopTypeId: '',
|
||||
rangeName: '',
|
||||
isShow: '',
|
||||
isDefault: '',
|
||||
seq: '',
|
||||
remark: '',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addShopRange', 'openAddShopRangeModal', function () {
|
||||
$('#addShopRangeModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
addShopRangeValidate() {
|
||||
return vc.validate.validate({
|
||||
addShopRangeInfo: vc.component.addShopRangeInfo
|
||||
}, {
|
||||
|
||||
'addShopRangeInfo.shopTypeId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "店铺类型id不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "30",
|
||||
errInfo: "店铺类型ID太长"
|
||||
},
|
||||
],
|
||||
'addShopRangeInfo.rangeName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "范围名称不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "30",
|
||||
errInfo: "范围名称太长"
|
||||
},
|
||||
],
|
||||
'addShopRangeInfo.isShow': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "是否展示不能为空"
|
||||
},],
|
||||
'addShopRangeInfo.isDefault': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "是否默认不能为空"
|
||||
},],
|
||||
'addShopRangeInfo.seq': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "显示序号不能为空"
|
||||
},
|
||||
{
|
||||
limit: "num",
|
||||
param: "",
|
||||
errInfo: "显示序号不是有效数字"
|
||||
},
|
||||
],
|
||||
'addShopRangeInfo.remark': [
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "120",
|
||||
errInfo: "描述太长"
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
saveShopRangeInfo: function () {
|
||||
if (!vc.component.addShopRangeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//不提交数据将数据 回调给侦听处理
|
||||
if (vc.notNull($props.callBackListener)) {
|
||||
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addShopRangeInfo);
|
||||
$('#addShopRangeModel').modal('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost('/shopRange/saveShopRange',
|
||||
JSON.stringify(vc.component.addShopRangeInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addShopRangeModel').modal('hide');
|
||||
vc.component.clearAddShopRangeInfo();
|
||||
vc.emit('shopRangeManage', 'listShopRange', {});
|
||||
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
clearAddShopRangeInfo: function () {
|
||||
vc.component.addShopRangeInfo = {
|
||||
shopRangeId: '',
|
||||
shopTypeId: '',
|
||||
rangeName: '',
|
||||
isShow: '',
|
||||
isDefault: '',
|
||||
seq: '',
|
||||
remark: '',
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -1,19 +0,0 @@
|
||||
<div class="modal fade" id="deleteShopRangeModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">请确认您的操作!</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<tr align="center"><th>确定删除经营范围</th></tr>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteShopRangeModel()">点错了</button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="deleteShopRange()">确认删除</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,51 +0,0 @@
|
||||
(function (vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
deleteShopRangeInfo: {
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('deleteShopRange', 'openDeleteShopRangeModal', function (_params) {
|
||||
|
||||
vc.component.deleteShopRangeInfo = _params;
|
||||
$('#deleteShopRangeModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
deleteShopRange: function () {
|
||||
vc.http.apiPost(
|
||||
'/shopRange/deleteShopRange',
|
||||
JSON.stringify(vc.component.deleteShopRangeInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteShopRangeModel').modal('hide');
|
||||
vc.emit('shopRangeManage', 'listShopRange', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.message(json);
|
||||
|
||||
});
|
||||
},
|
||||
closeDeleteShopRangeModel: function () {
|
||||
$('#deleteShopRangeModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -46,6 +46,24 @@
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="editHousekeepingTypeInfo.typeCd == '2002'">
|
||||
<label class="col-sm-2 col-form-label">跳转类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editHousekeepingTypeInfo.skipType">
|
||||
<option selected disabled value="">必填,请选择跳转类型</option>
|
||||
<option value="2">站内</option>
|
||||
<option value="3">站外</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="editHousekeepingTypeInfo.typeCd == '2002'">
|
||||
<label class="col-sm-2 col-form-label">URL</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editHousekeepingTypeInfo.url" type="text" placeholder="选填,请填写URL"
|
||||
class="form-control">
|
||||
<label style="color: red;">请使用浏览器打开商城,复制#号已后的全部地址。如:/pages/market/market?typeId=xxxx</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">排序</label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
hktDesc: '',
|
||||
label: '',
|
||||
seq: '',
|
||||
url: '',
|
||||
skipType: '',
|
||||
isShow: '',
|
||||
typeCd: ''
|
||||
|
||||
@ -151,6 +153,8 @@
|
||||
hktDesc: '',
|
||||
label: '',
|
||||
seq: '',
|
||||
url: '',
|
||||
skipType: '',
|
||||
isShow: '',
|
||||
typeCd: ''
|
||||
}
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
<div id = "editShopRangeModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b ">修改经营范围</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">选择店铺类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editShopRangeInfo.shopTypeId">
|
||||
<option selected disabled value="">必填,请选择店铺类型</option>
|
||||
<option v-for="(item,index) in shopRangeManageInfo.shopTypes" :value="item.shopTypeId">
|
||||
{{item.typeName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">范围名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editShopRangeInfo.rangeName" type="text" placeholder="必填,请填写范围名称" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">是否展示</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editShopRangeInfo.isShow">
|
||||
<option selected disabled value="">必填,请选择是否展示</option>
|
||||
<option value="Y">是</option>
|
||||
<option value="N">否</option>
|
||||
</select> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">是否默认</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editShopRangeInfo.isDefault">
|
||||
<option selected disabled value="">必填,请选择是否默认</option>
|
||||
<option value="F">自定义</option>
|
||||
<option value="T">默认</option>
|
||||
</select> </div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">显示序号</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editShopRangeInfo.seq" type="text" placeholder="必填,请填写显示序号" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editShopRangeInfo.remark" type="text" placeholder="选填,请填写备注" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="editShopRange()" ><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,141 +0,0 @@
|
||||
(function (vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
editShopRangeInfo: {
|
||||
shopRangeId: '',
|
||||
shopRangeId: '',
|
||||
shopTypeId: '',
|
||||
rangeName: '',
|
||||
isShow: '',
|
||||
isDefault: '',
|
||||
seq: '',
|
||||
remark: '',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editShopRange', 'openEditShopRangeModal', function (_params) {
|
||||
vc.component.refreshEditShopRangeInfo();
|
||||
$('#editShopRangeModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editShopRangeInfo);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
editShopRangeValidate: function () {
|
||||
return vc.validate.validate({
|
||||
editShopRangeInfo: vc.component.editShopRangeInfo
|
||||
}, {
|
||||
'editShopRangeInfo.shopTypeId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "店铺类型id不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "30",
|
||||
errInfo: "店铺类型ID太长"
|
||||
},
|
||||
],
|
||||
'editShopRangeInfo.rangeName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "范围名称不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "30",
|
||||
errInfo: "范围名称太长"
|
||||
},
|
||||
],
|
||||
'editShopRangeInfo.isShow': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "是否展示不能为空"
|
||||
},],
|
||||
'editShopRangeInfo.isDefault': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "是否默认不能为空"
|
||||
},],
|
||||
'editShopRangeInfo.seq': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "显示序号不能为空"
|
||||
},
|
||||
{
|
||||
limit: "num",
|
||||
param: "",
|
||||
errInfo: "显示序号不是有效数字"
|
||||
},
|
||||
],
|
||||
'editShopRangeInfo.remark': [
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "120",
|
||||
errInfo: "描述太长"
|
||||
},
|
||||
],
|
||||
'editShopRangeInfo.shopRangeId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "店铺经营范围id不能为空"
|
||||
}]
|
||||
|
||||
});
|
||||
},
|
||||
editShopRange: function () {
|
||||
if (!vc.component.editShopRangeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/shopRange/updateShopRange',
|
||||
JSON.stringify(vc.component.editShopRangeInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#editShopRangeModel').modal('hide');
|
||||
vc.emit('shopRangeManage', 'listShopRange', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
});
|
||||
},
|
||||
refreshEditShopRangeInfo: function () {
|
||||
vc.component.editShopRangeInfo = {
|
||||
shopRangeId: '',
|
||||
shopRangeId: '',
|
||||
shopTypeId: '',
|
||||
rangeName: '',
|
||||
isShow: '',
|
||||
isDefault: '',
|
||||
seq: '',
|
||||
remark: '',
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -1,117 +0,0 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入范围名称"
|
||||
v-model="shopRangeManageInfo.conditions.rangeName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<select class="custom-select" v-model="shopRangeManageInfo.conditions.isShow">
|
||||
<option selected value="">请选择是否展示</option>
|
||||
<option value="Y">是</option>
|
||||
<option value="N">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<select class="custom-select" v-model="shopRangeManageInfo.conditions.isDefault">
|
||||
<option selected value="">请选择是否默认</option>
|
||||
<option value="F">自定义</option>
|
||||
<option value="T">默认</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryShopRangeMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> 查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>经营范围信息</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddShopRangeModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
添加
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">店铺类型</th>
|
||||
<th class="text-center">范围名称</th>
|
||||
<th class="text-center">是否展示</th>
|
||||
<th class="text-center">是否默认</th>
|
||||
<th class="text-center">显示序号</th>
|
||||
<th class="text-center">备注</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="shopRange in shopRangeManageInfo.shopRanges">
|
||||
<td class="text-center">{{shopRange.typeName}}</td>
|
||||
<td class="text-center">{{shopRange.rangeName}}</td>
|
||||
<td class="text-center">{{shopRange.isShow =='Y'?'是':'否'}}</td>
|
||||
<td class="text-center">{{shopRange.isDefault =='F'?'自定义':'默认'}}</td>
|
||||
<td class="text-center">{{shopRange.seq}}</td>
|
||||
<td class="text-center">{{shopRange.remark}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditShopRangeModel(shopRange)">修改</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteShopRangeModel(shopRange)">删除</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<vc:create path="admin/addShopRange" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="admin/editShopRange"></vc:create>
|
||||
<vc:create path="admin/deleteShopRange"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -1,105 +0,0 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function(vc){
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data:{
|
||||
shopRangeManageInfo:{
|
||||
shopRanges:[],
|
||||
total:0,
|
||||
records:1,
|
||||
moreCondition:false,
|
||||
rangeName:'',
|
||||
shopTypes:[],
|
||||
conditions:{
|
||||
rangeName:'',
|
||||
isShow:'',
|
||||
isDefault:'',
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
vc.component._listShopRanges(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('shopRangeManage','listShopRange',function(_param){
|
||||
vc.component._listShopRanges(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination','page_event',function(_currentPage){
|
||||
vc.component._listShopRanges(_currentPage,DEFAULT_ROWS);
|
||||
});
|
||||
vc.component._listShopTypes(1,50);
|
||||
},
|
||||
methods:{
|
||||
_listShopTypes:function(_page, _rows){
|
||||
var param = {
|
||||
params:{
|
||||
page : _page,
|
||||
row : _rows,
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/shopType/queryShopType',
|
||||
param,
|
||||
function(json,res){
|
||||
var _shopTypeManageInfo=JSON.parse(json);
|
||||
vc.component.shopRangeManageInfo.shopTypes = _shopTypeManageInfo.data;
|
||||
},function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_listShopRanges:function(_page, _rows){
|
||||
|
||||
vc.component.shopRangeManageInfo.conditions.page = _page;
|
||||
vc.component.shopRangeManageInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params:vc.component.shopRangeManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/shopRange/queryShopRange',
|
||||
param,
|
||||
function(json,res){
|
||||
var _shopRangeManageInfo=JSON.parse(json);
|
||||
vc.component.shopRangeManageInfo.total = _shopRangeManageInfo.total;
|
||||
vc.component.shopRangeManageInfo.records = _shopRangeManageInfo.records;
|
||||
vc.component.shopRangeManageInfo.shopRanges = _shopRangeManageInfo.data;
|
||||
vc.emit('pagination','init',{
|
||||
total:vc.component.shopRangeManageInfo.records,
|
||||
currentPage:_page
|
||||
});
|
||||
},function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddShopRangeModal:function(){
|
||||
vc.emit('addShopRange','openAddShopRangeModal',{});
|
||||
},
|
||||
_openEditShopRangeModel:function(_shopRange){
|
||||
vc.emit('editShopRange','openEditShopRangeModal',_shopRange);
|
||||
},
|
||||
_openDeleteShopRangeModel:function(_shopRange){
|
||||
vc.emit('deleteShopRange','openDeleteShopRangeModal',_shopRange);
|
||||
},
|
||||
_queryShopRangeMethod:function(){
|
||||
vc.component._listShopRanges(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition:function(){
|
||||
if(vc.component.shopRangeManageInfo.moreCondition){
|
||||
vc.component.shopRangeManageInfo.moreCondition = false;
|
||||
}else{
|
||||
vc.component.shopRangeManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user