修改问题

master
sunzehua 1 year ago
parent 5cfc430a1d
commit ee4fe03ebd

@ -338,3 +338,42 @@ export function GetShowTimeLine (parameter) {
params: parameter params: parameter
}) })
} }
export function BaseQueryList (parameter) {
return axios({
url: '/StatusTriggerBase/QueryList',
method: 'get',
params: parameter
})
}
export function GetTriggerOperTypeList (parameter) {
return axios({
url: '/StatusTriggerBase/GetTriggerOperTypeList',
method: 'get',
params: parameter
})
}
export function GetTriggerNextActionTypeList (parameter) {
return axios({
url: '/StatusTriggerBase/GetTriggerNextActionTypeList',
method: 'get',
params: parameter
})
}
export function CreateLiquidExpression (parameter) {
return axios({
url: '/StatusTriggerBase/CreateLiquidExpression',
method: 'post',
data: parameter
})
}
export function SaveStatusTriggerBase (parameter) {
return axios({
url: '/StatusTriggerBase/Save',
method: 'post',
data: parameter
})
}

@ -1128,8 +1128,8 @@ export default {
// if (type === 'voyno' && this.details.carrierid === 'ESL') { // if (type === 'voyno' && this.details.carrierid === 'ESL') {
// this.details.voynoinner = this.details[type] // this.details.voynoinner = this.details[type]
// } // }
if (type === 'voyno' && value !== '') { if (type === 'voynoinner' && this.details.voyno == '') {
this.details.voynoinner = this.details[type] this.details.voyno = this.details[type]
} }
if (type === 'epCode' && this.details.carrierid === 'ESL') { if (type === 'epCode' && this.details.carrierid === 'ESL') {
this.details.tmblno = this.details[type] this.details.tmblno = this.details[type]

@ -708,9 +708,10 @@ export default {
this.$message.loading({ content: '校验中...' }) this.$message.loading({ content: '校验中...' })
ExcuteRulesOceanBooking(this.id) ExcuteRulesOceanBooking(this.id)
.then(res => { .then(res => {
console.log(res)
if (res.success) { if (res.success) {
this.$message.destroy() this.$message.destroy()
if (!res.succ) { if (res.data.rows && res.data.rows.length > 0) {
this.$message.error(res.data.msg) this.$message.error(res.data.msg)
} else { } else {
this.$message.success({ content: '校验完成' }) this.$message.success({ content: '校验完成' })

@ -83,6 +83,17 @@
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-item label="云港通ETD" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择云港通ETD"
v-decorator="['ygtETD']"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback> <a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker <a-date-picker

@ -115,7 +115,7 @@
v-for="item in columns" v-for="item in columns"
:key="item.dataIndex" :key="item.dataIndex"
:field="item.dataIndex" :field="item.dataIndex"
:min-width="item.width" :width="item.width"
:title="item.title" :title="item.title"
:align="item.align" :align="item.align"
:show-overflow="true" :show-overflow="true"
@ -191,57 +191,74 @@ export default {
{ {
title: '船公司', title: '船公司',
align: 'center', align: 'center',
dataIndex: 'carrier' dataIndex: 'carrier',
width: 150
}, },
{ {
title: '海关航次', title: '海关航次',
align: 'center', align: 'center',
dataIndex: 'voyno' dataIndex: 'voyno',
width: 150
}, },
{ {
title: '内部航次', title: '内部航次',
align: 'center', align: 'center',
dataIndex: 'voynoInside' dataIndex: 'voynoInside',
width: 150
},
{
title: '云港通ETD',
align: 'center',
dataIndex: 'ygtETD',
width: 150
}, },
{ {
title: '开船日期', title: '开船日期',
align: 'center', align: 'center',
dataIndex: 'etd' dataIndex: 'etd',
width: 150
}, },
{ {
title: '实际开船', title: '实际开船',
align: 'center', align: 'center',
dataIndex: 'atd' dataIndex: 'atd',
width: 150
}, },
{ {
title: '截港日期', title: '截港日期',
align: 'center', align: 'center',
dataIndex: 'closingDate' dataIndex: 'closingDate',
width: 150
}, },
{ {
title: '预抵日期', title: '预抵日期',
align: 'center', align: 'center',
dataIndex: 'eta' dataIndex: 'eta',
width: 150
}, },
{ {
title: '装货港', title: '装货港',
align: 'center', align: 'center',
dataIndex: 'portLoading' dataIndex: 'portLoading',
width: 150
}, },
{ {
title: '中转港', title: '中转港',
align: 'center', align: 'center',
dataIndex: 'portTransit' dataIndex: 'portTransit',
width: 150
}, },
{ {
title: '卸货港', title: '卸货港',
align: 'center', align: 'center',
dataIndex: 'portDischarge' dataIndex: 'portDischarge',
width: 150
}, },
{ {
title: '默认场站', title: '默认场站',
align: 'center', align: 'center',
dataIndex: 'yard' dataIndex: 'yard',
width: 150
} }
], ],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' }, tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },

@ -201,6 +201,10 @@
</span> </span>
</div> </div>
</div> </div>
<div class="title">
<span>触发器</span>
<a @click="baseAddFlag = true">添加</a>
</div>
</a-form-model> </a-form-model>
</div> </div>
<template slot="footer"> <template slot="footer">
@ -299,6 +303,44 @@
</a-button> </a-button>
</template> </template>
</a-modal> </a-modal>
<a-modal title="触发器引入" :width="800" :visible="baseAddFlag" @cancel="baseAddFlag = false">
<div>
<a-form-model
ref="addBaseForm"
:rules="addRules"
:labelCol="{ span: 3 }"
:wrapperCol="{ span: 21 }"
:model="addBaseForm">
<a-form-model-item prop="statusSKUId" style="margin-bottom: 10px;" label="触发器">
<a-select
show-search
placeholder="请选择触发器"
v-model="addActiveForm.statusSKUId"
style="width: 300px;margin-right: 20px;"
@search="statusSearch"
@change="handleChangeStatus"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null">
<a-select-option v-for="item in baseList" :key="item.pkId" :value="item.pkId">
{{ item.statusTriggerName }}
</a-select-option>
</a-select>
<a @click="handleInto" style="margin-right: 20px;">引入</a>
<a @click="addEditBaseFlag=true"></a>
</a-form-model-item>
</a-form-model>
</div>
<template slot="footer">
<a-button type="primary" @click="handleSaveAddActive">
确定
</a-button>
<a-button @click="baseAddFlag = false">
关闭
</a-button>
</template>
</a-modal>
<a-modal title="流程展示" :width="1400" :visible="timeFlag" @cancel="timeFlag = false"> <a-modal title="流程展示" :width="1400" :visible="timeFlag" @cancel="timeFlag = false">
<a-spin :spinning="timeLoading"> <a-spin :spinning="timeLoading">
<div v-if="timeForm.activitiesList && timeForm.activitiesList.length > 0" class="time"> <div v-if="timeForm.activitiesList && timeForm.activitiesList.length > 0" class="time">
@ -327,10 +369,159 @@
<div v-else></div> <div v-else></div>
</a-spin> </a-spin>
</a-modal> </a-modal>
<a-modal title="触发器编辑" :width="1000" :visible="addEditBaseFlag" @cancel="addEditBaseFlag=false">
<a-form-model ref="editConditForm" :rules="editConditRule" class="main" :model="editConditForm">
<a-row>
<a-col :span="8">
<a-form-model-item prop="statusTriggerName" label="触发器名称" :wrapperCol="wrapperCol" :labelCol="labelCol">
<a-input placeholder="触发器名称" v-model="editConditForm.statusTriggerName" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item prop="statusTriggerCode" label="触发器代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="触发器代码" v-model="editConditForm.statusTriggerCode" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="触发器说明" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="触发器说明" v-model="editConditForm.statusTriggerNote" />
</a-form-model-item>
</a-col>
</a-row>
<div class="title">
<span>条件</span>
<a @click="handleAddCondition"></a>
</div>
<div>
<div class="condit" v-for="(item,index) in editConditForm.conditList" :key="index">
<div class="conditRow">
<span>满足条件</span>
<a v-if="item.showName" @click="handleOpenCondIt(index)" class="blur">{{ item.showName }}</a>
<a v-else @click="handleOpenCondIt(index)" class="blur">选择</a>
<a-select
placeholder="请选择条件"
v-model="item.operType"
style="width: 300px;margin-right: 20px;"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null">
<a-select-option v-for="ite in typeList" :key="ite.code" :value="ite.code">
{{ ite.name }}
</a-select-option>
</a-select>
<span>于是触发</span>
<a class="blur" v-if="item.nextActionTypeName" @click="handleOpenMexAction(index)">{{ item.nextActionTypeName }}</a>
<a class="blur" v-else @click="handleOpenMexAction(index)"></a>
<span @click="handleDelAddCondit(index)" style="cursor: pointer;"><a-icon type="delete" /></span>
</div>
<div class="conditRow">
<span>表达式</span>
<a-textarea v-model="item.liquidExpression" style="width: 750px;margin: 0 20px 0 30px;" placeholder="Basic usage" :rows="4" />
<a class="blur" @click="handleAppend(item,index)"></a>
</div>
</div>
</div>
</a-form-model>
<template slot="footer">
<a-button @click="addEditBaseFlag=false">
关闭
</a-button>
<a-button type="danger" @click="handleSaveEditCondit">
确认
</a-button>
</template>
</a-modal>
<a-modal title="选择条件" :width="800" :visible="conditFlag" @cancel="conditFlag = false">
<div>
<span style="margin-right: 20px;">流程活动</span>
<a-select
show-search
placeholder="请选择流程活动"
v-model="conditAct"
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>
</div>
<template slot="footer">
<a-button @click="conditFlag = false">
关闭
</a-button>
<a-button type="primary" @click="handleIntoCondIt">
确定
</a-button>
</template>
</a-modal>
<a-modal title="选择触发动作" :width="800" :visible="mexActionFlag" @cancel="mexActionFlag = false">
<a-form-model
ref="mexActionForm"
:rules="addRules"
:labelCol="{ span: 3 }"
:wrapperCol="{ span: 21 }"
:model="addActiveForm">
<a-form-model-item style="margin-bottom: 10px;" label="触发动作">
<a-select
placeholder="请选择触发动作"
v-model="mexActionForm.nextActionType"
style="width: 300px;margin-right: 20px;"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null">
<a-select-option v-for="item in mextActionList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item v-if="mexActionForm.nextActionType=='TRIGGER_ACTIVITIES'" style="margin-bottom: 10px;" label="流程活动">
<a-select
show-search
placeholder="请选择流程活动"
v-model="mexConditAct"
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="actionInTo"></a>
</a-form-model-item>
<div class="statBox" v-if="mexActionForm.nextActList && mexActionForm.nextActList.length > 0">
<div class="status" v-for="(item, index) in mexActionForm.nextActList" :key="index">
<span class="name">{{ item.showName }}</span>
<span class="action">
<a-icon type="delete" @click="handleDelMexAct(index)" style="cursor: pointer;" />
</span>
</div>
</div>
</a-form-model>
<template slot="footer">
<a-button @click="conditFlag = false">
关闭
</a-button>
<a-button type="primary" @click="handleAddMexAction">
确定
</a-button>
</template>
</a-modal>
</div> </div>
</template> </template>
<script> <script>
import { workFlowSetEnable, workFlowSetUnPublishRelease, workFlowSaveAndEnable, workFlowSetUnDelete, workFlowGetInfo, StatusSkuBaseSavAndEnable, projectQueryList, QueryActivitiesList, QueryListStatus, SaveWFActivities, GetShowTimeLine } from '@/api/modular/system/appManage' import { workFlowSetEnable, workFlowSetUnPublishRelease, workFlowSaveAndEnable,
workFlowSetUnDelete, workFlowGetInfo, StatusSkuBaseSavAndEnable, projectQueryList,
QueryActivitiesList, QueryListStatus, SaveWFActivities, CreateLiquidExpression,
GetShowTimeLine, BaseQueryList, GetTriggerOperTypeList, GetTriggerNextActionTypeList, SaveStatusTriggerBase } from '@/api/modular/system/appManage'
import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate' import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate'
export default { export default {
data() { data() {
@ -343,17 +534,33 @@ export default {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 17 } sm: { span: 17 }
}, },
mexActionForm: {
nextActList: []
},
mexConditAct: '',
serviceItem: '', serviceItem: '',
mexActionIndex: 0,
mexActionFlag: false,
subActiveForm: { subActiveForm: {
sortNo: 1 sortNo: 1
}, },
mextActionList: [],
conditFlag: false,
timeLoading: false, timeLoading: false,
condItIndex: 0,
conditActName: '',
activeForm: { activeForm: {
sortNo: 1, sortNo: 1,
subList: [], subList: [],
isContainsSubs: false isContainsSubs: false
}, },
addEditBaseFlag: false,
addBaseForm: {},
subActiveFlag: false, subActiveFlag: false,
editConditRule: {
statusTriggerCode: [{ required: true, message: '请输入触发器代码', trigger: 'change' }],
statusTriggerName: [{ required: true, message: '请输入触发器名称', trigger: 'blur' }]
},
formRule: { formRule: {
belongTenantId: [{ required: true, message: '请选择租户', trigger: 'change' }], belongTenantId: [{ required: true, message: '请选择租户', trigger: 'change' }],
serviceWorkflowCode: [{ required: true, message: '请输入服务代码', trigger: 'blur' }], serviceWorkflowCode: [{ required: true, message: '请输入服务代码', trigger: 'blur' }],
@ -378,15 +585,23 @@ export default {
subType: 'add', subType: 'add',
type: 'add', type: 'add',
index: '', index: '',
editConditForm: {
conditList: []
},
activeFlag: false, activeFlag: false,
timeFlag: false, timeFlag: false,
statusSKUCode: '', statusSKUCode: '',
addActiveFlag: false, addActiveFlag: false,
baseAddFlag: false,
typeList: [],
conditAct: '',
conditActCode: '',
timeForm: { timeForm: {
activitiesList: [] activitiesList: []
}, },
addActiveForm: {}, addActiveForm: {},
projectList: [], projectList: [],
baseList: [],
statusList: [], statusList: [],
activeList: [], activeList: [],
form: { form: {
@ -410,6 +625,15 @@ export default {
QueryListStatus().then(res => { QueryListStatus().then(res => {
this.statusList = res.data.ext this.statusList = res.data.ext
}) })
BaseQueryList().then(res => {
this.baseList = res.data.ext
})
GetTriggerOperTypeList().then(res => {
this.typeList = res.data.ext
})
GetTriggerNextActionTypeList().then(res => {
this.mextActionList = res.data.ext
})
}, },
methods: { methods: {
// //
@ -420,6 +644,56 @@ export default {
serviceProject: {} serviceProject: {}
} }
}, },
handleAddCondition() {
this.editConditForm.conditList.push({ operType: '' })
},
handleDelMexAct(index) {
this.mexActionForm.nextActList.splice(index, 1)
},
handleAddMexAction() {
if (this.mexActionForm.nextActionType) {
let name = ''
this.mextActionList.forEach(item => {
if (item.code === this.mexActionForm.nextActionType) {
name = item.name
}
})
this.editConditForm.conditList[this.condItIndex].nextActionType = this.mexActionForm.nextActionType
this.editConditForm.conditList[this.condItIndex].nextActionTypeName = name
if (this.mexActionForm.nextActList.length > 0) {
this.editConditForm.conditList[this.condItIndex].nextActList = this.mexActionForm.nextActList
}
this.mexActionFlag = false
} else {
this.$message.warning('请选择')
}
},
handleAppend(item, index) {
CreateLiquidExpression(item).then(res => {
if (res.data.succ) {
this.editConditForm.conditList[index].liquidExpression = res.data.ext
this.$forceUpdate()
} else {
this.$message.error(res.data.msg)
}
})
},
actionInTo() {
if (this.mexConditAct) {
let name = ''
this.activeList.forEach(item => {
if (item.pkId === this.mexConditAct) {
name = item.showName
}
})
this.mexActionForm.nextActList.push({
serviceActivitiesID: this.mexConditAct,
showName: name
})
} else {
this.$message.warning('请选择')
}
},
handleDelete() { handleDelete() {
workFlowSetUnDelete([this.form.pkId]).then(res => { workFlowSetUnDelete([this.form.pkId]).then(res => {
if (res.data.ext[0].succ) { if (res.data.ext[0].succ) {
@ -431,6 +705,29 @@ export default {
} }
}) })
}, },
handleIntoCondIt() {
if (this.conditAct) {
this.activeList.forEach(item => {
if (item.pkId === this.conditAct) {
this.conditActName = item.showName
}
})
this.editConditForm.conditList[this.condItIndex].showName = this.conditActName
this.editConditForm.conditList[this.condItIndex].serviceActivitiesID = this.conditAct
this.conditFlag = false
} else {
this.$message.warning('请选择流程活动')
return false
}
},
handleOpenCondIt(index) {
this.conditFlag = true
this.condItIndex = index
},
handleOpenMexAction(index) {
this.mexActionFlag = true
this.mexActionIndex = index
},
handleUnable() { handleUnable() {
workFlowSetEnable([this.form.pkId]).then(res => { workFlowSetEnable([this.form.pkId]).then(res => {
if (res.data.ext[0].succ) { if (res.data.ext[0].succ) {
@ -536,6 +833,15 @@ export default {
this.timeLoading = false this.timeLoading = false
}) })
}, },
handleSaveEditCondit() {
this.$refs.editConditForm.validate(valid => {
if (valid) {
SaveStatusTriggerBase(this.editConditForm).then(res => {
console.log(res)
})
}
})
},
handleSaveSubActive() { handleSaveSubActive() {
this.$refs.subActiveForm.validate(valid => { this.$refs.subActiveForm.validate(valid => {
if (valid) { if (valid) {
@ -576,6 +882,9 @@ export default {
} }
}); });
}, },
handleDelAddCondit(index) {
this.editConditForm.conditList.splice(index, 1)
},
handleSaveActive() { handleSaveActive() {
this.$refs.activeForm.validate(valid => { this.$refs.activeForm.validate(valid => {
if (valid) { if (valid) {
@ -859,4 +1168,12 @@ export default {
} }
} }
.conditRow{
display: flex;
align-items: center;
margin-top: 20px;
}
.blur{
margin: 0 20px;
}
</style> </style>

Loading…
Cancel
Save