Commit 5eceac99 by 前端

Merge branch 'wuwx_dev_v2.0.0' into 'v2.0.0'

Wuwx dev v2.0.0

See merge request !14
2 parents 2c0dd4d9 67105b8e
......@@ -10710,7 +10710,7 @@
},
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-list-map": {
......@@ -12041,7 +12041,7 @@
},
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"requires": {
"sortablejs": "1.10.2"
......
......@@ -49,6 +49,11 @@
</div>
<p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
</template>
<template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
......@@ -129,7 +134,8 @@ export default {
effectiveType: '2',
effectiveTime: [],
effectiveDays: '',
anticipatedCost: ''
anticipatedCost: '',
directionalFlag: '1'
},
editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
......@@ -163,6 +169,13 @@ export default {
append: '张'
},
{
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '有效期',
name: 'effectiveType',
addHtml: 'effectiveHtml'
......@@ -259,6 +272,7 @@ export default {
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期
......@@ -325,6 +339,8 @@ export default {
}
//使用描述
obj.useDescription = form.useDescription
//是否定制礼包专用
obj.directionalFlag = form.directionalFlag
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
return obj
......@@ -343,7 +359,7 @@ export default {
}
this.$apis.couponManage[method](params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
......
......@@ -28,6 +28,11 @@
</div>
<p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
</template>
<template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
......@@ -108,7 +113,8 @@ export default {
effectiveType: '2',
effectiveTime: [],
effectiveDays: '',
anticipatedCost: ''
anticipatedCost: '',
directionalFlag: '1'
},
editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
......@@ -142,6 +148,13 @@ export default {
append: '张'
},
{
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '有效期',
name: 'effectiveType',
addHtml: 'effectiveHtml'
......@@ -237,6 +250,7 @@ export default {
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期
......@@ -303,6 +317,8 @@ export default {
}
//使用描述
obj.useDescription = form.useDescription
//是否定制礼包专用
obj.directionalFlag = form.directionalFlag
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
return obj
......@@ -321,7 +337,7 @@ export default {
}
this.$apis.couponManage[method](params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!