修改问题

master
sunzehua 1 year ago
parent e674ca98d6
commit cc1680e839

@ -274,3 +274,19 @@ export function SaveWFActivities (parameter) {
data: parameter
})
}
export function workFlowSave (parameter) {
return axios({
url: '/ServiceWorkFlowBase/Save',
method: 'post',
data: parameter
})
}
export function workFlowGetInfo (parameter) {
return axios({
url: '/ServiceWorkFlowBase/GetInfo',
method: 'get',
params: parameter
})
}

@ -48,7 +48,6 @@ export default {
onEdit(targetKey, action) {
const _that = this
if (targetKey.includes('BookingDetail')) {
console.log(Object.keys(this.needSavePages).includes(targetKey), this.needSavePages[targetKey].details, this.needSavePages[targetKey].hbList)
if (
Object.keys(this.needSavePages).includes(targetKey) &&
(this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList)

@ -258,7 +258,7 @@ const initDetail = {
payableatid: '',
blfrt: '',
thirdpayaddr: '',
service: '',
service: 'CY-CY',
reeferf: '',
tempset: '',
tempid: '',
@ -1748,7 +1748,7 @@ export default {
}
},
removeOrderFun() {
DeleteLetterYard(this.bookingDetails.id)
DeleteBookingOrder(this.bookingDetails.id)
.then(res => {
if (res.success) {
this.$message.success('删除成功')

@ -159,11 +159,6 @@
<a-icon class="CSMblnoCopy" type="copy" @click="FnCopy(row.mblno)" />
</div>
</template>
<template #pono="{ row }">
<div class="pono">
{{ row.pono }}
</div>
</template>
<template #IsVGM="{ row }">
<div v-if="row.isVGM" style="text-align: center;">
<a-popover placement="topLeft">
@ -210,12 +205,10 @@
<div class="etd" v-if="row.ygtETD">{{ row.ygtETD.substring(0, 10) }}</div>
</template>
<template #atd="{ row, rowIndex }">
<div class="atd" v-if="row.atd">
<a-spin :spinning="row.atdLoading">
<a-icon style="cursor: pointer;" @click="handleRefshAtd(row, rowIndex)" type="reload" />
{{ row.atd.substring(0, 10) }}
</a-spin>
</div>
<a-spin :spinning="row.atdLoading">
<a-icon style="cursor: pointer;" @click="handleRefshAtd(row, rowIndex)" type="reload" />
<span v-if="row.atd"> {{ row.atd.substring(0, 10) }}</span>
</a-spin>
</template>
<template #issuedate="{ row }">
<div class="atd" v-if="row.issuedate">{{ row.issuedate.substring(0, 10) }}</div>
@ -355,7 +348,7 @@
{{ row.dzRemark }}
</template>
<div style="display: flex;align-items: center;">
<a-input @blur="getBlurMark(row,1)" @focus="getFocusMark(row,1)" style="margin-top: 0px;" v-model="row.dzRemark" default-value="mysite">
<a-input @blur="getBlurMark(row,'rowDzMark')" @focus="getFocusMark(row,'rowDzMark')" style="margin-top: 0px;" v-model="row.dzRemark">
</a-input>
<a-icon v-show="row.rowDzMark" style="cursor: pointer;margin-left: 5px;color:#36cfc9;" @mousedown.native="handleSaveMark(row,1)" type="check-circle" theme="filled" />
</div>
@ -371,7 +364,7 @@
{{ row.czRemark }}
</template>
<div style="display: flex;align-items: center;">
<a-input @blur="getBlurMark(row,2)" @focus="getFocusMark(row,2)" style="margin-top: 0px;" v-model="row.czRemark" default-value="mysite">
<a-input @blur="getBlurMark(row,'rowCzMark')" @focus="getFocusMark(row,'rowCzMark')" style="margin-top: 0px;" v-model="row.czRemark">
</a-input>
<a-icon v-show="row.rowCzMark" style="cursor: pointer;margin-left: 5px;color:#36cfc9;" @mousedown.native="handleSaveMark(row,2)" type="check-circle" theme="filled" />
</div>
@ -380,6 +373,40 @@
</div>
</template>
<template #shenQingXiangShi="{ row }">
<div >
<a-spin :spinning="row.sqxsLoading">
<a-popover placement="topLeft">
<template slot="content">
{{ row.shenQingXiangShi }}
</template>
<div style="display: flex;align-items: center;">
<a-input @blur="getBlurMark(row,'rowSqxs')" @focus="getFocusMark(row,'rowSqxs')" style="margin-top: 0px;" v-model="row.shenQingXiangShi">
</a-input>
<a-icon v-show="row.rowSqxs" style="cursor: pointer;margin-left: 5px;color:#36cfc9;" @mousedown.native="handleSaveMark(row,4)" type="check-circle" theme="filled" />
</div>
</a-popover>
</a-spin>
</div>
</template>
<template #pono="{ row }">
<div >
<a-spin :spinning="row.ponoLoading">
<a-popover placement="topLeft">
<template slot="content">
{{ row.pono }}
</template>
<div style="display: flex;align-items: center;">
<a-input @blur="getBlurMark(row,'rowPono')" @focus="getFocusMark(row,'rowPono')" style="margin-top: 0px;" v-model="row.pono">
</a-input>
<a-icon v-show="row.rowPono" style="cursor: pointer;margin-left: 5px;color:#36cfc9;" @mousedown.native="handleSaveMark(row,5)" type="check-circle" theme="filled" />
</div>
</a-popover>
</a-spin>
</div>
</template>
<template #custno="{ row }">
<a-spin :spinning="row.custnoLoading">
<a-popover placement="topLeft">
@ -387,7 +414,7 @@
{{ row.custno }}
</template>
<div style="display: flex;align-items: center;">
<a-input @blur="getBlurMark(row,3)" @focus="getFocusMark(row,3)" style="margin-top: 0px;" v-model="row.custno" default-value="mysite">
<a-input @blur="getBlurMark(row,'rowCustno')" @focus="getFocusMark(row,'rowCustno')" style="margin-top: 0px;" v-model="row.custno">
</a-input>
<a-icon v-show="row.rowCustno" style="cursor: pointer;margin-left: 5px;color:#36cfc9;" @mousedown.native="handleSaveMark(row,3)" type="check-circle" theme="filled" />
</div>
@ -1051,7 +1078,11 @@ export default {
item.dzmarkLoading = false
item.czmarkLoading = false
item.custnoLoading = false
item.sqxsLoading = false
item.ponoLoading = false
item.rowCzMark = false
item.rowSqxs = false
item.rowPono = false
item.rowCustno = false
item.rowDzMark = false
item.atdLoading = false
@ -1601,6 +1632,12 @@ export default {
if (item.field === 'custno') {
item.slots = { 'default': 'custno' }
}
if (item.field === 'shenQingXiangShi') {
item.slots = { 'default': 'shenQingXiangShi' }
}
if (item.field === 'pono') {
item.slots = { 'default': 'pono' }
}
if (item.label === 'LINENAME') {
item.field = 'lineName'
}
@ -2035,9 +2072,13 @@ export default {
item.rowDzMark = false
item.rowCzMark = false
item.rowCustno = false
item.rowSqxs = false
item.rowPono = false
item.czmarkLoading = false
item.custnoLoading = false
item.dzmarkLoading = false
item.sqxsLoading = false
item.ponoLoading = false
let hasGoods = 0
item.goodsStatusList.map((gitem, gindex) => {
if (gitem.finishTime || gitem.remark) {
@ -2146,18 +2187,25 @@ export default {
row.custnoLoading = true
data.custno = row.custno
}
if (type === 4) {
row.sqxsLoading = true
data.shenQingXiangShi = row.shenQingXiangShi
}
if (type === 5) {
row.ponoLoading = true
data.pono = row.pono
}
SaveDataInList(data).then(res => {
if (res.success) {
this.$message.success('修改成功')
row.dzmarkLoading = false
row.czmarkLoading = false
row.custnoLoading = false
} else {
this.$message.error(res.message)
row.dzmarkLoading = false
row.czmarkLoading = false
row.custnoLoading = false
}
row.dzmarkLoading = false
row.czmarkLoading = false
row.custnoLoading = false
row.sqxsLoading = false
row.ponoLoading = false
})
},
@ -2236,27 +2284,11 @@ export default {
pressEnterFun() {
this.tableRefresh()
},
getFocusMark(row, type) {
if (type === 1) {
row.rowDzMark = true
}
if (type === 2) {
row.rowCzMark = true
}
if (type === 3) {
row.rowCustno = true
}
getFocusMark(row, file) {
row[file] = true
},
getBlurMark(row, type) {
if (type === 1) {
row.rowDzMark = false
}
if (type === 2) {
row.rowCzMark = false
}
if (type === 3) {
row.rowCustno = false
}
getBlurMark(row, file) {
row[file] = false
},
remarkhover(e, data) {
if (data.bookremark.length > 0) {

@ -450,7 +450,8 @@ export default {
label: 'shenQingXiangShi',
width: 110,
title: '申请箱使',
showHeaderOverflow: true
showHeaderOverflow: true,
slots: { default: 'shenQingXiangShi' }
},
{
field: 'thirdPay',

@ -8,29 +8,29 @@
@cancel="handleCancel"
:confirmLoading="confirmLoading">
<a-spin :spinning="confirmLoading">
<a-form-model class="main" :model="form">
<a-form-model ref="form" :rules="formRule" class="main" :model="form">
<a-row>
<a-col :span="8">
<a-form-model-item label="服务流程名称" :wrapperCol="wrapperCol" :labelCol="labelCol">
<a-input placeholder="服务流程名称" v-model="form.statusSKUName" />
<a-form-model-item prop="serviceWorkflowName" label="服务流程名称" :wrapperCol="wrapperCol" :labelCol="labelCol">
<a-input placeholder="服务流程名称" v-model="form.serviceWorkflowName" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="服务流程代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="服务流程代码" v-model="form.statusSKUName" />
<a-form-model-item prop="serviceWorkflowCode" label="服务流程代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="服务流程代码" v-model="form.serviceWorkflowCode" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="所属租户" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
show-search
v-model="form.tenantName"
v-model="form.belongTenantId"
@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">
<a-select-option v-for="item in SysTenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
@ -80,26 +80,26 @@
<div>
<div class="title">
<span>服务信息</span>
<a v-if="!form.serviceWorkflowName" @click="addItemFlag = true"></a>
<a v-if="!form.serviceProject.serviceProjectName" @click="addItemFlag = true"></a>
</div>
<div v-if="form.serviceWorkflowName">
<span style="margin-right: 30px;">服务名称:{{ form.serviceWorkflowName }}</span>
<span style="margin-right: 30px;">服务代码:{{ form.serviceWorkflowCode }}</span>
<div v-if="form.serviceProject.serviceProjectName">
<span style="margin-right: 30px;">服务名称:{{ form.serviceProject.serviceProjectName }}</span>
<span style="margin-right: 30px;">服务代码:{{ form.serviceProject.serviceProjectCode }}</span>
<a @click="addItemFlag = true">修改</a>
</div>
</div>
<div>
<div class="title">
<span>状态</span>
<a @click="activeFlag = true"></a>
<a @click="handleAddStatus"></a>
</div>
<div class="statBox" v-if="form.statusList.length > 0">
<div class="status" v-for="(item,index) in form.statusList" :key="item.sortNo">
<div class="statBox" v-if="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>
<span class="action">
<a-icon type="setting" style="margin-right: 10px;cursor: pointer;" />
<a-icon type="delete" @click="handleDelAct(index)" style="cursor: pointer;" />
<a-icon type="setting" @click="handleEditStatus(item,index)" style="margin-right: 10px;cursor: pointer;" />
<a-icon type="delete" @click="handleDelStatus(index)" style="cursor: pointer;" />
</span>
</div>
</div>
@ -123,7 +123,7 @@
<span>服务项目</span>
<a-select
show-search
placeholder="请选择租户名称"
placeholder="请选择服务项目"
v-model="serviceItem"
style="width: 300px;margin-right: 20px;"
@search="projectSearch"
@ -151,11 +151,11 @@
:labelCol="{ span: 3 }"
:wrapperCol="{ span: 21 }"
:model="activeForm">
<a-form-model-item prop="statusSKUId" style="margin-bottom: 10px;" label="流程活动">
<a-form-model-item prop="pkId" style="margin-bottom: 10px;" label="流程活动">
<a-select
show-search
placeholder="请选择流程活动"
v-model="activeForm.statusSKUId"
v-model="activeForm.pkId"
style="width: 300px;margin-right: 20px;"
@search="activeSearch"
:default-active-first-option="false"
@ -181,8 +181,8 @@
</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-checkbox v-model="activeForm.isContainsSubs"></a-checkbox>
<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">
@ -214,11 +214,11 @@
:labelCol="{ span: 3 }"
:wrapperCol="{ span: 21 }"
:model="subActiveForm">
<a-form-model-item prop="statusSKUId" style="margin-bottom: 10px;" label="流程活动">
<a-form-model-item prop="pkId" style="margin-bottom: 10px;" label="流程活动">
<a-select
show-search
placeholder="请选择流程活动"
v-model="subActiveForm.statusSKUId"
v-model="subActiveForm.pkId"
style="width: 300px;margin-right: 20px;"
@search="activeSearch"
:default-active-first-option="false"
@ -274,13 +274,13 @@
: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 v-for="item in statusList" :key="item.pkId" :value="item.pkId">
{{ item.statusSKUName }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item style="margin-bottom: 10px;" label="状态代码">
123
{{ statusSKUCode }}
</a-form-model-item>
<a-form-model-item prop="showName" style="margin-bottom: 10px;" label="活动名称">
<a-input v-model="addActiveForm.showName" />
@ -299,7 +299,7 @@
</div>
</template>
<script>
import { StatusSkuBaseSave, StatusSkuBaseSavAndEnable, projectQueryList, QueryActivitiesList, QueryListStatus, SaveWFActivities } from '@/api/modular/system/appManage'
import { workFlowGetInfo, StatusSkuBaseSavAndEnable, projectQueryList, QueryActivitiesList, QueryListStatus, SaveWFActivities, workFlowSave } from '@/api/modular/system/appManage'
import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate'
export default {
data() {
@ -319,9 +319,14 @@ export default {
activeForm: {
sortNo: 1,
subList: [],
isContainsSub: false
isContainsSubs: false
},
subActiveFlag: false,
formRule: {
belongTenantId: [{ required: true, message: '请选择租户', trigger: 'change' }],
serviceWorkflowCode: [{ required: true, message: '请输入服务代码', trigger: 'blur' }],
serviceWorkflowName: [{ required: true, message: '请输入服务名称', trigger: 'blur' }]
},
addRules: {
statusSKUId: [{ required: true, message: '请选择状态名称', trigger: 'change' }],
showName: [{ required: true, message: '请输入活动名称', trigger: 'blur' }]
@ -329,24 +334,28 @@ export default {
activeRules: {
valType: [{ required: true, message: '请选择值类型', trigger: 'change' }],
sortNo: [{ required: true, message: '请输入顺序号', trigger: 'blur' }],
statusSKUId: [{ required: true, message: '请选择流程活动', trigger: 'change' }]
pkId: [{ required: true, message: '请选择流程活动', trigger: 'change' }]
},
subActiveRules: {
valType: [{ required: true, message: '请选择值类型', trigger: 'change' }],
sortNo: [{ required: true, message: '请输入顺序号', trigger: 'blur' }],
statusSKUId: [{ required: true, message: '请选择流程活动', trigger: 'change' }]
pkId: [{ required: true, message: '请选择流程活动', trigger: 'change' }]
},
addItemFlag: false,
visible: false,
subType: 'add',
type: 'add',
index: '',
activeFlag: false,
statusSKUCode: '',
addActiveFlag: false,
addActiveForm: {},
projectList: [],
statusSkuList: [],
statusList: [],
activeList: [],
form: {
statusList: []
statusSkuList: [],
serviceProject: {}
},
confirmLoading: false,
SysTenantData: []
@ -371,16 +380,43 @@ export default {
add() {
this.visible = true
},
edit(record) {
this.visible = true
workFlowGetInfo({ pkId: record.pkId }).then(res => {
if (res.data.succ) {
this.form = res.data.ext
if (!this.form.serviceProject) {
this.form.serviceProject = {}
}
} else {
this.$message.error(res.data.msg)
}
})
},
handleDelSub(index) {
this.activeForm.subList.splice(index, 1)
},
handleDelAct(index) {
this.form.activeList.splice(index, 1)
handleDelStatus(index) {
this.form.statusSkuList.splice(index, 1)
},
handleAddStatus() {
this.activeFlag = true
this.activeForm = {
sortNo: 1,
subList: [],
isContainsSubs: false
}
},
handlePushSub() {
this.subActiveFlag = true
this.subType = 'add'
},
handleEditStatus(item, index) {
this.activeForm = JSON.parse(JSON.stringify(item))
this.type = 'edit'
this.activeFlag = true
this.index = index
},
handleEditSub(item, index) {
this.subActiveForm = JSON.parse(JSON.stringify(item))
this.subType = 'edit'
@ -423,7 +459,7 @@ export default {
return false
}
this.activeList.forEach(item => {
if (item.pkId === this.subActiveForm.statusSKUId) {
if (item.pkId === this.subActiveForm.pkId) {
this.subActiveForm.showName = item.showName
}
})
@ -443,23 +479,37 @@ export default {
this.$refs.activeForm.validate(valid => {
if (valid) {
const arr = []
this.form.statusList.forEach(item => {
if (this.type === 'add') {
this.form.statusSkuList.forEach(item => {
if (item.sortNo === this.activeForm.sortNo) {
arr.push(1)
}
})
} else {
this.form.statusSkuList.forEach(item => {
if (item.sortNo === this.activeForm.sortNo &&
this.activeForm.sortNo !== this.form.statusSkuList[this.index].sortNo) {
arr.push(1)
}
})
}
if (arr.length > 0) {
this.$message.warning('顺序号不能重复')
return false
}
this.activeList.forEach(item => {
if (item.pkId === this.activeForm.statusSKUId) {
console.log(item.pkId, this.activeForm.pkId)
if (item.pkId == this.activeForm.pkId) {
this.activeForm.showName = item.showName
}
})
this.form.statusList.push(JSON.parse(JSON.stringify(this.activeForm)))
if (this.type === 'add') {
this.form.statusSkuList.push(JSON.parse(JSON.stringify(this.activeForm)))
} else {
this.$set(this.form.statusSkuList, this.index, JSON.parse(JSON.stringify(this.activeForm)))
}
this.activeFlag = false
this.form.statusList.sort((a, b) => a.sortNo - b.sortNo)
this.form.statusSkuList.sort((a, b) => a.sortNo - b.sortNo)
} else {
return false;
}
@ -485,8 +535,12 @@ export default {
}
});
},
handleChangeStatus() {
handleChangeStatus(val) {
this.statusList.forEach(item => {
if (item.pkId === val) {
this.statusSKUCode = item.statusSKUCode
}
})
},
handleInto() {
if (!this.serviceItem) {
@ -495,25 +549,35 @@ export default {
} else {
this.projectList.forEach(item => {
if (item.pkId === this.serviceItem) {
this.form.serviceWorkflowCode = item.serviceProjectCode
this.form.serviceWorkflowName = item.serviceProjectName
this.form.serviceProject.serviceProjectCode = item.serviceProjectCode
this.form.serviceProject.serviceProjectName = item.serviceProjectName
this.form.serviceProject.pkId = item.pkId
this.addItemFlag = false
}
})
}
},
handleSubmit() {
const { form: { validateFields } } = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
values.pkId = null
StatusSkuBaseSave(values).then((res) => {
this.$refs.form.validate(valid => {
if (valid) {
this.confirmLoading = true
this.form.statusSkuList.forEach(item => {
if (item.isContainsSubs) {
item.isContainsSub = 1
} else {
item.isContainsSub = 2
}
})
this.SysTenantData.forEach(item => {
if (item.id === this.form.belongTenantId) {
this.form.belongTenantName = item.name
}
})
workFlowSave(this.form).then((res) => {
this.confirmLoading = false
if (res.data.succ) {
this.$message.success('新增成功')
this.handleCancel()
this.$emit('ok', values)
} else {
this.$message.error('新增失败:' + res.data.msg)
}

@ -97,11 +97,10 @@
:rowKey="(record) => record.pkId"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<span slot="action" slot-scope="text, record">
<a @click="$refs.editForm.edit(record)"></a>
<a @click="$refs.addForm.edit(record)"></a>
</span>
</a-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-spin>
</a-card>
</div>
@ -117,13 +116,11 @@ import {
StatusSkuBaseSetUnEnable,
StatusSkuBaseDelete
} from '@/api/modular/system/appManage'
import editForm from './editForm'
import addForm from './addForm'
export default {
components: {
XCard,
STable,
editForm,
addForm
},
data() {

Loading…
Cancel
Save