修改问题

master
sunzehua 1 year ago
parent 3e39e3f6fd
commit cf2f12ffcb

@ -1025,7 +1025,7 @@ export function BookingCustomerOrderDelete (parameter) {
return axios({
url: 'BookingCustomerOrder/Delete',
method: 'post',
params: parameter
data: parameter
})
}

@ -100,6 +100,7 @@ const user = {
}
const result = response.data
Vue.ls.set(ACCESS_TOKEN, result, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set('FIRSTFLAG', true, 7 * 24 * 60 * 60 * 1000)
commit('SET_TOKEN', result)
resolve()
// eslint-disable-next-line handle-callback-err
@ -122,6 +123,7 @@ const user = {
const result = response.data
console.log(response, 1111)
Vue.ls.set(ACCESS_TOKEN, result, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set('FIRSTFLAG', true, 7 * 24 * 60 * 60 * 1000)
commit('SET_TOKEN', result)
resolve()
})

@ -1,8 +1,7 @@
<template>
<div class="main">
<div class="btn-list">
<span v-if="details.bookingno">{{ details.bookingno }}</span>
<a-button type="primary" @click="handleSave"></a-button>
<a-button type="primary" v-if="details.bsstatus=='' || !details.bsstatus || details.bsstatus == '已录入' || details.bsstatus == '已驳回'" @click="handleSave"></a-button>
<a-button type="primary" @click="handleCopy"></a-button>
<a-button type="primary">存为模板</a-button>
<a-button type="danger" v-if="details.bsstatus == '已录入'" @click="handleDelete"></a-button>
@ -11,6 +10,8 @@
@click="handleSubimt"
v-if="details.bsstatus == '已录入' || details.bsstatus == '已驳回'">发送订舱</a-button>
<a-button type="danger" @click="handleCancle" v-if="details.bsstatus == '已提交'"></a-button>
<span v-if="details.bookingno" style="margin: 0 10px;">:</span>
<span v-if="details.bookingno">{{ details.bookingno }}</span>
</div>
<a-spin :spinning="loading">
<div class="box">
@ -147,8 +148,8 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="voyno">
<inputView type="voyno" :parentVal="details.voyno" @getInputChange="inputChange" />
prop="contractno">
<inputView type="contractno" :parentVal="details.contractno" @getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<a-col :span="'4-8'">
@ -320,6 +321,7 @@
class="save-btn"
type="link"
size="small"
style="color:black"
icon="save"
@click="saveModel('notifyparty')">保存</a-button>
</div>
@ -365,6 +367,7 @@
<a-button
class="save-btn"
type="link"
style="color: black;"
size="small"
icon="save"
@click="saveModel('description')">保存</a-button>
@ -551,7 +554,7 @@
:wrapperCol="wrapperCol"
has-feedback
prop="dunno">
<inputView type="dunno" size="small" :parentVal="details.dunno" @getInputChange="inputChange" />
<a-input size="small" v-model="details.dunno" />
</a-form-model-item>
</a-col>
<a-col :span="6">
@ -562,7 +565,7 @@
:wrapperCol="wrapperCol"
has-feedback
prop="dclass">
<inputView type="dclass" size="small" :parentVal="details.dclass" @getInputChange="inputChange" />
<a-input size="small" v-model="details.dclass" />
</a-form-model-item>
</a-col>
<a-col :span="6">
@ -573,7 +576,7 @@
:wrapperCol="wrapperCol"
has-feedback
prop="linkman">
<inputView type="linkman" size="small" :parentVal="details.linkman" @getInputChange="inputChange" />
<a-input size="small" v-model="details.linkman" />
</a-form-model-item>
</a-col>
<a-col :span="6">
@ -584,11 +587,11 @@
:wrapperCol="wrapperCol"
has-feedback
prop="linkman">
<inputView type="linkman" size="small" :parentVal="details.linkman" @getInputChange="inputChange" />
<a-input size="small" v-model="details.linkman" />
</a-form-model-item>
</a-col>
</a-row>
<a-row style="display: flex;" v-if="details.cargoid == 'D'">
<a-row style="display: flex;" >
<a-upload
:customRequest="customRequest"
:showUploadList="false"
@ -850,24 +853,25 @@ export default {
ctnList: []
},
rules: {
tempset: [
linkman: [
{ required: true, message: '请输入', trigger: 'blur' }
],
tempid: [
{ required: true, message: '请选择', trigger: 'blur' }
dclass: [
{ required: true, message: '请输入', trigger: 'blur' }
],
reeferf: [
dunno: [
{ required: true, message: '请输入', trigger: 'blur' }
],
linkman: [
tempset: [
{ required: true, message: '请输入', trigger: 'blur' }
],
dclass: [
tempid: [
{ required: true, message: '请选择', trigger: 'blur' }
],
dunno: [
reeferf: [
{ required: true, message: '请输入', trigger: 'blur' }
]
},
loading: false
}
@ -998,7 +1002,6 @@ export default {
})
},
handleSave() {
console.log(this.details)
this.$refs.basicFrom.validate(valid => {
if (valid) {
const data = {
@ -1023,7 +1026,7 @@ export default {
} else {
data.serviceItemList = []
}
if (data.cargoid === 'D' && !this.isCopy) {
if (!this.isCopy) {
const filesArr = []
const tempFileNamesArr = []
if (this.fileList.length > 0) {
@ -1065,6 +1068,8 @@ export default {
this.$message.success('保存成功')
this.loading = false
this.id = res.data.id
this.getDetail()
setTimeout(() => {
if (this.isCopy || this.isAdd) {
this.$router.replace({
name: 'BookingCustomerDetail',
@ -1077,19 +1082,20 @@ export default {
this.isCopy = false
}
}
}, 500);
} else {
this.loading = false
this.$message.error(res.message)
}
})
} else {
this.$message.warning('请检查必填项')
}
console.log(valid)
})
},
handleDelete() {
const data = {
id: this.id
}
BookingCustomerOrderDelete(data).then(res => {
BookingCustomerOrderDelete([this.id]).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.$router.push({ path: 'BookingCustomerLedger' })

@ -69,8 +69,8 @@
<div class="nav-box">
<div class="nav" @click="addBooking"><i class="iconfont icon-jiahao2fill"></i>新建</div>
<div class="nav" @click="copyBooking"><i class="iconfont icon-fuzhi"></i>复制</div>
<div class="nav" @click="copyBooking"><i class="iconfont icon-fuzhi"></i>导入</div>
<div class="nav" @click="copyBooking"><i class="iconfont icon-fuzhi"></i>模板</div>
<div class="nav" ><i class="iconfont icon-fuzhi"></i>导入</div>
<div class="nav" ><i class="iconfont icon-fuzhi"></i>模板</div>
<a-popconfirm
title="确定删除当前选中订舱?"
ok-text="是"
@ -1845,10 +1845,7 @@ export default {
this.deleteBookingOrder(removeArr)
},
removeFun(row) {
const data = {
id: row.id
}
BookingCustomerOrderDelete(data).then(res => {
BookingCustomerOrderDelete([row.id]).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.init(this.searchData)
@ -1858,15 +1855,11 @@ export default {
})
},
deleteBookingOrder(arr) {
DeleteBookingOrder(arr.toString())
BookingCustomerOrderDelete(arr)
.then((res) => {
if (res.success) {
this.$message.success('删除成功')
const _data = this.gridOptions.data.filter((item) => !arr.includes(item.id))
this.$refs.xGrid.reloadData(_data).then(() => {
this.gridOptions.pagerConfig.total = this.gridOptions.pagerConfig.total - arr.length
})
this.$forceUpdate()
this.init(this.searchData)
} else {
this.$message.error(res.message)
}

Loading…
Cancel
Save