Commit 1041ba5c by crushh

update: 复制礼品完成

parent f2a2b716
......@@ -100,10 +100,10 @@ export default {
return year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second;
},
uploadAction: function() {
let url = window.location.origin + '/api-plug/upload-img?requestProject=integral-mall';
uploadAction: function(src='/api-plug/upload-img?requestProject=integral-mall') {
let url = window.location.origin + src;
if (window.location.origin.indexOf('localhost') != -1) {
url = 'http://gicdev.demogic.com/api-plug/upload-img?requestProject=integral-mall';
url = `http://gicdev.demogic.com${src}`;
}
return url;
},
......
......@@ -564,8 +564,7 @@ export default {
// 可传参数
projectName: 'integral-mall', // 当前项目名
showCardDialog: false,
// cardLimit: 3, //卡券限制类型 1-限制领取1张的卡券 2- 限制领取 1~100的卡券 3-限制领取&=100 的卡券
cardLimit: -1, // 卡券限制类型 1-限制领取1张的卡券 2- 限制领取 1~100的卡券 3-限制领取&=100 的卡券
cardLimit: -1, // 卡券限制类型 1-限制领取1张的卡券 2- 限制领取 1~100的卡券 3-限制领取>=100 的卡券
cardType: null, // 卡券类型集合(0:抵金券,1:折扣券,2:兑换券)null-为全部类型 逗号分隔
disabledList: [],
selectedData: {},
......
......@@ -698,7 +698,7 @@
<el-button type="primary" @click="goDeliverSet">确 定</el-button>
</span>
</el-dialog>
<importCoupon :importCouponModal="importCouponModal" @getSuceessNum="getSuceessNum" />
<importCoupon :couponModal="importCouponModal" @getSuceessNum="getSuceessNum" />
</div>
</template>
......@@ -923,27 +923,32 @@ export default {
this.giftType = Number(this.$route.query.type); // 列表上实物是1虚拟是0
this.giftId = this.$route.query.giftId;
this.mallProId = this.$route.query.giftId;
if (this.isEdit || this.isInfo) {
this.giftForm.proReferId = this.$route.query.proReferId;
this.getInfo();
this.editChangeTypeStatus = true;
} else {
this.giftForm.proReferId = '';
this.getMemberGradeList(); // 会员等级列表
this.isNew = true;
}
this.getCategoryOptions(); // 分类数据
if (this.giftType === 1) {
if (this.giftType === 1) {
// 实物
this.giftForm.changeType = 2;
this.giftForm.changeType = 2;
} else if (this.giftType === 0) {
// 虚拟
this.getGiftId();
}
}
if (this.giftId !== '-1') {
if (this.isCopy) {
this.giftForm.proReferId = this.$route.query.proReferId;
this.getInfo();
this.editChangeTypeStatus = true;
}
if ((this.giftId == '-1' || this.isCopy) && this.giftType === 0) {
this.getGiftId();
this.editChangeTypeStatus = false;
if (this.giftType === 0) {
this.getGiftId();
}
}
this.getCategoryOptions(); // 分类数据
this.$nextTick(function () {
window.addEventListener('scroll', this.onScroll, true);
});
......@@ -1239,10 +1244,9 @@ export default {
this.giftForm.cashCost = data.cashCost; // 现金
this.giftForm.virtualStock = data.virtualStock; // 库存
this.currentStock = data.virtualStock;
if (this.isCopy) {
console.log('copy回显');
if (this.isCopy && data.giftType == 0 && data.changeType == 5) {
this.giftForm.virtualStock = ''; // 库存
this.currentStock = 0;
this.currentStock = '';
}
this.giftForm.proCodeQuery = data.proCodeQuery; // 条形码
this.giftForm.costValue = data.costValue; // 礼品成本
......@@ -1434,8 +1438,6 @@ export default {
});
this.skuList.push(tem);
}
console.log('list', this.skuList);
this.handleSku();
}
if (data.giftType === 1) {
......@@ -1471,6 +1473,7 @@ export default {
}
}
}
console.log(this.giftForm.virtualStock);
}
}).finally(() => {
this.submitLoading = false;
......@@ -1663,7 +1666,6 @@ export default {
} else {
this.memberGradeList = [];
}
console.log(this.memberGradeList);
} else {
this.$message.error(res.data.message);
}
......@@ -2295,7 +2297,6 @@ export default {
}).then(() => {
this.submitLoading = true;
this.saveDeatail(params);
console.log('保存');
});
},
saveDeatail(params) {
......
......@@ -54,16 +54,19 @@
<script>
import errorList from '../../order/errorList';
import getInputVal from '@/utils/common.js';
export default {
props: {
importCouponModal: {
couponModal: {
type: Object,
default () {
return {};
},
},
},
data () {
return {
action: window.location.origin + '/api-integral-mall/upload-gift-card?requestProject=intergral-mall',
// action: 'http://gicdev.demogic.com/api-integral-mall/upload-gift-card?requestProject=intergral-mall',
action: getInputVal.uploadAction('/api-integral-mall/upload-gift-card?requestProject=intergral-mall'),
headersUpload: {
sign: '',
},
......@@ -81,8 +84,17 @@ export default {
list: [],
},
importMess: false,
importCouponModal: {},
};
},
watch: {
couponModal: {
handler (val) {
this.importCouponModal = val;
},
immediate: true,
},
},
methods: {
// 下载模板
downloadFile () {
......
......@@ -28,7 +28,7 @@
>
<el-form-item label="上架规则名称" prop="ruleTitle">
<el-input
maxlength="12"
maxlength="30"
show-word-limit
placeholder="请输入上架规则名称"
v-model="ruleForm.ruleTitle"
......@@ -39,7 +39,7 @@
</el-form-item>
<el-form-item label="上架规则名称备注" prop="ruleExplanation">
<el-input
maxlength="30"
maxlength="50"
show-word-limit
placeholder="请输入上架规则说明"
v-model="ruleForm.ruleExplanation"
......
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