修改问题

master
sunzehua 1 year ago
parent 84dc4a776f
commit e674ca98d6

@ -397,9 +397,8 @@ export function SendLetterYard(parameter) {
*/
export function DeleteLetterYard(parameter) {
return axios({
url: '/BookingLetteryard/LetterYardDelete',
method: 'post',
data: parameter
url: '/BookingLetteryard/LetterYardDelete?id=' + parameter,
method: 'post'
})
}
@ -1068,3 +1067,19 @@ export function SaveInList (parameter) {
data: parameter
})
}
export function SaveDataInList (parameter) {
return axios({
url: '/BookingOrder/SaveDataInList',
method: 'post',
data: parameter
})
}
export function yardLetterYardHis (parameter) {
return axios({
url: '/BookingLetteryard/LetterYardHis',
method: 'get',
params: parameter
})
}

@ -266,3 +266,11 @@ export function QueryListStatus (parameter) {
params: parameter
})
}
export function SaveWFActivities (parameter) {
return axios({
url: '/ServiceWorkFlowBase/SaveWFActivities',
method: 'post',
data: parameter
})
}

@ -31,7 +31,7 @@
</div>
</div>
</div>
<div v-if="type=='table'" class="basic-from basic-from-show">
<div v-if="type == 'table'" class="basic-from basic-from-show">
<div class="title">
<span class="left"></span>
<span class="right"></span>
@ -44,8 +44,14 @@
<div class="label" style="background-color: #d1bc55;" :key="index" v-if="!item.noDraggable">
<span>{{ item.title }}</span>
<span class="sort">
<a-icon :style="{ color: item.descSort==false?'#409eff':'' }" @click="handleSort(item,index,false)" type="caret-up" />
<a-icon :style="{ color: item.descSort?'#409eff':'' }" @click="handleSort(item,index,true)" type="caret-down" />
<a-icon
:style="{ color: item.descSort == false ? '#409eff' : '' }"
@click="handleSort(item, index, false)"
type="caret-up" />
<a-icon
:style="{ color: item.descSort ? '#409eff' : '' }"
@click="handleSort(item, index, true)"
type="caret-down" />
</span>
<i class="iconfont icon-guanbi" @click="removeFromSort(item, index)"></i>
</div>
@ -139,6 +145,7 @@ export default {
this.$set(this.sortList, index, item)
},
handleAddSort(item) {
console.log(item)
const arr = []
this.sortList.forEach(ite => {
if (ite.field === item.field) {
@ -146,8 +153,10 @@ export default {
}
})
if (arr.length === 0) {
item.descSort = true
this.sortList.push(item)
if (item.field !== 'bookstatus' && item.field !== 'statuslogs') {
item.descSort = true
this.sortList.push(item)
}
}
},
open() {
@ -168,11 +177,11 @@ export default {
this.sortList = []
const arr = []
this.fromLabel.forEach(ite => {
if (ite.field === this.firstSort.label) {
ite.descSort = this.firstSort.type === 'desc'
arr.push(ite)
}
})
if (ite.field === this.firstSort.label) {
ite.descSort = this.firstSort.type === 'desc'
arr.push(ite)
}
})
this.sortList = arr
}
},
@ -217,6 +226,7 @@ export default {
display: inline-block;
padding-top: 3px;
margin: 0 5px;
i {
height: 12px !important;
cursor: pointer;
@ -402,4 +412,5 @@ export default {
color: @primary-color;
}
}
}</style>
}
</style>

