修改问题

master
sunzehua 1 year ago
parent cc1680e839
commit aa7a821297

@ -290,3 +290,43 @@ export function workFlowGetInfo (parameter) {
params: parameter
})
}
export function workFlowSetEnable (parameter) {
return axios({
url: '/ServiceWorkFlowBase/SetEnable',
method: 'post',
data: parameter
})
}
export function workFlowSetUnEnable (parameter) {
return axios({
url: '/ServiceWorkFlowBase/SetUnEnable',
method: 'post',
data: parameter
})
}
export function workFlowSetUnDelete (parameter) {
return axios({
url: '/ServiceWorkFlowBase/Delete',
method: 'post',
data: parameter
})
}
export function workFlowSetUnPublishRelease (parameter) {
return axios({
url: '/ServiceWorkFlowBase/PublishRelease',
method: 'post',
data: parameter
})
}
export function workFlowSaveAndEnable (parameter) {
return axios({
url: '/ServiceWorkFlowBase/SaveAndEnable',
method: 'post',
data: parameter
})
}

@ -30,11 +30,11 @@ import StandardFormRow from '@/components/StandardFormRow'
import ArticleListContent from '@/components/ArticleListContent'
import AntdEditor from '@/components/Editor/WangEditor'
import Dialog from '@/components/Dialog'
import manyModel from '@/components/manyModel'
// xn components
import XCard from '@/components/xnComponents/XCard'
import setFormModel from '@/components/setFormModel'
import setFormModelTest from '@/components/setFormModelTest'
// import vfd from '@/components/flow/FlowDesigner'
export {
@ -71,6 +71,6 @@ export {
Dialog,
XCard,
setFormModel,
setFormModelTest
manyModel
// vfd
}

@ -0,0 +1,68 @@
<template>
<a-modal title="提示信息" width="1000px" :visible="bcFileFlag" :footer="null" @cancel="bcFileFlag = false">
<div class="bcfile-title">
<div><a-icon style="margin-right: 10px;" @click="handleCopy" type="copy" />时间{{ bcFile.executeTime }}</div>
<span> {{ bcFile.batchTotal }}</span>
</div>
<div ref="bcBox" class="bc-box" v-if="bcFile.ext && bcFile.ext.length > 0">
<div class="bc-item" v-for="(item, index) in bcFile.ext" :key="index">
<span>{{ item.bno }}</span>
<span> {{ item.msg }}</span>
</div>
</div>
<div v-else>{{ bcFile.msg }}</div>
</a-modal>
</template>
<script>
export default {
name: 'ManyModel',
props: {
bcFile: {
type: Object,
default: () => { }
}
},
data() {
return {
bcFileFlag: false
}
},
mounted() { },
methods: {
handleCopy() {
this.$message.success('复制成功');
const text = this.$refs.bcBox.innerText
var cInput = document.createElement('input');
cInput.value = text;
document.body.appendChild(cInput);
cInput.select(); //
document.execCommand('copy');
document.body.removeChild(cInput);
}
}
}
</script>
<style scoped lang="less">
.bcfile-title {
border-bottom: 1px dashed black;
padding-bottom: 5px;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.bc-box {
max-height: 200px;
overflow-y: auto;
padding-right: 14px;
.bc-item {
margin: 7px 0px;
display: flex;
justify-content: space-between;
}
}
</style>

@ -37,44 +37,41 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-row v-if="form.pkId">
<a-col :span="8">
<a-form-item label="发布版本号" :labelCol="labelCol" :wrapperCol="wrapperCol">
123
{{ form.releaseVersion }}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="最后发布日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
123
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发布人" :labelCol="labelCol" :wrapperCol="wrapperCol">
123
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-row v-if="form.pkId">
<a-col :span="8">
<a-form-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol">
123
{{ form.createdUserName }}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="创建日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
123
{{ form.createdTime }}
</a-form-item></a-col>
</a-row>
<a-row>
<a-row v-if="form.pkId">
<a-col :span="8">
<a-form-item label="流水号" :labelCol="labelCol" :wrapperCol="wrapperCol">
123
</a-form-item></a-col>
<a-col :span="8"> <a-form-item label="更新人" :labelCol="labelCol" :wrapperCol="wrapperCol">
123
{{ form.updatedUserName }}
</a-form-item></a-col>
<a-col :span="8"> <a-form-item label="更新日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
123
{{ form.updatedTime }}
</a-form-item></a-col>
</a-row>
<div>
@ -93,7 +90,7 @@
<span>状态</span>
<a @click="handleAddStatus"></a>
</div>
<div class="statBox" v-if="form.statusSkuList.length > 0">
<div class="statBox" v-if="form.statusSkuList && form.statusSkuList.length > 0">
<div class="status" v-for="(item,index) in form.statusSkuList" :key="item.sortNo">
<span class="sort">{{ item.sortNo }}</span>
<span class="name">{{ item.showName }}</span>
@ -110,12 +107,18 @@
<a-button @click="handleCancel">
关闭
</a-button>
<a-button @click="handleSubmit" type="primary">
保存
<a-button type="danger" @click="handleDelete">
删除
</a-button>
<a-button @click="handleUnable" type="danger">
取消启用
</a-button>
<a-button @click="handleSubmitEnable" type="primary">
保存并启用
</a-button>
<a-button @click="handlePub" type="primary">
发布
</a-button>
</template>
</a-modal>
<a-modal title="服务项目" :width="800" :visible="addItemFlag" @cancel="addItemFlag = false">
@ -185,7 +188,7 @@
<a v-if="activeForm.isContainsSubs" style="margin-left: 10px;" @click="handlePushSub"></a>
</a-form-model-item>
<p>说明包含子状态可指定多个子状态启用一个状态触发后当前状态触发</p>
<div class="statBox" v-if="activeForm.subList.length > 0">
<div class="statBox" v-if="activeForm.subList && 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>
@ -299,7 +302,7 @@
</div>
</template>
<script>
import { workFlowGetInfo, StatusSkuBaseSavAndEnable, projectQueryList, QueryActivitiesList, QueryListStatus, SaveWFActivities, workFlowSave } from '@/api/modular/system/appManage'
import { workFlowSetEnable, workFlowSetUnPublishRelease, workFlowSaveAndEnable, workFlowSetUnDelete, workFlowGetInfo, StatusSkuBaseSavAndEnable, projectQueryList, QueryActivitiesList, QueryListStatus, SaveWFActivities, workFlowSave } from '@/api/modular/system/appManage'
import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate'
export default {
data() {
@ -379,11 +382,61 @@ export default {
//
add() {
this.visible = true
this.form = {
statusSkuList: [],
serviceProject: {}
}
},
handleDelete() {
workFlowSetUnDelete([this.form.pkId]).then(res => {
if (res.data.ext[0].succ) {
this.$message.success('删除成功')
this.visible = false
this.$emit('ok')
} else {
this.$message.error(res.data.ext[0].msg)
}
})
},
handleUnable() {
workFlowSetEnable([this.form.pkId]).then(res => {
if (res.data.ext[0].succ) {
this.$message.success('取消启用成功')
this.$emit('ok')
this.visible = false
} else {
this.$message.error(res.data.ext[0].msg)
}
})
},
handlePub() {
workFlowSetUnPublishRelease([this.form.pkId]).then(res => {
if (res.data.ext[0].succ) {
this.$message.success('发布成功')
this.$emit('ok')
this.visible = false
} else {
this.$message.error(res.data.ext[0].msg)
}
})
},
edit(record) {
this.visible = true
this.confirmLoading = true
workFlowGetInfo({ pkId: record.pkId }).then(res => {
if (res.data.succ) {
if (res.data.ext.statusSkuList) {
res.data.ext.statusSkuList.forEach(item => {
if (item.isContainsSub == 1) {
item.isContainsSubs = true
} else {
item.isContainsSubs = false
}
if (!item.subList) {
item.subList = []
}
})
}
this.form = res.data.ext
if (!this.form.serviceProject) {
this.form.serviceProject = {}
@ -391,6 +444,7 @@ export default {
} else {
this.$message.error(res.data.msg)
}
this.confirmLoading = false
})
},
handleDelSub(index) {
@ -401,6 +455,7 @@ export default {
},
handleAddStatus() {
this.activeFlag = true
this.type = 'add'
this.activeForm = {
sortNo: 1,
subList: [],
@ -498,7 +553,6 @@ export default {
return false
}
this.activeList.forEach(item => {
console.log(item.pkId, this.activeForm.pkId)
if (item.pkId == this.activeForm.pkId) {
this.activeForm.showName = item.showName
}
@ -573,11 +627,12 @@ export default {
this.form.belongTenantName = item.name
}
})
workFlowSave(this.form).then((res) => {
workFlowSaveAndEnable(this.form).then((res) => {
this.confirmLoading = false
if (res.data.succ) {
this.$message.success('新增成功')
this.handleCancel()
this.$emit('ok')
} else {
this.$message.error('新增失败:' + res.data.msg)
}
@ -659,6 +714,8 @@ export default {
align-items: center;
justify-content: space-between;
margin-top: 15px;
font-size: 15px;
font-weight: bold;
}
.statBox {

@ -95,32 +95,32 @@ export default {
},
handleDelete() {
StatusSkuBaseDelete([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('删除成功')
this.visible = false
this.$emit('ok')
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},
handleUnable() {
StatusSkuBaseSetUnEnable([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('取消启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},
handleAble() {
StatusSkuBaseSetEnable([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},

@ -11,7 +11,7 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="发布时间">
<a-range-picker valueFormat="YYYY-MM-DD" v-model="queryParam.create">
<a-range-picker valueFormat="YYYY-MM-DD" v-model="queryParam.pubDate">
</a-range-picker>
</a-form-item>
</a-col>
@ -39,7 +39,7 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="创建时间">
<a-range-picker valueFormat="YYYY-MM-DD" v-model="queryParam.update">
<a-range-picker valueFormat="YYYY-MM-DD" v-model="queryParam.create">
</a-range-picker>
</a-form-item>
</a-col>
@ -54,18 +54,25 @@
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="版本号">
<a-input v-model="queryParam.updateUser" allow-clear placeholder="更新人" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="版本号">
<a-input v-model="queryParam.updateUser" allow-clear placeholder="更新人" />
<a-form-item label="所属租户">
<a-select
show-search
v-model="queryParam.belongTenantName"
@search="TenantHandleSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null">
<a-select-option v-for="item in SysTenantData" :key="item.id" :value="item.name">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="版本号">
<a-input v-model="queryParam.updateUser" allow-clear placeholder="更新人" />
<a-form-item label="更新时间">
<a-range-picker valueFormat="YYYY-MM-DD" v-model="queryParam.update">
</a-range-picker>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
@ -82,6 +89,7 @@
<div style="margin-bottom: 10px;">
<a-button @click="$refs.addForm.add()" type="primary">新增</a-button>
<a-button @click="handleStart" type="primary">启用</a-button>
<a-button @click="handlePub" type="primary">发布</a-button>
<a-button @click="handleStop"></a-button>
<a-popconfirm title="确认作废吗?" @confirm="handleDelete">
<a-button type="danger">作废</a-button>
@ -94,13 +102,18 @@
:data-source="list"
:pagination="pagination"
@change="tablePaginationChange"
:scroll="{ x: 1000 }"
:rowKey="(record) => record.pkId"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<span slot="action" slot-scope="text, record">
<a @click="$refs.addForm.edit(record)"></a>
</span>
<span slot="isEnable" slot-scope="text, record">
{{ record.isEnable==1?'是':'否' }}
</span>
</a-table>
<add-form ref="addForm" @ok="handleOk" />
<manyModel ref="manyModel" :bcFile="modelObj"></manyModel>
</a-spin>
</a-card>
</div>
@ -112,16 +125,20 @@ import {
} from '@/components'
import {
ServiceWorkFlowBaseGetPage,
StatusSkuBaseSetEnable,
StatusSkuBaseSetUnEnable,
StatusSkuBaseDelete
workFlowSetEnable,
workFlowSetUnEnable,
workFlowSetUnDelete,
workFlowSetUnPublishRelease
} from '@/api/modular/system/appManage'
import manyModel from '@/components/manyModel'
import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate'
import addForm from './addForm'
export default {
components: {
XCard,
STable,
addForm
addForm,
manyModel
},
data() {
return {
@ -144,61 +161,79 @@ export default {
//
queryParam: {
create: [],
update: []
update: [],
pubDate: []
},
modelObj:{},
//
columns: [{
title: '服务流程名称',
dataIndex: 'serviceWorkflowName'
dataIndex: 'serviceWorkflowName',
width: '160px'
},
{
title: '服务流程代码',
dataIndex: 'serviceWorkflowCode'
dataIndex: 'serviceWorkflowCode',
width: '200px'
},
{
title: '状态数量',
dataIndex: 'sortNo'
dataIndex: 'statusNum',
width: 100
},
{
title: '版本号',
dataIndex: 'statusSKUNote'
dataIndex: 'releaseVersion',
width: 100
},
{
title: '说明',
dataIndex: 'serviceWorkflowNote'
dataIndex: 'serviceWorkflowNote',
width: 100
},
{
title: '是否启用',
dataIndex: 'isEnable'
dataIndex: 'isEnable',
width: 100,
scopedSlots: {
customRender: 'isEnable'
}
},
{
title: '所属租户',
dataIndex: 'belongTenantName'
dataIndex: 'belongTenantName',
width: 200
},
{
title: '发布日期',
dataIndex: 'createdTime1'
dataIndex: 'publishDate',
width: 160
},
{
title: '创建日期',
dataIndex: 'createdTime'
dataIndex: 'createdTime',
width: 160
},
{
title: '创建人',
dataIndex: 'createdUserName'
dataIndex: 'createdUserName',
width: 150
},
{
title: '更新日期',
dataIndex: 'updatedTime'
dataIndex: 'updatedTime',
width: 160
},
{
title: '更新人',
dataIndex: 'updatedUserName'
dataIndex: 'updatedUserName',
width: 150
},
{
title: '操作',
width: '200px',
width: '70px',
dataIndex: 'action',
fixed: 'right',
scopedSlots: {
customRender: 'action'
}
@ -207,6 +242,7 @@ export default {
loading: false,
list: [],
selectedRowKeys: [],
SysTenantData: [],
pagination: {
current: 1,
total: 0, //
@ -218,6 +254,9 @@ export default {
},
created() {
this.getList()
SysTenantPage().then(res => {
this.SysTenantData = res.data.rows
})
},
methods: {
handleOk() {
@ -225,13 +264,26 @@ export default {
},
handleStart() {
if (this.selectedRowKeys.length > 0) {
StatusSkuBaseSetEnable(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('启用成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
workFlowSetEnable(this.selectedRowKeys).then(res => {
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
}
},
TenantHandleSearch(data) {
SysTenantPage({ name: data }).then(res => {
this.SysTenantData = res.data.rows
})
},
handlePub() {
if (this.selectedRowKeys.length > 0) {
workFlowSetUnPublishRelease(this.selectedRowKeys).then(res => {
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -239,13 +291,10 @@ export default {
},
handleStop() {
if (this.selectedRowKeys.length > 0) {
StatusSkuBaseSetUnEnable(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('取消启用成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
workFlowSetUnEnable(this.selectedRowKeys).then(res => {
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -253,13 +302,10 @@ export default {
},
handleDelete() {
if (this.selectedRowKeys.length > 0) {
StatusSkuBaseDelete(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
workFlowSetUnDelete(this.selectedRowKeys).then(res => {
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -267,7 +313,7 @@ export default {
},
handleRefsh() {
this.$refs.query.resetFields()
this.queryParam = { create: [], update: [] }
this.queryParam = { create: [], update: [], pubDate: [] }
this.getList()
},
handleSearch() {
@ -279,6 +325,10 @@ export default {
this.queryParam.updateBegin = this.queryParam.update[0]
this.queryParam.updateEnd = this.queryParam.update[1]
}
if (this.queryParam.pubDate.length > 0) {
this.queryParam.publishBegin = this.queryParam.pubDate[0]
this.queryParam.publishEnd = this.queryParam.pubDate[1]
}
this.getList()
},
getList() {
@ -287,12 +337,14 @@ export default {
pageSize: this.pagination.pageSize,
...this.queryParam
}
this.loading = true
ServiceWorkFlowBaseGetPage(data).then(res => {
if (res.success) {
this.list = res.data.items
} else {
this.$message.error(res.message)
}
this.loading = false
})
},
tablePaginationChange(pagination) {

@ -82,32 +82,32 @@ export default {
},
handleDelete() {
ServiceProjectDelete([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('删除成功')
this.visible = false
this.$emit('ok')
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},
handleUnable() {
ServiceProjectSetUnEnable([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('取消启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},
handleAble() {
ServiceProjectSetEnable([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},

@ -79,9 +79,13 @@
<span slot="action" slot-scope="text, record">
<a @click="$refs.editForm.edit(record)"></a>
</span>
<span slot="isEnable" slot-scope="text, record">
{{ record.isEnable==1?'是':'否' }}
</span>
</a-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
<manyModel ref="manyModel" :bcFile="modelObj"></manyModel>
</a-spin>
</a-card>
</div>
@ -97,6 +101,7 @@ import {
ServiceProjectSetUnEnable,
ServiceProjectDelete
} from '@/api/modular/system/appManage'
import manyModel from '@/components/manyModel'
import editForm from './editForm'
import addForm from './addForm'
export default {
@ -104,7 +109,8 @@ export default {
XCard,
STable,
editForm,
addForm
addForm,
manyModel
},
data() {
return {
@ -149,7 +155,10 @@ export default {
},
{
title: '是否启用',
dataIndex: 'isEnable'
dataIndex: 'isEnable',
scopedSlots: {
customRender: 'isEnable'
}
},
{
title: '创建日期',
@ -177,6 +186,7 @@ export default {
}
],
loading: false,
modelObj:{},
list: [],
selectedRowKeys: [],
pagination: {
@ -198,12 +208,9 @@ export default {
handleStart() {
if (this.selectedRowKeys.length > 0) {
ServiceProjectSetEnable(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('启用成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -212,12 +219,9 @@ export default {
handleStop() {
if (this.selectedRowKeys.length > 0) {
ServiceProjectSetUnEnable(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('取消启用成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -226,12 +230,9 @@ export default {
handleDelete() {
if (this.selectedRowKeys.length > 0) {
ServiceProjectDelete(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -259,12 +260,14 @@ export default {
pageSize: this.pagination.pageSize,
...this.queryParam
}
this.loading = true
ServiceProjectGetPage(data).then(res => {
if (res.success) {
this.list = res.data.items
} else {
this.$message.error(res.message)
}
this.loading = false
})
},
tablePaginationChange(pagination) {

@ -95,32 +95,32 @@ export default {
},
handleDelete() {
StatusSkuBaseDelete([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('删除成功')
this.visible = false
this.$emit('ok')
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},
handleUnable() {
StatusSkuBaseSetUnEnable([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('取消启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},
handleAble() {
StatusSkuBaseSetEnable([this.pkId]).then(res => {
if (res.data.succ) {
if (res.data.ext[0].succ) {
this.$message.success('启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
this.$message.error(res.data.ext[0].msg)
}
})
},

@ -79,11 +79,15 @@
<span slot="action" slot-scope="text, record">
<a @click="$refs.editForm.edit(record)"></a>
</span>
<span slot="isEnable" slot-scope="text, record">
{{ record.isEnable==1?'是':'否' }}
</span>
</a-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-spin>
</a-card>
<manyModel ref="manyModel" :bcFile="modelObj"></manyModel>
</div>
</template>
<script>
@ -98,12 +102,14 @@ import {
StatusSkuBaseDelete
} from '@/api/modular/system/appManage'
import editForm from './editForm'
import manyModel from '@/components/manyModel'
import addForm from './addForm'
export default {
components: {
XCard,
STable,
editForm,
manyModel,
addForm
},
data() {
@ -117,6 +123,7 @@ export default {
span: 5
}
},
modelObj: {},
wrapperCol: {
xs: {
span: 24
@ -125,6 +132,7 @@ export default {
span: 16
}
},
bcFileFlag: false,
//
queryParam: {
create: [],
@ -153,7 +161,10 @@ export default {
},
{
title: '是否启用',
dataIndex: 'isEnable'
dataIndex: 'isEnable',
scopedSlots: {
customRender: 'isEnable'
}
},
{
title: '创建日期',
@ -202,12 +213,9 @@ export default {
handleStart() {
if (this.selectedRowKeys.length > 0) {
StatusSkuBaseSetEnable(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('启用成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -216,12 +224,9 @@ export default {
handleStop() {
if (this.selectedRowKeys.length > 0) {
StatusSkuBaseSetUnEnable(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('取消启用成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -230,12 +235,9 @@ export default {
handleDelete() {
if (this.selectedRowKeys.length > 0) {
StatusSkuBaseDelete(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
this.getList()
this.modelObj = res.data
this.$refs.manyModel.bcFileFlag = true
})
} else {
this.$message.warning('请选择')
@ -263,12 +265,14 @@ export default {
pageSize: this.pagination.pageSize,
...this.queryParam
}
this.loading = true
StatusSkuBaseGetPage(data).then(res => {
if (res.success) {
this.list = res.data.items
} else {
this.$message.error(res.message)
}
this.loading = false
})
},
tablePaginationChange(pagination) {
@ -283,7 +287,7 @@ export default {
}
}
</script>
<style scoped>
<style scoped lang="less">
.table-operator {
margin-bottom: 18px;
}
@ -291,4 +295,5 @@ export default {
button {
margin-right: 8px;
}
</style>

Loading…
Cancel
Save