|
|
|
@ -93,10 +93,15 @@
|
|
|
|
|
<span>状态</span>
|
|
|
|
|
<a @click="activeFlag = true">添加</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="form.serviceWorkflowName">
|
|
|
|
|
<span style="margin-right: 30px;">服务名称:{{ form.serviceWorkflowName }}</span>
|
|
|
|
|
<span style="margin-right: 30px;">服务代码:{{ form.serviceWorkflowCode }}</span>
|
|
|
|
|
<a @click="addItemFlag = true">修改</a>
|
|
|
|
|
<div class="statBox" v-if="form.statusList.length > 0">
|
|
|
|
|
<div class="status" v-for="(item,index) in form.statusList" :key="item.sortNo">
|
|
|
|
|
<span class="sort">{{ item.sortNo }}</span>
|
|
|
|
|
<span class="name">{{ item.showName }}</span>
|
|
|
|
|
<span class="action">
|
|
|
|
|
<a-icon type="setting" style="margin-right: 10px;cursor: pointer;" />
|
|
|
|
|
<a-icon type="delete" @click="handleDelAct(index)" style="cursor: pointer;" />
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-model>
|
|
|
|
@ -140,12 +145,17 @@
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal title="流程活动引入" :width="800" :visible="activeFlag" @cancel="activeFlag = false">
|
|
|
|
|
<div>
|
|
|
|
|
<a-form-model :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }" :model="activeForm">
|
|
|
|
|
<a-form-model-item style="margin-bottom: 10px;" label="流程活动">
|
|
|
|
|
<a-form-model
|
|
|
|
|
ref="activeForm"
|
|
|
|
|
:rules="activeRules"
|
|
|
|
|
:labelCol="{ span: 3 }"
|
|
|
|
|
:wrapperCol="{ span: 21 }"
|
|
|
|
|
:model="activeForm">
|
|
|
|
|
<a-form-model-item prop="statusSKUId" style="margin-bottom: 10px;" label="流程活动">
|
|
|
|
|
<a-select
|
|
|
|
|
show-search
|
|
|
|
|
placeholder="请选择流程活动"
|
|
|
|
|
v-model="activeForm.id"
|
|
|
|
|
v-model="activeForm.statusSKUId"
|
|
|
|
|
style="width: 300px;margin-right: 20px;"
|
|
|
|
|
@search="activeSearch"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
@ -158,15 +168,33 @@
|
|
|
|
|
</a-select>
|
|
|
|
|
<a @click="addActiveFlag = true">添加</a>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item style="margin-bottom: 10px;" label="顺序号">
|
|
|
|
|
<a-input-number v-model="activeForm.sort" :min="1" :max="100" />
|
|
|
|
|
<a-form-model-item prop="sortNo" style="margin-bottom: 10px;" label="顺序号">
|
|
|
|
|
<a-input-number :precision="0" v-model="activeForm.sortNo" :min="1" :max="100" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item label="值类型">
|
|
|
|
|
<a-select placeholder="请选择值类型" v-model="activeForm.type" style="width: 300px;margin-right: 20px;">
|
|
|
|
|
<a-form-model-item prop="valType" label="值类型">
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择值类型"
|
|
|
|
|
v-model="activeForm.valType"
|
|
|
|
|
style="width: 300px;margin-right: 20px;">
|
|
|
|
|
<a-select-option value="时间">时间</a-select-option>
|
|
|
|
|
<a-select-option value="字符串">字符串</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item style="margin-bottom: 10px;" label="包含子状态">
|
|
|
|
|
<a-checkbox v-model="activeForm.isContainsSub"></a-checkbox>
|
|
|
|
|
<a v-if="activeForm.isContainsSub" style="margin-left: 10px;" @click="handlePushSub">添加子状态</a>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<p>说明:包含子状态,可指定多个子状态,启用一个状态触发后,当前状态触发</p>
|
|
|
|
|
<div class="statBox" v-if="activeForm.subList.length > 0">
|
|
|
|
|
<div class="status" v-for="(item,index) in activeForm.subList" :key="item.sortNo">
|
|
|
|
|
<span class="sort">{{ item.sortNo }}</span>
|
|
|
|
|
<span class="name">{{ item.showName }}</span>
|
|
|
|
|
<span class="action">
|
|
|
|
|
<a-icon type="setting" @click="handleEditSub(item,index)" style="margin-right: 10px;cursor: pointer;" />
|
|
|
|
|
<a-icon type="delete" @click="handleDelSub(index)" style="cursor: pointer;" />
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-model>
|
|
|
|
|
</div>
|
|
|
|
|
<template slot="footer">
|
|
|
|
@ -178,14 +206,67 @@
|
|
|
|
|
</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal title="子流程活动引入" :width="800" :visible="subActiveFlag" @cancel="subActiveFlag = false">
|
|
|
|
|
<div>
|
|
|
|
|
<a-form-model
|
|
|
|
|
ref="subActiveForm"
|
|
|
|
|
:rules="subActiveRules"
|
|
|
|
|
:labelCol="{ span: 3 }"
|
|
|
|
|
:wrapperCol="{ span: 21 }"
|
|
|
|
|
:model="subActiveForm">
|
|
|
|
|
<a-form-model-item prop="statusSKUId" style="margin-bottom: 10px;" label="流程活动">
|
|
|
|
|
<a-select
|
|
|
|
|
show-search
|
|
|
|
|
placeholder="请选择流程活动"
|
|
|
|
|
v-model="subActiveForm.statusSKUId"
|
|
|
|
|
style="width: 300px;margin-right: 20px;"
|
|
|
|
|
@search="activeSearch"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null">
|
|
|
|
|
<a-select-option v-for="item in activeList" :key="item.pkId" :value="item.pkId">
|
|
|
|
|
{{ item.showName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<a @click="addActiveFlag = true">添加</a>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item prop="sortNo" style="margin-bottom: 10px;" label="顺序号">
|
|
|
|
|
<a-input-number :precision="0" v-model="subActiveForm.sortNo" :min="1" :max="100" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item prop="valType" label="值类型">
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择值类型"
|
|
|
|
|
v-model="subActiveForm.valType"
|
|
|
|
|
style="width: 300px;margin-right: 20px;">
|
|
|
|
|
<a-select-option value="时间">时间</a-select-option>
|
|
|
|
|
<a-select-option value="字符串">字符串</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-form-model>
|
|
|
|
|
</div>
|
|
|
|
|
<template slot="footer">
|
|
|
|
|
<a-button @click="handleSaveSubActive">
|
|
|
|
|
确定
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button @click="subActiveFlag = false">
|
|
|
|
|
关闭
|
|
|
|
|
</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal title="服务活动新增" :width="800" :visible="addActiveFlag" @cancel="addActiveFlag = false">
|
|
|
|
|
<div>
|
|
|
|
|
<a-form-model :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }" :model="addActiveForm">
|
|
|
|
|
<a-form-model-item style="margin-bottom: 10px;" label="状态名称">
|
|
|
|
|
<a-form-model
|
|
|
|
|
ref="addActiveForm"
|
|
|
|
|
:rules="addRules"
|
|
|
|
|
:labelCol="{ span: 3 }"
|
|
|
|
|
:wrapperCol="{ span: 21 }"
|
|
|
|
|
:model="addActiveForm">
|
|
|
|
|
<a-form-model-item prop="statusSKUId" style="margin-bottom: 10px;" label="状态名称">
|
|
|
|
|
<a-select
|
|
|
|
|
show-search
|
|
|
|
|
placeholder="请选择状态名称"
|
|
|
|
|
v-model="addActiveForm.id"
|
|
|
|
|
v-model="addActiveForm.statusSKUId"
|
|
|
|
|
style="width: 300px;margin-right: 20px;"
|
|
|
|
|
@search="statusSearch"
|
|
|
|
|
@change="handleChangeStatus"
|
|
|
|
@ -201,13 +282,13 @@
|
|
|
|
|
<a-form-model-item style="margin-bottom: 10px;" label="状态代码">
|
|
|
|
|
123
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
<a-form-model-item style="margin-bottom: 10px;" label="活动名称">
|
|
|
|
|
<a-input v-model="addActiveForm.name" />
|
|
|
|
|
<a-form-model-item prop="showName" style="margin-bottom: 10px;" label="活动名称">
|
|
|
|
|
<a-input v-model="addActiveForm.showName" />
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-form-model>
|
|
|
|
|
</div>
|
|
|
|
|
<template slot="footer">
|
|
|
|
|
<a-button @click="handleSaveActive">
|
|
|
|
|
<a-button type="primary" @click="handleSaveAddActive">
|
|
|
|
|
确定
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button @click="addActiveFlag = false">
|
|
|
|
@ -218,7 +299,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { StatusSkuBaseSave, StatusSkuBaseSavAndEnable, projectQueryList, QueryActivitiesList, QueryListStatus } from '@/api/modular/system/appManage'
|
|
|
|
|
import { StatusSkuBaseSave, StatusSkuBaseSavAndEnable, projectQueryList, QueryActivitiesList, QueryListStatus, SaveWFActivities } from '@/api/modular/system/appManage'
|
|
|
|
|
import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -232,18 +313,41 @@ export default {
|
|
|
|
|
sm: { span: 17 }
|
|
|
|
|
},
|
|
|
|
|
serviceItem: '',
|
|
|
|
|
subActiveForm: {
|
|
|
|
|
sortNo: 1
|
|
|
|
|
},
|
|
|
|
|
activeForm: {
|
|
|
|
|
sort: 1
|
|
|
|
|
sortNo: 1,
|
|
|
|
|
subList: [],
|
|
|
|
|
isContainsSub: false
|
|
|
|
|
},
|
|
|
|
|
subActiveFlag: false,
|
|
|
|
|
addRules: {
|
|
|
|
|
statusSKUId: [{ required: true, message: '请选择状态名称', trigger: 'change' }],
|
|
|
|
|
showName: [{ required: true, message: '请输入活动名称', trigger: 'blur' }]
|
|
|
|
|
},
|
|
|
|
|
activeRules: {
|
|
|
|
|
valType: [{ required: true, message: '请选择值类型', trigger: 'change' }],
|
|
|
|
|
sortNo: [{ required: true, message: '请输入顺序号', trigger: 'blur' }],
|
|
|
|
|
statusSKUId: [{ required: true, message: '请选择流程活动', trigger: 'change' }]
|
|
|
|
|
},
|
|
|
|
|
subActiveRules: {
|
|
|
|
|
valType: [{ required: true, message: '请选择值类型', trigger: 'change' }],
|
|
|
|
|
sortNo: [{ required: true, message: '请输入顺序号', trigger: 'blur' }],
|
|
|
|
|
statusSKUId: [{ required: true, message: '请选择流程活动', trigger: 'change' }]
|
|
|
|
|
},
|
|
|
|
|
addItemFlag: false,
|
|
|
|
|
visible: false,
|
|
|
|
|
subType: 'add',
|
|
|
|
|
activeFlag: false,
|
|
|
|
|
addActiveFlag: false,
|
|
|
|
|
statusList: [],
|
|
|
|
|
addActiveForm: {},
|
|
|
|
|
projectList: [],
|
|
|
|
|
statusSkuList: [],
|
|
|
|
|
activeList: [],
|
|
|
|
|
form: {},
|
|
|
|
|
form: {
|
|
|
|
|
statusList: []
|
|
|
|
|
},
|
|
|
|
|
confirmLoading: false,
|
|
|
|
|
SysTenantData: []
|
|
|
|
|
}
|
|
|
|
@ -267,11 +371,122 @@ export default {
|
|
|
|
|
add() {
|
|
|
|
|
this.visible = true
|
|
|
|
|
},
|
|
|
|
|
handleDelSub(index) {
|
|
|
|
|
this.activeForm.subList.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
handleDelAct(index) {
|
|
|
|
|
this.form.activeList.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
handlePushSub() {
|
|
|
|
|
this.subActiveFlag = true
|
|
|
|
|
this.subType = 'add'
|
|
|
|
|
},
|
|
|
|
|
handleEditSub(item, index) {
|
|
|
|
|
this.subActiveForm = JSON.parse(JSON.stringify(item))
|
|
|
|
|
this.subType = 'edit'
|
|
|
|
|
this.subActiveFlag = true
|
|
|
|
|
this.subIndex = index
|
|
|
|
|
},
|
|
|
|
|
sortBy(a, b) {
|
|
|
|
|
if (a.sortNo < b.sortNo) {
|
|
|
|
|
return -1;
|
|
|
|
|
} else if (a.sortNo > b.sortNo) {
|
|
|
|
|
return 1;
|
|
|
|
|
} else if (a.sortNo === b.sortNo) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleAddSubAct() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleSaveSubActive() {
|
|
|
|
|
this.$refs.subActiveForm.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
const arr = []
|
|
|
|
|
if (this.subType === 'add') {
|
|
|
|
|
this.activeForm.subList.forEach(item => {
|
|
|
|
|
if (item.sortNo === this.subActiveForm.sortNo) {
|
|
|
|
|
arr.push(1)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.activeForm.subList.forEach(item => {
|
|
|
|
|
if (item.sortNo === this.subActiveForm.sortNo &&
|
|
|
|
|
this.subActiveForm.sortNo !== this.activeForm.subList[this.subIndex].sortNo) {
|
|
|
|
|
arr.push(1)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (arr.length > 0) {
|
|
|
|
|
this.$message.warning('顺序号不能重复')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
this.activeList.forEach(item => {
|
|
|
|
|
if (item.pkId === this.subActiveForm.statusSKUId) {
|
|
|
|
|
this.subActiveForm.showName = item.showName
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (this.subType === 'add') {
|
|
|
|
|
this.activeForm.subList.push(JSON.parse(JSON.stringify(this.subActiveForm)))
|
|
|
|
|
} else {
|
|
|
|
|
this.$set(this.activeForm.subList, this.subIndex, JSON.parse(JSON.stringify(this.subActiveForm)))
|
|
|
|
|
}
|
|
|
|
|
this.subActiveFlag = false
|
|
|
|
|
this.activeForm.subList.sort((a, b) => a.sortNo - b.sortNo)
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleSaveActive() {
|
|
|
|
|
console.log(this.activeForm)
|
|
|
|
|
this.$refs.activeForm.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.form.statusList.forEach(item => {
|
|
|
|
|
if (item.sortNo === this.activeForm.sortNo) {
|
|
|
|
|
arr.push(1)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (arr.length > 0) {
|
|
|
|
|
this.$message.warning('顺序号不能重复')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
this.activeList.forEach(item => {
|
|
|
|
|
if (item.pkId === this.activeForm.statusSKUId) {
|
|
|
|
|
this.activeForm.showName = item.showName
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.form.statusList.push(JSON.parse(JSON.stringify(this.activeForm)))
|
|
|
|
|
this.activeFlag = false
|
|
|
|
|
this.form.statusList.sort((a, b) => a.sortNo - b.sortNo)
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleSaveAddActive() {
|
|
|
|
|
this.$refs.addActiveForm.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
SaveWFActivities(this.addActiveForm).then(res => {
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
this.$message.success('添加成功')
|
|
|
|
|
this.addActiveFlag = false
|
|
|
|
|
QueryActivitiesList().then(res => {
|
|
|
|
|
this.activeList = res.data.ext
|
|
|
|
|
})
|
|
|
|
|
this.$refs.addActiveForm.resetFields()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.data.msg)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleChangeStatus(){
|
|
|
|
|
|
|
|
|
|
handleChangeStatus() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleInto() {
|
|
|
|
|
if (!this.serviceItem) {
|
|
|
|
@ -381,4 +596,34 @@ export default {
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.statBox {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
|
|
|
|
.status {
|
|
|
|
|
border: 1px solid black;
|
|
|
|
|
margin-right: 15px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
|
|
|
|
.sort {
|
|
|
|
|
padding: 0 15px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.action {
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.name {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 5px 15px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
background: rgb(184, 53, 137);
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|