@ -155,7 +155,8 @@ import {
BookingOrderSave,
getDjyTenantConfig,
GetAllData,
DeleteBookingOrder
DeleteBookingOrder,
DeleteLetterYard
} from '@/api/modular/main/BookingLedger'
import { mapActions, mapGetters } from 'vuex'
import rules from './rulesTest'
@ -1747,7 +1748,7 @@ export default {
}
},
removeOrderFun() {
DeleteBookingOrder([this.bookingDetails.id].toString())
DeleteLetterYard(this.bookingDetails.id)
.then(res => {
if (res.success) {
this.$message.success('删除成功')

@ -1254,10 +1254,12 @@ export default {
if ([37, 38, 39, 40, 9].includes(event.keyCode)) {
if (arr.length === 0) {
setTimeout(() => {
const activeDom = document.getElementsByClassName('ve-table-cell-selection')[0].firstChild
if (document.getElementsByClassName('ve-table-cell-selection')) {
const activeDom = document.getElementsByClassName('ve-table-cell-selection')[0].firstChild
if (this.isDOM(activeDom)) {
activeDom.click()
}
}
}, 200)
}
}
@ -1673,7 +1675,8 @@ export default {
const addTable = []
const cntrnoArr = []
let kindpkgsOld = ''
for (let i = this.tableData.length - 1; i >= 0; i--) {
this.tableData = []
{/* for (let i = this.tableData.length - 1; i >= 0; i--) {
if (!this.tableData[i].cntrno) {
this.tableData.splice(i, 1)
} else {
@ -1682,27 +1685,9 @@ export default {
if (this.tableData[i] && this.tableData[i].kindpkgs !== '') {
kindpkgsOld = this.tableData[i].kindpkgs
}
}
} */}
const lastNum = this.tableData.length > 0 ? Number(this.tableData[this.tableData.length - 1].rowKey) + 1 : 0
data.map((item, index) => {
if (cntrnoArr.includes(item.CNTRNO)) {
this.tableData[cntrnoArr.indexOf(item.CNTRNO)] = {
rowKey: lastNum + index,
ctnall: item.CTNALL,
ctncode: item.CtnCode,
ctnnum: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].ctnnum,
cntrno: item.CNTRNO,
sealno: item.SEALNO,
pkgs: item.PKGS,
kindpkgs: kindpkgsOld || item.KINDPKGS,
kgs: item.KGS,
cbm: item.CBM,
tareweight: item.TAREWEIGHT,
weightype: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weightype,
weighkgs: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weighkgs,
weighdate: item.WEIGHDATE
}
} else {
const _data = {
rowKey: lastNum + index,
ctnall: item.CTNALL,
@ -1720,7 +1705,6 @@ export default {
weighdate: item.WEIGHDATE
}
addTable.push(_data)
}
})
this.tableData = [...this.tableData, ...addTable]

@ -169,6 +169,9 @@
<a-button class="btn" type="primary" v-if="modelType == 'initCabin'" @click="handleOpenHis">
引入
</a-button>
<a-button class="btn" type="primary" v-if="modelType == 'initCabin'" @click="handleOpenHisData">
历史
</a-button>
</div>
<a-form>
<a-row :gutter="16">
@ -759,6 +762,19 @@
</a-table>
</a-spin>
</a-modal>
<a-modal width="1100px" ref="form" :maskClosable="false" v-model="historyDataFlag" title="历史信息">
<a-spin :spinning="hisLoading">
<div class="hisBox">
</div>
<a-table
:scroll="{ x: '900' }"
@change="tablePaginationChange"
:pagination="pagination"
:columns="hisColums"
:data-source="hisData">
</a-table>
</a-spin>
</a-modal>
<pre-order ref="preOrder" :details="details" @frompre="frompre" />
</div>
</template>
@ -766,6 +782,7 @@
import {
SendBookingOrClosingEDI,
SendXHZ,
yardLetterYardHis,
VgmSend,
LetterYard,
SampleBill,
@ -820,6 +837,7 @@ export default {
id: this.$route.query.id,
labelCol: { span: 6 },
wrapperCol: { span: 18 },
historyDataFlag: false,
hisLoading: false,
modelType: '',
pagination: {
@ -829,6 +847,92 @@ export default {
pageSizeOptions: ['1', '10', '20', '40', '80', '100'],
pageSize: 10
},
hisColums: [
{
title: '创建人',
key: 'createdUserName',
dataIndex: 'createdUserName',
width: 120
},
{
title: '创建时间',
key: 'createdTime',
dataIndex: 'createdTime',
width: 200
},
{
title: 'ATTN',
key: 'attn',
dataIndex: 'attn',
width: 120
},
{
title: 'ATTN电话',
key: 'attnTel',
dataIndex: 'attnTel',
width: 180
},
{
title: 'ATTN邮箱',
key: 'attnMail',
dataIndex: 'attnMail',
width: 180
},
{
title: 'ATTN手机',
key: 'attnPhone',
dataIndex: 'attnPhone',
width: 120
},
{
title: 'FROM电话',
key: 'fromTel',
dataIndex: 'fromTel',
width: 180
},
{
title: 'FROM',
key: 'fromName',
dataIndex: 'fromName',
width: 120
},
{
title: 'FROM邮箱',
key: 'fromMail',
dataIndex: 'fromMail',
width: 180
},
{
title: 'FROM手机',
key: 'fromPhone',
dataIndex: 'fromPhone',
width: 120
},
{
title: '截单时间',
key: 'closeDocTime',
dataIndex: 'closeDocTime',
width: 120
},
{
title: '截港时间',
key: 'closingTime',
dataIndex: 'closingTime',
width: 120
},
{
title: '截VGM时间',
key: 'vgmTime',
dataIndex: 'vgmTime',
width: 120
},
{
title: '场站',
key: 'yard',
dataIndex: 'yard',
width: 120
}
],
changeFlag: true,
columns: [
{
@ -995,6 +1099,7 @@ export default {
PrintModalVisible: false,
OcrVisible: false,
fileList: [],
hisData: [],
fileName: '',
flag: false,
x: 0,
@ -1098,6 +1203,10 @@ export default {
this.historyFlag = true
this.getList()
},
handleOpenHisData() {
this.historyDataFlag = true
this.getHisList()
},
getList() {
const data = {
pageNo: this.pagination.current,
@ -1120,6 +1229,21 @@ export default {
}
})
},
getHisList() {
const data = {
bookingId: this.details.id
}
this.hisLoading = true
yardLetterYardHis(data).then(res => {
if (res.success) {
this.hisData = res.data
this.hisLoading = false
} else {
this.$message.error(res.message)
this.hisLoading = false
}
})
},
getSelectViewRes({ type, res }) {
if (type === 'customername') {
this.hisSearch.customername = res.shortName || ''

@ -380,6 +380,21 @@
</div>
</template>
<template #custno="{ row }">
<a-spin :spinning="row.custnoLoading">
<a-popover placement="topLeft">
<template slot="content">
{{ 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>
<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>
</a-popover>
</a-spin>
</template>
<template #empty>
<span class="no-data">
<i class="iconfont icon-queshengye_zanwushuju"></i>
@ -815,7 +830,7 @@ import {
singleBCFileRead,
refreshSailingDate,
RefreshBillTrace,
SaveInList
SaveDataInList
} from '@/api/modular/main/BookingLedger'
import initData from './modules/initData'
@ -1035,7 +1050,9 @@ export default {
item.refshYzitemLoad = false
item.dzmarkLoading = false
item.czmarkLoading = false
item.custnoLoading = false
item.rowCzMark = false
item.rowCustno = false
item.rowDzMark = false
item.atdLoading = false
let hasGoods = 0
@ -1581,6 +1598,9 @@ export default {
if (item.field === 'zhanCangFlag') {
item.minWidth = 60
}
if (item.field === 'custno') {
item.slots = { 'default': 'custno' }
}
if (item.label === 'LINENAME') {
item.field = 'lineName'
}
@ -2014,7 +2034,9 @@ export default {
item.atdLoading = false
item.rowDzMark = false
item.rowCzMark = false
item.rowCustno = false
item.czmarkLoading = false
item.custnoLoading = false
item.dzmarkLoading = false
let hasGoods = 0
item.goodsStatusList.map((gitem, gindex) => {
@ -2108,26 +2130,33 @@ export default {
addCancel() {
this.addVisible = false
},
handleSaveMark(row, type) {
handleSaveMark(row, type, file) {
const data = {
id: row.id,
czRemark: row.czRemark,
dzRemark: row.dzRemark
Id: row.id
}
if (type === 1) {
row.dzmarkLoading = true
} else {
data.dzRemark = row.dzRemark
}
if (type === 2) {
row.czmarkLoading = true
data.czRemark = row.czRemark
}
SaveInList(data).then(res => {
if (type === 3) {
row.custnoLoading = true
data.custno = row.custno
}
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
}
})
},
@ -2210,16 +2239,24 @@ export default {
getFocusMark(row, type) {
if (type === 1) {
row.rowDzMark = true
} else {
}
if (type === 2) {
row.rowCzMark = true
}
if (type === 3) {
row.rowCustno = true
}
},
getBlurMark(row, type) {
if (type === 1) {
row.rowDzMark = false
} else {
}
if (type === 2) {
row.rowCzMark = false
}
if (type === 3) {
row.rowCustno = false
}
},
remarkhover(e, data) {
if (data.bookremark.length > 0) {

@ -264,7 +264,7 @@ export default {
{ field: 'tempset', label: 'TEMPSET', width: 160, title: '设置温度', showHeaderOverflow: true, sortable: true },
{ field: 'reeferf', label: 'REEFERF', width: 160, title: '通风度', showHeaderOverflow: true, sortable: true },
{ field: 'shipagency', label: 'SHIPAGENCY', width: 160, title: '船代', showHeaderOverflow: true, sortable: true },
{ field: 'custno', label: 'CUSTNO', width: 160, title: '订舱编号', showHeaderOverflow: true, sortable: true },
{ field: 'custno', label: 'CUSTNO', width: 160, title: '订舱编号', showHeaderOverflow: true, sortable: true, slots: { default: 'custno' } },
// { field: 'vgm', label: 'VGM', width: 120, title: 'VGM', showHeaderOverflow: true },
{ field: 'forwarder', label: 'FORWARDER', width: 120, title: '订舱代理', showHeaderOverflow: true, sortable: true },
// { field: 'bookingStatus', label: 'BOOKINGSTATUS', width: 120, title: '订舱状态', showHeaderOverflow: true },

@ -820,32 +820,9 @@ export default {
const data = JSON.parse(res.data)
const addTable = []
const cntrnoArr = []
this.tableData.map((item, index) => {
if (!item.cntrno) {
// delete this.tableData[index]
this.tableData.splice(index, 1)
} else {
cntrnoArr.push(item.cntrno)
}
})
this.tableData = []
const lastNum = this.tableData.length > 0 ? Number(this.tableData[this.tableData.length - 1].rowKey) + 1 : 0
data.map((item, index) => {
if (cntrnoArr.includes(item.CNTRNO)) {
this.tableData[cntrnoArr.indexOf(item.CNTRNO)] = {
rowKey: lastNum + index,
ctnall: item.CTNALL,
ctnnum: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].ctnnum,
cntrno: item.CNTRNO,
sealno: item.SEALNO,
pkgs: item.PKGS,
kindpkgs: item.KINDPKGS,
kgs: item.KGS,
cbm: item.CBM,
tareweight: item.TAREWEIGHT,
weightype: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weightype,
weighkgs: this.tableData[cntrnoArr.indexOf(item.CNTRNO)].weighkgs
}
} else {
const _data = {
rowKey: lastNum + index,
ctnall: item.CTNALL,
@ -861,7 +838,6 @@ export default {
weighkgs: ''
}
addTable.push(_data)
}
})
this.tableData = [...this.tableData, ...addTable]

@ -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>

Loading…
Cancel
Save