|
@@ -11,7 +11,7 @@ $(function () {
|
|
|
colModel: [
|
|
|
{label: 'ID', name: 'id', index: 'id', width: 30, align: 'center'},
|
|
|
{
|
|
|
- label: '积分类型', name: 'rulesType', index: 'points_rules_type', width: 80, formatter: function (value) {
|
|
|
+ label: '积分类型', name: 'rulesType', index: 'points_rules_type', width: 80,align: 'center', formatter: function (value) {
|
|
|
if (value === '0' || value === 0) {
|
|
|
return '门店';
|
|
|
}
|
|
@@ -24,7 +24,8 @@ $(function () {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
- {label: '商品条码/门店/类别名称', name: 'pointsRulesName', index: 'points_detil_name', width: 80, align: 'center'},
|
|
|
+ {label: '商品/门店/分类名称', name: 'pointsRulesName', index: 'points_detil_name', width: 80, align: 'center'},
|
|
|
+ {label: '门店ID/商品sku/商品分类ID', name: 'rulesId', index: 'points_detil_name_id', width: 80, align: 'center'},
|
|
|
{label: '对应的商品门店名称', name: 'storeName', index: 'points_store_name', width: 80, align: 'center'},
|
|
|
{label: '备注', name: 'remark', index: 'remark', width: 80, align: 'center'},],
|
|
|
viewrecords: true,
|
|
@@ -71,13 +72,15 @@ let vm = new Vue({
|
|
|
]
|
|
|
},
|
|
|
q: {
|
|
|
- name: ''
|
|
|
+ pointsDetilNameId:"",
|
|
|
+ pointsDetilName:""
|
|
|
},
|
|
|
isMkactivitiesShow: true,
|
|
|
mkCode: '',
|
|
|
uploadData:[],
|
|
|
storeId : '',
|
|
|
- mkaId : ''
|
|
|
+ mkaId : '',
|
|
|
+ mall2PointsRulesDetil:{}
|
|
|
},
|
|
|
methods: {
|
|
|
query: function () {
|
|
@@ -86,37 +89,37 @@ let vm = new Vue({
|
|
|
add: function () {
|
|
|
vm.showList = false;
|
|
|
vm.title = "新增";
|
|
|
- vm.getCategories();
|
|
|
- vm.getCategories2();
|
|
|
- vm.getCategories3();
|
|
|
- vm.mkActivitiesHalfPrice = {};
|
|
|
+ // vm.getCategories();
|
|
|
+ // vm.getCategories2();
|
|
|
+ // vm.getCategories3();
|
|
|
+ vm.mall2PointsRulesDetil = {};
|
|
|
},
|
|
|
update: function (event) {
|
|
|
- let mafrId = getSelectedRow();
|
|
|
- if (mafrId == null) {
|
|
|
+ let id = getSelectedRow();
|
|
|
+ if (id == null) {
|
|
|
return;
|
|
|
}
|
|
|
- vm.getCategories();
|
|
|
- vm.getCategories2();
|
|
|
- vm.getCategories3();
|
|
|
+ console.log("id")
|
|
|
+ console.log(id)
|
|
|
+ // vm.getCategories();
|
|
|
+ // vm.getCategories2();
|
|
|
+ // vm.getCategories3();
|
|
|
vm.showList = false;
|
|
|
vm.title = "修改";
|
|
|
|
|
|
- vm.getInfo(mafrId)
|
|
|
+ vm.getInfo(id)
|
|
|
},
|
|
|
saveOrUpdate: function (event) {
|
|
|
- let url = vm.mkActivitiesHalfPrice.mafrId == null ? "../mkactivitieshalfprice/save" : "../mkactivitieshalfprice/update";
|
|
|
+ console.log(vm.mall2PointsRulesDetil.id)
|
|
|
+ let url = vm.mall2PointsRulesDetil.id == null ? "../mall2pointsrulesdetil/save" : "../mall2pointsrulesdetil/update";
|
|
|
|
|
|
- //添加上层的门店编号与营销方式编号
|
|
|
-
|
|
|
- vm.mkActivitiesHalfPrice.shopSn = vm.storeId;
|
|
|
- vm.mkActivitiesHalfPrice.mkaId = vm.mkaId;
|
|
|
+ vm.mall2PointsRulesDetil.mkaId = vm.mkaId;
|
|
|
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: url,
|
|
|
contentType: "application/json",
|
|
|
- data: JSON.stringify(vm.mkActivitiesHalfPrice),
|
|
|
+ data: JSON.stringify(vm.mall2PointsRulesDetil),
|
|
|
success: function (r) {
|
|
|
if (r.code === 0) {
|
|
|
alert('操作成功', function (index) {
|
|
@@ -152,22 +155,25 @@ let vm = new Vue({
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- getInfo: function(mafrId){
|
|
|
- $.get("../mkactivitieshalfprice/info/"+mafrId, function (r) {
|
|
|
- vm.mkActivitiesHalfPrice = r.mkActivitiesHalfPrice;
|
|
|
+ getInfo: function(id){
|
|
|
+ $.get("../mall2pointsrulesdetil/info/"+id, function (r) {
|
|
|
+ vm.mall2PointsRulesDetil = r.mall2PointsRulesDetil;
|
|
|
+ vm.mall2PointsRulesDetil.pointsRulesName=r.mall2PointsRulesDetil.pointsDetilNameId;
|
|
|
+ vm.mall2PointsRulesDetil.storeName=r.mall2PointsRulesDetil.pointsStoreName;
|
|
|
});
|
|
|
},
|
|
|
reloadSearch: function() {
|
|
|
- vm.q = {
|
|
|
- name: ''
|
|
|
- }
|
|
|
+ vm.q={
|
|
|
+ pointsDetilNameId:null,
|
|
|
+ pointsDetilName:null
|
|
|
+ },
|
|
|
vm.reload();
|
|
|
},
|
|
|
reload: function (event) {
|
|
|
vm.showList = true;
|
|
|
let page = $("#jqGrid").jqGrid('getGridParam', 'page');
|
|
|
$("#jqGrid").jqGrid('setGridParam', {
|
|
|
- postData: {'sku': vm.q.sku,'goodsName':vm.q.goodsName,'mkaId': vm.mkaId},
|
|
|
+ postData: {'pointsDetilNameId': vm.q.pointsDetilNameId,'pointsDetilName':vm.q.pointsDetilName,'mkaId': vm.mkaId},
|
|
|
page: page
|
|
|
}).trigger("reloadGrid");
|
|
|
vm.handleReset('formValidate');
|