Commit 2198d7a6 by 前端

更新3.3.1代码

1 parent 0bbd31fb
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
created() { created() {
this.routeInfo = Object.keys(this.$route.query).length ? this.$route.query : this.$common.utils.storage.get('sopInfo') this.routeInfo = Object.keys(this.$route.query).length ? this.$route.query : this.$common.utils.storage.get('sopInfo')
console.log(this.routeInfo)
}, },
methods: { methods: {
......
...@@ -4,7 +4,21 @@ ...@@ -4,7 +4,21 @@
<div class="sop-base-info"> <div class="sop-base-info">
<div class="container m-b-20"> <div class="container m-b-20">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" <!-- <div v-if="this.routeInfo.addOrEdit =='look'">-->
<!-- <div class="marketing form-sub-block r">-->
<!-- <div class="flex-default">-->
<!-- <p>SOP名称:{{ editForm.sopName }}</p>-->
<!-- <p>营销时间:{{ editForm.startDate }}-{{ editForm.endDate }}</p>-->
<!-- </div>-->
<!-- <div>营销对象:</div>-->
<!-- <div>-->
<!-- 更新人群:{{ editForm.customerOptUpdate == '2' ? '自动更新' : editForm.customerOptUpdate == '1' ? '从不更新' : '' }}-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div >
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit"
:labelWidth="labelWidth"
:isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData"
:formRules="editRule"> :formRules="editRule">
<div slot="startDate"> <div slot="startDate">
...@@ -59,6 +73,7 @@ ...@@ -59,6 +73,7 @@
</div> </div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</div>
<div class="container edit-container"> <div class="container edit-container">
<div class="edit-title flex" style="align-items: center"> <div class="edit-title flex" style="align-items: center">
<p>营销事件设置</p> <p>营销事件设置</p>
...@@ -66,7 +81,7 @@ ...@@ -66,7 +81,7 @@
content="请先完善sop名称和营销对象" placement="top"> content="请先完善sop名称和营销对象" placement="top">
<div> <div>
<el-button class="m-r-20" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size" <el-button class="m-r-20" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size"
type="primary" @click="handleEventEdit('add')">添加事件 type="primary" v-if="this.routeInfo.addOrEdit !=='look'" @click="handleEventEdit('add')">添加事件
</el-button> </el-button>
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -110,10 +125,14 @@ ...@@ -110,10 +125,14 @@
<el-tooltip :disabled="!(!editForm.customerInfoList.length || !editForm.sopName)" effect="dark" <el-tooltip :disabled="!(!editForm.customerInfoList.length || !editForm.sopName)" effect="dark"
content="请先完善sop名称和营销对象" placement="top"> content="请先完善sop名称和营销对象" placement="top">
<div> <div>
<el-button class="default-blue-btn" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size" @click="handleEventEdit('edit', item, index)">编辑 <el-button class="default-blue-btn newBtnSty" :disabled="!editForm.customerInfoList.length || !editForm.sopName"
:size="size" @click="handleEventEdit('edit', item, index)">编辑
</el-button> </el-button>
</div> </div>
</el-tooltip> </el-tooltip>
<el-button class="default-blue-btn"
:size="size" @click="handleEventEdit('look', item, index)">查看
</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -332,7 +351,7 @@ export default { ...@@ -332,7 +351,7 @@ export default {
mounted() { mounted() {
this.setMinHeight('.sop-base-info') this.setMinHeight('.sop-base-info')
// this.routeInfo.addOrEdit == 'edit' // this.routeInfo.addOrEdit == 'edit'
if (['edit', 'copy'].includes(this.routeInfo.addOrEdit)) { if (['edit', 'copy', 'look'].includes(this.routeInfo.addOrEdit)) {
this.getInfo() this.getInfo()
} else if (this.routeInfo.info) { } else if (this.routeInfo.info) {
this.setCustomer() this.setCustomer()
...@@ -474,6 +493,7 @@ export default { ...@@ -474,6 +493,7 @@ export default {
this.editStatus = false this.editStatus = false
}) })
} else { } else {
console.log(res)
this.editForm = res this.editForm = res
this.currentCustomerIdx = this.customerDataList.findIndex(item => item.confId == this.editForm.customerOptType) this.currentCustomerIdx = this.customerDataList.findIndex(item => item.confId == this.editForm.customerOptType)
this.recoverCustomerList() this.recoverCustomerList()
...@@ -564,7 +584,7 @@ export default { ...@@ -564,7 +584,7 @@ export default {
break break
} }
this.editForm.customerInfoList = JSON.parse(JSON.stringify(this.customerDataList[this.currentCustomerIdx].list)) this.editForm.customerInfoList = JSON.parse(JSON.stringify(this.customerDataList[this.currentCustomerIdx].list))
this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList') this.$refs.editFormRef && this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
// this.key = new Date() // this.key = new Date()
}, },
...@@ -1007,7 +1027,8 @@ export default { ...@@ -1007,7 +1027,8 @@ export default {
top: 16px; top: 16px;
right: 16px; right: 16px;
display: flex; display: flex;
.newBtnSty{
.newBtnSty {
margin-right: 8px; margin-right: 8px;
} }
} }
......
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
return row.sopStatus == 3 return row.sopStatus == 3
}, },
listeners: { listeners: {
click: this.handleEnd click: row => this.handleEdit('look', row)
} }
}, },
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!