Commit e51fd312 by crushh

update: dist

parent 13b6e221
.ml40[data-v-1c8276c7]{margin-left:40px}.filter-block[data-v-1c8276c7]{color:#303133;background:#f7f8fa;padding:20px;margin-bottom:20px}.filter-block span[data-v-1c8276c7]{margin-left:10px;margin-right:10px;line-height:20px}.card[data-v-1c8276c7]{padding-left:70px;min-height:60px;position:relative}.card img[data-v-1c8276c7]{position:absolute;left:0;top:0;width:60px;height:60px;border-radius:4px}.card .name[data-v-1c8276c7]{color:#303133;padding-top:8px;margin-bottom:7px;line-height:22px}.el-icon-delete[data-v-380caa2a]{display:inline-block;font-size:17px;padding:9px;margin-right:10px;color:#909399;border:1px solid #e4e7ed;border-radius:50%;vertical-align:middle;cursor:pointer;position:relative;top:-60px}.el-icon-delete[data-v-380caa2a]:hover{background:#fef0f0;border:1px solid #fbc4c4;color:#f5222d}
\ No newline at end of file
.ml40[data-v-1c8276c7]{margin-left:40px}.filter-block[data-v-1c8276c7]{color:#303133;background:#f7f8fa;padding:20px;margin-bottom:20px}.filter-block span[data-v-1c8276c7]{margin-left:10px;margin-right:10px;line-height:20px}.card[data-v-1c8276c7]{padding-left:70px;min-height:60px;position:relative}.card img[data-v-1c8276c7]{position:absolute;left:0;top:0;width:60px;height:60px;border-radius:4px}.card .name[data-v-1c8276c7]{color:#303133;padding-top:8px;margin-bottom:7px;line-height:22px}.el-icon-delete[data-v-f64ae786]{display:inline-block;font-size:17px;padding:9px;margin-right:10px;color:#909399;border:1px solid #e4e7ed;border-radius:50%;vertical-align:middle;cursor:pointer;position:relative;top:-60px}.el-icon-delete[data-v-f64ae786]:hover{background:#fef0f0;border:1px solid #fbc4c4;color:#f5222d}
\ No newline at end of file
.step-text[data-v-182f6008]{color:#303133;font-size:12px;line-height:24px;font-weight:400}.dash-style[data-v-182f6008]{border-bottom:1px dashed #2f54eb}.upload-btn[data-v-182f6008]{height:40px;border:1px dashed #c0c4cc;display:inline-block;font-size:14px;color:#c0c4cc;cursor:pointer;margin-right:10px;width:250px;border-radius:4px}.upload-btn .el-icon-upload2[data-v-182f6008]{font-size:18px;color:#c0c4cc}.upload-btn[data-v-182f6008]:hover{border-color:#1890ff}.upload-ele .el-button[data-v-182f6008]{border:none;color:#c0c4cc}.upload-ele .el-button--small[data-v-182f6008]{padding:0}.w-630[data-v-182f6008]{width:630px}.mb56[data-v-182f6008]{margin-bottom:56px}.from-content[data-v-182f6008]{position:relative}.from-content .demo-ruleForm .form-section[data-v-182f6008]{padding:30px 20px}.from-content .demo-ruleForm .form-section h3[data-v-182f6008]{color:#303133;font-size:14px;font-weight:700;margin-bottom:31px;padding-bottom:9px;border-bottom:1px solid #dfdfdf}.from-content .demo-ruleForm .form-section h3[data-v-182f6008]:before{clear:both;content:"";display:inline-block;overflow:hidden;width:3px;height:12px;line-height:14px;margin-right:8px;background:#2f54eb}.from-content .demo-ruleForm .form-section .tip-warm[data-v-182f6008]{color:#909399;font-size:12px}.from-content .demo-ruleForm .form-section .tip-warm i[data-v-182f6008]{color:#faad14;margin-right:5px}.from-content .demo-ruleForm .fixed-btn[data-v-182f6008]{width:100%;height:56px;position:fixed;bottom:0;left:200px;background:#fff;border-top:1px solid #e4e7ed;text-align:center;margin-left:-100px;z-index:2;font-size:0}.from-content .demo-ruleForm .fixed-btn .el-button[data-v-182f6008]{margin-top:12px}.from-content .anchor-link[data-v-182f6008]{width:120px;position:fixed;right:24px;top:180px;background:#fff}.from-content .anchor-link .link-item[data-v-182f6008]{height:24px;line-height:24px;color:#606266;font-size:12px;border-left:2px solid #ebeef5;padding-left:18px;cursor:pointer}.from-content .see-btn[data-v-182f6008]{color:#909399;margin-left:15px}.from-content .see-btn[data-v-182f6008]:hover{color:#2f54ed}.ml20[data-v-182f6008]{margin-left:20px}.mr10[data-v-182f6008]{margin-right:10px}.tips-content[data-v-182f6008]{position:absolute;left:-4px;top:6px}.store-tips[data-v-182f6008]{width:200px;position:absolute;left:-10px}.underline[data-v-182f6008]{text-decoration:underline}.pickup-upload[data-v-182f6008]{display:inline-block;vertical-align:top}.pickup-upload .upload-trigger[data-v-182f6008]{border-style:dashed}.pickup-upload .upload-trigger .upload-icon[data-v-182f6008]{font-size:14px}.pickup-upload .pickup-list[data-v-182f6008]{margin-top:-10px;margin-left:117px}.pickup-upload .pickup-list .pickup-list-name[data-v-182f6008]{font-size:14px;font-weight:400;color:#303133;line-height:20px}.pickup-upload .pickup-list .pickup-list-name .file-icon[data-v-182f6008]{font-size:14px}.upload-tip-text[data-v-182f6008]{font-size:12px;color:#303133}.template-intro[data-v-182f6008]{margin-left:33px;background:#f7f8fa;width:400px;height:280px}.template-title[data-v-182f6008]{font-size:12px;line-height:17px;color:#303133;margin-left:16px;margin-top:16px;font-weight:400}.right-border{border-right:1px solid #ebeef5}.step-style .el-step.is-vertical .el-step__line{top:30px;left:8px;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.step-style .el-step__head.is-finish{color:#2f54eb;border-color:#2f54eb}.step-style .el-step__icon.is-text{border:1px solid}.step-style .el-step__icon{width:16px;height:16px}.step-style .el-step__icon-inner{font-size:12px}
\ No newline at end of file
[data-v-45123e19] .el-divider--horizontal{margin:16px 0;margin-top:20px;border-bottom:1px dashed #dcdfe6;background-color:transparent}.upload[data-v-45123e19] .el-button{border-style:dashed}.btn-download[data-v-45123e19]{position:absolute;left:180px;top:9px}.el-icon-warning[data-v-2fa0e8c2]{color:#faad14;font-size:21px}.empty_block[data-v-098d57a9]:after{content:"\6682\65E0\7269\6D41\4FE1\606F"}.el-divider[data-v-098d57a9]{background-color:#e4e7ed}.logistics-info[data-v-098d57a9]{display:-webkit-box;display:-ms-flexbox;display:flex}.logistics-info>div[data-v-098d57a9]{-webkit-box-flex:1;-ms-flex:1;flex:1}.logistics-info span[data-v-098d57a9]{display:inline-block}.logistics-info span+span[data-v-098d57a9]{margin-left:10px}.logistics-step[data-v-098d57a9]{margin-top:24px;background:#fafafa;padding:15px 0}.logistics-step h3[data-v-098d57a9]{color:#303133;font-size:16px;border-bottom:1px solid #dcdfe6;padding:0 20px 15px 20px}.logistics-step .logistics-list[data-v-098d57a9]{height:328px;overflow-y:auto;padding:20px}.logistics-step .logistics-item[data-v-098d57a9]{position:relative;padding-bottom:10px}.logistics-step .logistics-line-step[data-v-098d57a9]{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:12px}.logistics-step .logistics-line-step .time[data-v-098d57a9]{margin-right:20px;width:160px;line-height:22px;font-weight:500;color:#303133}.logistics-step .logistics-line-step .content[data-v-098d57a9]{color:#303133;-webkit-box-flex:1;-ms-flex:1;flex:1;line-height:22px}.write-off[data-v-5563ffd2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-size:14px;color:#303133}.write-off .code[data-v-5563ffd2]{margin-top:20px;color:#f5222d;font-size:20px}
\ No newline at end of file
[data-v-45123e19] .el-divider--horizontal{margin:16px 0;margin-top:20px;border-bottom:1px dashed #dcdfe6;background-color:transparent}.upload[data-v-45123e19] .el-button{border-style:dashed}.btn-download[data-v-45123e19]{position:absolute;left:180px;top:9px}.el-icon-warning[data-v-2fa0e8c2]{color:#faad14;font-size:21px}.empty_block[data-v-45296252]:after{content:"\6682\65E0\7269\6D41\4FE1\606F"}.el-divider[data-v-45296252]{background-color:#e4e7ed}.logistics-info[data-v-45296252]{display:-webkit-box;display:-ms-flexbox;display:flex}.logistics-info>div[data-v-45296252]{-webkit-box-flex:1;-ms-flex:1;flex:1}.logistics-info span[data-v-45296252]{display:inline-block}.logistics-info span+span[data-v-45296252]{margin-left:10px}.logistics-step[data-v-45296252]{margin-top:24px;background:#fafafa;padding:15px 0}.logistics-step h3[data-v-45296252]{color:#303133;font-size:16px;border-bottom:1px solid #dcdfe6;padding:0 20px 15px 20px}.logistics-step .logistics-list[data-v-45296252]{height:328px;overflow-y:auto;padding:20px}.logistics-step .logistics-item[data-v-45296252]{position:relative;padding-bottom:10px}.logistics-step .logistics-line-step[data-v-45296252]{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:12px}.logistics-step .logistics-line-step .time[data-v-45296252]{margin-right:20px;width:160px;line-height:22px;font-weight:500;color:#303133}.logistics-step .logistics-line-step .content[data-v-45296252]{color:#303133;-webkit-box-flex:1;-ms-flex:1;flex:1;line-height:22px}.write-off[data-v-5563ffd2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-size:14px;color:#303133}.write-off .code[data-v-5563ffd2]{margin-top:20px;color:#f5222d;font-size:20px}
\ No newline at end of file
.step-text[data-v-ea280b5a]{color:#303133;font-size:12px;line-height:24px;font-weight:400}.dash-style[data-v-ea280b5a]{border-bottom:1px dashed #2f54eb}.upload-btn[data-v-ea280b5a]{height:40px;border:1px dashed #c0c4cc;display:inline-block;font-size:14px;color:#c0c4cc;cursor:pointer;margin-right:10px;width:250px;border-radius:4px}.upload-btn .el-icon-upload2[data-v-ea280b5a]{font-size:18px;color:#c0c4cc}.upload-btn[data-v-ea280b5a]:hover{border-color:#1890ff}.upload-ele .el-button[data-v-ea280b5a]{border:none;color:#c0c4cc}.upload-ele .el-button--small[data-v-ea280b5a]{padding:0}.w-630[data-v-ea280b5a]{width:630px}.mb56[data-v-ea280b5a]{margin-bottom:56px}.from-content[data-v-ea280b5a]{position:relative}.from-content .demo-ruleForm .form-section[data-v-ea280b5a]{padding:30px 20px}.from-content .demo-ruleForm .form-section h3[data-v-ea280b5a]{color:#303133;font-size:14px;font-weight:700;margin-bottom:31px;padding-bottom:9px;border-bottom:1px solid #dfdfdf}.from-content .demo-ruleForm .form-section h3[data-v-ea280b5a]:before{clear:both;content:"";display:inline-block;overflow:hidden;width:3px;height:12px;line-height:14px;margin-right:8px;background:#2f54eb}.from-content .demo-ruleForm .form-section .tip-warm[data-v-ea280b5a]{color:#909399;font-size:12px}.from-content .demo-ruleForm .form-section .tip-warm i[data-v-ea280b5a]{color:#faad14;margin-right:5px}.from-content .demo-ruleForm .fixed-btn[data-v-ea280b5a]{width:100%;height:56px;position:fixed;bottom:0;left:200px;background:#fff;border-top:1px solid #e4e7ed;text-align:center;margin-left:-100px;z-index:2;font-size:0}.from-content .demo-ruleForm .fixed-btn .el-button[data-v-ea280b5a]{margin-top:12px}.from-content .anchor-link[data-v-ea280b5a]{width:120px;position:fixed;right:24px;top:180px;background:#fff}.from-content .anchor-link .link-item[data-v-ea280b5a]{height:24px;line-height:24px;color:#606266;font-size:12px;border-left:2px solid #ebeef5;padding-left:18px;cursor:pointer}.from-content .see-btn[data-v-ea280b5a]{color:#909399;margin-left:15px}.from-content .see-btn[data-v-ea280b5a]:hover{color:#2f54ed}.ml20[data-v-ea280b5a]{margin-left:20px}.mr10[data-v-ea280b5a]{margin-right:10px}.tips-content[data-v-ea280b5a]{position:absolute;left:-4px;top:6px}.store-tips[data-v-ea280b5a]{width:200px;position:absolute;left:-10px}.underline[data-v-ea280b5a]{text-decoration:underline}.pickup-upload[data-v-ea280b5a]{display:inline-block;vertical-align:top}.pickup-upload .upload-trigger[data-v-ea280b5a]{border-style:dashed}.pickup-upload .upload-trigger .upload-icon[data-v-ea280b5a]{font-size:14px}.pickup-upload .pickup-list[data-v-ea280b5a]{margin-top:-10px;margin-left:117px}.pickup-upload .pickup-list .pickup-list-name[data-v-ea280b5a]{font-size:14px;font-weight:400;color:#303133;line-height:20px}.pickup-upload .pickup-list .pickup-list-name .file-icon[data-v-ea280b5a]{font-size:14px}.upload-tip-text[data-v-ea280b5a]{font-size:12px;color:#303133}.template-intro[data-v-ea280b5a]{margin-left:33px;background:#f7f8fa;width:400px;height:280px}.template-title[data-v-ea280b5a]{font-size:12px;line-height:17px;color:#303133;margin-left:16px;margin-top:16px;font-weight:400}.right-border{border-right:1px solid #ebeef5}.step-style .el-step.is-vertical .el-step__line{top:30px;left:8px;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.step-style .el-step__head.is-finish{color:#2f54eb;border-color:#2f54eb}.step-style .el-step__icon.is-text{border:1px solid}.step-style .el-step__icon{width:16px;height:16px}.step-style .el-step__icon-inner{font-size:12px}
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-28da0001"],{"1e4b":function(t,e,a){"use strict";a.r(e);var c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"welfare-index"},[a("div",{staticClass:"welfare-index-header"},[t._v("福利中心")]),a("div",{staticClass:"enter"},t._l(t.wfTypes,(function(e,c){return a("div",{key:c,class:"block b"+(c+1),on:{click:function(a){return t.$router.push(e.target)}}},[a("span",{staticClass:"title"},[t._v(t._s(e.title))]),t._m(0,!0)])})),0)])},n=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"target"},[a("i",{staticClass:"icon-right-circle iconfont-welfare4"})])}],i=a("f9e4"),r={name:"Index",data:function(){return{wfTypes:i["b"]}}},l=r,s=(a("ee36"),a("2877")),u=Object(s["a"])(l,c,n,!1,null,"45a2385e",null);e["default"]=u.exports},"7c79":function(t,e,a){},ee36:function(t,e,a){"use strict";a("7c79")},f9e4:function(t,e,a){"use strict";a.d(e,"b",(function(){return c})),a.d(e,"a",(function(){return n}));a("6c7b"),Array(31).fill().map((function(t,e){return{label:"".concat(e+1,"号"),value:"".concat(e+1)}})),Array(28).fill().map((function(t,e){return{label:"".concat(e+1,"号"),value:"".concat(e+1)}})).concat({label:"月底",value:"0"}),Array(12).fill().map((function(t,e){return{label:"".concat(e+1,"月"),value:"".concat(e+1)}}));var c=[{title:"实物礼品",target:"/gift-manage/real-gift",code:"w-real-gifts"},{title:"虚拟礼品",target:"/gift-manage/virtual-gift",code:"w-virtual-gifts"},{title:"GIC 卡券",target:"/gic-card/list",code:"w-gic-card"},{title:"GIC 卡券包",target:"/card-package/list",code:"w-card-package"}],n={1:"增加",2:"减少"}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-281bf001"],{"1e4b":function(t,e,a){"use strict";a.r(e);var c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"welfare-index"},[a("div",{staticClass:"welfare-index-header"},[t._v("福利中心")]),a("div",{staticClass:"enter"},t._l(t.wfTypes,(function(e,c){return a("div",{key:c,class:"block b"+(c+1),on:{click:function(a){return t.$router.push(e.target)}}},[a("span",{staticClass:"title"},[t._v(t._s(e.title))]),t._m(0,!0)])})),0)])},n=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"target"},[a("i",{staticClass:"icon-right-circle iconfont-welfare4"})])}],i=a("f9e4"),r={name:"Index",data:function(){return{wfTypes:i["b"]}}},l=r,s=(a("ee36"),a("2877")),u=Object(s["a"])(l,c,n,!1,null,"45a2385e",null);e["default"]=u.exports},"7c79":function(t,e,a){},ee36:function(t,e,a){"use strict";a("7c79")},f9e4:function(t,e,a){"use strict";a.d(e,"b",(function(){return c})),a.d(e,"a",(function(){return n}));a("6c7b"),Array(31).fill().map((function(t,e){return{label:"".concat(e+1,"号"),value:"".concat(e+1)}})),Array(28).fill().map((function(t,e){return{label:"".concat(e+1,"号"),value:"".concat(e+1)}})).concat({label:"月底",value:"0"}),Array(12).fill().map((function(t,e){return{label:"".concat(e+1,"月"),value:"".concat(e+1)}}));var c=[{title:"实物礼品",target:"/gift-manage/real-gift",code:"w-real-gifts"},{title:"虚拟礼品",target:"/gift-manage/virtual-gift",code:"w-virtual-gifts"},{title:"GIC 卡券",target:"/gic-card/list",code:"w-gic-card"},{title:"GIC 卡券包",target:"/card-package/list",code:"w-card-package"}],n={1:"增加",2:"减少"}}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -317,7 +317,6 @@ export default {
return;
}
if(!this.$refs.accg.validate()) return;
this.$refs.accg.save();
this.$refs.ruleForm.validate((valid) => {
if (!valid) {
PublicMethods.jumpToFormError(); // eslint-disable-line
......@@ -332,26 +331,30 @@ export default {
params.operAuth = params.operAuth.join(',');
}
this.loading = true;
addPackages(params).then(res => {
this.loading = false;
this.$tips({ message: `${ this.isAdd ? '新建' : '编辑' }成功`, type: 'success' });
if(this.isAdd) {
this.$store.commit('updateShowCornerCanUseApp', true);
let callbackId = this.$route.query.callbackId;
if(callbackId) {
let obj = JSON.parse(localStorage.getItem('welfareCreateCallback') || '{}');
obj[callbackId] = true;
localStorage.setItem('welfareCreateCallback', JSON.stringify(obj));
this.$refs.accg.save().then(res=>{
addPackages(params).then(res => {
this.loading = false;
this.$tips({ message: `${ this.isAdd ? '新建' : '编辑' }成功`, type: 'success' });
if(this.isAdd) {
this.$store.commit('updateShowCornerCanUseApp', true);
let callbackId = this.$route.query.callbackId;
if(callbackId) {
let obj = JSON.parse(localStorage.getItem('welfareCreateCallback') || '{}');
obj[callbackId] = true;
localStorage.setItem('welfareCreateCallback', JSON.stringify(obj));
}
}
if(!this.isAdd) {
this.$router.push('/card-package/list');
} else {
this.isEcho = true;
this.$router.push(`/card-package/edit?id=${res.result}`);
}
}
if(!this.isAdd) {
this.$router.push('/card-package/list');
} else {
this.isEcho = true;
this.$router.push(`/card-package/edit?id=${res.result}`);
}
}).finally(() => {
this.loading = false;
}).finally(() => {
this.loading = false;
});
}).catch(err=>{
this.$message.error(err.message);
});
}
});
......
......@@ -122,7 +122,6 @@ export default {
return;
}
if(!this.$refs.accg.validate()) return;
this.$refs.accg.save();
this.$refs.ruleForm.validate((valid) => {
if (!valid) {
PublicMethods.jumpToFormError(); // eslint-disable-line
......@@ -143,17 +142,21 @@ export default {
// return;
// }
this.$emit('updateLoading', true);
updateCard(params).then(res => {
this.$emit('updateLoading', false);
this.loading = false;
// this.result.info = this.needCheck ? '卡券保存并提交审核,请尽快通知审核人员进行审核。' : '卡券保存成功';
this.result.info = '卡券保存成功';
this.result.title = '操作成功';
this.result.visible = true;
this.submitType = 1;
}).finally(() => {
this.$emit('updateLoading', false);
this.loading = false;
this.$refs.accg.save().then(res=>{
updateCard(params).then(res => {
this.$emit('updateLoading', false);
this.loading = false;
// this.result.info = this.needCheck ? '卡券保存并提交审核,请尽快通知审核人员进行审核。' : '卡券保存成功';
this.result.info = '卡券保存成功';
this.result.title = '操作成功';
this.result.visible = true;
this.submitType = 1;
}).finally(() => {
this.$emit('updateLoading', false);
this.loading = false;
});
}).catch(err=>{
this.$message.error(err.message);
});
}
});
......
......@@ -1282,7 +1282,6 @@ export default {
// return false;
// }
if(!this.$refs.accg.validate()) return;
this.$refs.accg.save();
this.$refs[goodsForm].validate(valid => {
if (!valid){
PublicMethods.jumpToFormError(); // eslint-disable-line
......@@ -1386,32 +1385,34 @@ export default {
};
console.log(params);
this.$emit('updateLoading');
if (this.isEdit) {
// params.giftId = this.giftId;
giftUpdate(params).then(res =>{
if (res.code === '0000') {
this.$router.push({ path: '/gift-manage/real-gift' });
} else {
this.$message.error(res.message);
}
}).finally(() => this.$emit('updateLoading', false));
}else{
// params.giftId = '';
giftSave(params).then(res =>{
if (res.code === '0000') {
this.$store.commit('updateShowCornerCanUseApp', true);
this.$router.push({ path: '/gift-manage/real-gift' });
} else {
this.$message.error(res.message);
}
let callbackId = this.$route.query.callbackId;
if(callbackId) {
let obj = JSON.parse(localStorage.getItem('welfareCreateCallback') || '{}');
obj[callbackId] = true;
localStorage.setItem('welfareCreateCallback', JSON.stringify(obj));
}
}).finally(() => this.$emit('updateLoading', false));
}
this.$refs.accg.save().then(res=>{
if (this.isEdit) {
giftUpdate(params).then(res =>{
if (res.code === '0000') {
this.$router.push({ path: '/gift-manage/real-gift' });
} else {
this.$message.error(res.message);
}
}).finally(() => this.$emit('updateLoading', false));
}else{
giftSave(params).then(res =>{
if (res.code === '0000') {
this.$store.commit('updateShowCornerCanUseApp', true);
this.$router.push({ path: '/gift-manage/real-gift' });
} else {
this.$message.error(res.message);
}
let callbackId = this.$route.query.callbackId;
if(callbackId) {
let obj = JSON.parse(localStorage.getItem('welfareCreateCallback') || '{}');
obj[callbackId] = true;
localStorage.setItem('welfareCreateCallback', JSON.stringify(obj));
}
}).finally(() => this.$emit('updateLoading', false));
}
}).catch(err=>{
this.$message.error(err.message);
});
}
});
}
......
......@@ -556,6 +556,7 @@ export default {
},
// 保存
submitForm(goodsForm) {
console.log(goodsForm);
if(this.btnLoading) return;
if (this.image.length === 0) {
this.$message.error('请上传主图');
......@@ -566,7 +567,6 @@ export default {
// return false;
// }
if(!this.$refs.accg.validate()) return;
this.$refs.accg.save();
this.$refs[goodsForm].validate(valid => {
if (!valid){
PublicMethods.jumpToFormError(); // eslint-disable-line
......@@ -602,36 +602,40 @@ export default {
// template: this.template,
};
this.btnLoading = true;
if (this.isEdit) {
this.$refs.accg.save().then(res=>{
if (this.isEdit) {
// params.giftId = this.giftId;
giftUpdate(params).then(res =>{
if (res.code === '0000') {
this.$router.push({ path: '/gift-manage/virtual-gift' });
this.btnLoading = false;
} else {
this.btnLoading = false;
this.$message.error(res.message);
}
}).finally(() => this.$emit('updateLoading'));
}else{
giftUpdate(params).then(res =>{
if (res.code === '0000') {
this.$router.push({ path: '/gift-manage/virtual-gift' });
this.btnLoading = false;
} else {
this.btnLoading = false;
this.$message.error(res.message);
}
}).finally(() => this.$emit('updateLoading'));
}else{
// params.giftId = '';
giftSave(params).then(res =>{
if (res.code === '0000') {
this.$store.commit('updateShowCornerCanUseApp', true);
this.$router.push({ path: '/gift-manage/virtual-gift' });
this.btnLoading = false;
} else {
this.btnLoading = false;
this.$message.error(res.message);
let callbackId = this.$route.query.callbackId;
if(callbackId) {
let obj = JSON.parse(localStorage.getItem('welfareCreateCallback') || '{}');
obj[callbackId] = true;
localStorage.setItem('welfareCreateCallback', JSON.stringify(obj));
giftSave(params).then(res =>{
if (res.code === '0000') {
this.$store.commit('updateShowCornerCanUseApp', true);
this.$router.push({ path: '/gift-manage/virtual-gift' });
this.btnLoading = false;
} else {
this.btnLoading = false;
this.$message.error(res.message);
let callbackId = this.$route.query.callbackId;
if(callbackId) {
let obj = JSON.parse(localStorage.getItem('welfareCreateCallback') || '{}');
obj[callbackId] = true;
localStorage.setItem('welfareCreateCallback', JSON.stringify(obj));
}
}
}
}).finally(() => this.$emit('updateLoading'));
}
}).finally(() => this.$emit('updateLoading'));
}
}).catch(err=>{
this.$message.error(err.message);
});
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment