|
|
|
@ -7,34 +7,34 @@
|
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
|
保存
|
|
|
|
|
</a-button>
|
|
|
|
|
<!-- <a-button v-if="type === 'Edit'" style="margin: 0 10px;" type="link" size="mini">
|
|
|
|
|
<!-- <a-button v-if="type === 'edit'" style="margin: 0 10px;" type="link" size="mini">
|
|
|
|
|
<span class="iconfont icon-tijiao1"></span>
|
|
|
|
|
提交
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="type === 'Edit'" type="link" size="mini">
|
|
|
|
|
<a-button v-if="type === 'edit'" type="link" size="mini">
|
|
|
|
|
<span class="iconfont icon-fuzhi3"></span>
|
|
|
|
|
审核
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="type === 'Edit'" style="margin: 0 10px;" type="link" size="mini">
|
|
|
|
|
<a-button v-if="type === 'edit'" style="margin: 0 10px;" type="link" size="mini">
|
|
|
|
|
<span class="iconfont icon-guanli"></span>提交审核</a-button> -->
|
|
|
|
|
</div>
|
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
|
<a-form :model="form" :wrapper-col="{ span: 21 }">
|
|
|
|
|
<div v-if="type === 'Edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0"
|
|
|
|
|
<div v-if="type === 'edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0"
|
|
|
|
|
class="bookslot">
|
|
|
|
|
<div class="box-item">
|
|
|
|
|
<div class="title"
|
|
|
|
|
v-if="type === 'Edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0">
|
|
|
|
|
v-if="type === 'edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0">
|
|
|
|
|
关联订舱
|
|
|
|
|
</div>
|
|
|
|
|
<div :class="{ 'line-bootm': index != form.bookingSlotSaleInfoList.length - 1 }"
|
|
|
|
|
v-for="(item, index) in form.bookingSlotSaleInfoList" v-show="item.customerid != 0"
|
|
|
|
|
v-for="(item, index) in form.bookingSlotSaleInfoList" v-show="item.customerId != 0"
|
|
|
|
|
:key="index">
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>委托单位</div>
|
|
|
|
|
<a-select show-search v-model:value="item.customerid"
|
|
|
|
|
<a-select show-search v-model:value="item.customerId"
|
|
|
|
|
:default-active-first-option="false" :show-arrow="false"
|
|
|
|
|
:filter-option="false" :not-found-content="null"
|
|
|
|
|
@search="SearchCustomer">
|
|
|
|
@ -48,7 +48,7 @@
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>客服</div>
|
|
|
|
|
<a-select show-search v-model:value="item.custserviceid"
|
|
|
|
|
<a-select show-search v-model:value="item.custServiceId"
|
|
|
|
|
:default-active-first-option="false" :show-arrow="false"
|
|
|
|
|
:filter-option="false" :not-found-content="null" allowClear
|
|
|
|
|
@search="SearchUser($event, 0)" @change="e => {
|
|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item1 in UserListCus" :key="item1.id"
|
|
|
|
|
:value="item1.id">
|
|
|
|
|
{{ item1.userName }}
|
|
|
|
|
{{ item1.pinYinCode }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
@ -65,7 +65,7 @@
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>销售</div>
|
|
|
|
|
<a-select show-search v-model:value="item.saleid"
|
|
|
|
|
<a-select show-search v-model:value="item.saleId"
|
|
|
|
|
:default-active-first-option="false" :show-arrow="false"
|
|
|
|
|
:filter-option="false" :not-found-content="null" allowClear
|
|
|
|
|
@search="SearchUser($event, 1)" @change="e => {
|
|
|
|
@ -74,7 +74,7 @@
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item1 in UserListSale" :key="item1.id"
|
|
|
|
|
:value="item1.id">
|
|
|
|
|
{{ item1.userName }}
|
|
|
|
|
{{ item1.pinYinCode }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
@ -82,7 +82,7 @@
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>操作</div>
|
|
|
|
|
<a-select show-search v-model:value="item.opid"
|
|
|
|
|
<a-select show-search v-model:value="item.opId"
|
|
|
|
|
:default-active-first-option="false" :show-arrow="false" allowClear
|
|
|
|
|
:filter-option="false" :not-found-content="null"
|
|
|
|
|
@search="SearchUser($event, 2)" @change="e => {
|
|
|
|
@ -91,7 +91,7 @@
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserListOp" :key="item.id"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
{{ item.userName }}
|
|
|
|
|
{{ item.pinYinCode }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
@ -99,7 +99,7 @@
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>单证</div>
|
|
|
|
|
<a-select show-search v-model:value="item.docid" allowClear
|
|
|
|
|
<a-select show-search v-model:value="item.docId" allowClear
|
|
|
|
|
:default-active-first-option="false" :show-arrow="false"
|
|
|
|
|
:filter-option="false" :not-found-content="null"
|
|
|
|
|
@search="SearchUser($event, 3)" @change="e => {
|
|
|
|
@ -108,7 +108,7 @@
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserListDoc" :key="item.id"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
{{ item.userName }}
|
|
|
|
|
{{ item.pinYinCode }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
@ -116,7 +116,7 @@
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>商务</div>
|
|
|
|
|
<a-select show-search v-model:value="item.businessid" allowClear
|
|
|
|
|
<a-select show-search v-model:value="item.businessId" allowClear
|
|
|
|
|
:default-active-first-option="false" :show-arrow="false"
|
|
|
|
|
:filter-option="false" :not-found-content="null"
|
|
|
|
|
@search="SearchUser($event, 4)" @change="e => {
|
|
|
|
@ -125,7 +125,7 @@
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserListBus" :key="item.id"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
{{ item.userName }}
|
|
|
|
|
{{ item.pinYinCode }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
@ -135,20 +135,20 @@
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>品名</div>
|
|
|
|
|
<a-input v-model:value="item.goodsname" />
|
|
|
|
|
<a-input v-model:value="item.goodsName" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>卖价</div>
|
|
|
|
|
<a-input-number style="width: 100%" :precision="2"
|
|
|
|
|
v-model:value="item.sellinG_PRICE" />
|
|
|
|
|
v-model:value="item.sellingPrice" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="4">
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<div>销售日期</div>
|
|
|
|
|
<a-date-picker style="width: 100%" v-model:value="item.salE_TIME" />
|
|
|
|
|
<a-date-picker valueFormat="YYYY-MM-DD" style="width: 100%" v-model:value="item.saleTime" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="4">
|
|
|
|
@ -165,7 +165,7 @@
|
|
|
|
|
|
|
|
|
|
<div class="box-item">
|
|
|
|
|
<div class="title">
|
|
|
|
|
<span style="margin-right: 20px;">{{ type === 'Edit' ? '舱位修改' : '舱位新增' }}</span>
|
|
|
|
|
<span style="margin-right: 20px;">{{ type === 'edit' ? '舱位修改' : '舱位新增' }}</span>
|
|
|
|
|
<span style="background: #d78a6d;color: white;padding: 0 8px;font-size: 13px;font-weight: 400;"
|
|
|
|
|
v-if="form.spliT_OR_MERGE_FLAG == 1">已拆票</span>
|
|
|
|
|
<span style="background: #d78a6d;color: white;padding: 0 8px;font-size: 13px;font-weight: 400;"
|
|
|
|
@ -247,10 +247,8 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { AutoComplete } from 'ant-design-vue'
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
import 'dayjs/locale/zh-cn';
|
|
|
|
|
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
|
|
|
|
|
import { GetCtnSelectList } from '/@/api/common'
|
|
|
|
|
|
|
|
|
|
import { GetCtnSelectList, GetClientListByCode } from '/@/api/common'
|
|
|
|
|
import DsFile from '/@/components/File/index.vue'
|
|
|
|
|
import { ref, reactive, onMounted, watch } from 'vue'
|
|
|
|
|
import {
|
|
|
|
@ -258,7 +256,7 @@ import {
|
|
|
|
|
BookingSlotSave, BookingSlotDetail, BookingSlotDelete, BookingSlotGetFile
|
|
|
|
|
} from '../api'
|
|
|
|
|
import {
|
|
|
|
|
GetControllerClientList,
|
|
|
|
|
GetControllerClientList,GetCustomerServiceList,GetSaleList,GetVouchingClerkList
|
|
|
|
|
} from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
import { useOptionsStore } from '/@/store/modules/options'
|
|
|
|
|
import { SlotFlags } from '@vue/shared'
|
|
|
|
@ -439,7 +437,7 @@ const { createMessage } = useMessage()
|
|
|
|
|
const type = ref('')
|
|
|
|
|
const form = ref({
|
|
|
|
|
logList: [],
|
|
|
|
|
bookingSlotSaleInfoList:[]
|
|
|
|
|
bookingSlotSaleInfoList: []
|
|
|
|
|
}) as any
|
|
|
|
|
const boxList = ref([]) as any
|
|
|
|
|
const CustomerList = ref([]) as any
|
|
|
|
@ -511,24 +509,7 @@ function init() {
|
|
|
|
|
boxList.value = res.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// optionsStore.getOptionsByCodeAsync('GetSaleUserList').then(res => {
|
|
|
|
|
// UserListBus.value = res
|
|
|
|
|
// })
|
|
|
|
|
// optionsStore.getOptionsByCodeAsync('GetSaleUserList').then(res => {
|
|
|
|
|
// UserListSale.value = res
|
|
|
|
|
// })
|
|
|
|
|
// optionsStore.getOptionsByCodeAsync('GetCustomerServiceList').then(res => {
|
|
|
|
|
// UserListOp.value = res
|
|
|
|
|
// })
|
|
|
|
|
// optionsStore.getOptionsByCodeAsync('GetVouchingClerkList').then(res => {
|
|
|
|
|
// UserListDoc.value = res
|
|
|
|
|
// })
|
|
|
|
|
// optionsStore.getOptionsByCodeAsync('GetCustomerServiceList').then(res => {
|
|
|
|
|
// UserListCus.value = res
|
|
|
|
|
// })
|
|
|
|
|
// GetControllerClientList().then(res => {
|
|
|
|
|
// CustomerList.value = res.data
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function handleSearch(e) {
|
|
|
|
|
fetching.value = true
|
|
|
|
@ -538,8 +519,8 @@ function handleSearch(e) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function SearchCustomer(e) {
|
|
|
|
|
DjyCustomerSuggest({ keyword: e }).then(res => {
|
|
|
|
|
CustomerList.value = res.data.rows
|
|
|
|
|
GetClientListByCode({ queryKey: e, code: 'controller' }).then(res => {
|
|
|
|
|
CustomerList.value = res.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const dsFile = ref(null) as any
|
|
|
|
@ -563,23 +544,31 @@ function handlePageChange() {
|
|
|
|
|
}
|
|
|
|
|
function SearchUser(e, type) {
|
|
|
|
|
if (e) {
|
|
|
|
|
GetSysUserPage({ name: e }).then(res => {
|
|
|
|
|
if (type === 0) {
|
|
|
|
|
if (type === 0) {
|
|
|
|
|
GetCustomerServiceList({queryKey:e}).then(res=>{
|
|
|
|
|
UserListCus.value = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
GetSaleList({queryKey:e}).then(res=>{
|
|
|
|
|
UserListSale.value = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 2) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type === 2) {
|
|
|
|
|
GetCustomerServiceList({queryKey:e}).then(res=>{
|
|
|
|
|
UserListOp.value = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 3) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type === 3) {
|
|
|
|
|
GetVouchingClerkList({queryKey:e}).then(res=>{
|
|
|
|
|
UserListDoc.value = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 4) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type === 4) {
|
|
|
|
|
GetSaleList({queryKey:e}).then(res=>{
|
|
|
|
|
UserListBus.value = res.data
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function getDetail() {
|
|
|
|
@ -595,36 +584,39 @@ function getDetail() {
|
|
|
|
|
})
|
|
|
|
|
boxList.value = res.data
|
|
|
|
|
boxList.value.forEach(item => {
|
|
|
|
|
item.flag = false
|
|
|
|
|
form.value.ctnList.forEach(ite => {
|
|
|
|
|
if (ite.ctnCode === item.ediCode) {
|
|
|
|
|
item.flag = true
|
|
|
|
|
}
|
|
|
|
|
item.flag = false
|
|
|
|
|
form.value.ctnList.forEach(ite => {
|
|
|
|
|
if (ite.ctnCode === item.ediCode) {
|
|
|
|
|
item.flag = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
if (form.value.bookingSlotSaleInfoList) {
|
|
|
|
|
form.value.bookingSlotSaleInfoList.forEach(item => {
|
|
|
|
|
if (item.custserviceid) {
|
|
|
|
|
item.custserviceid = Number(item.custserviceid)
|
|
|
|
|
}
|
|
|
|
|
if (item.docid) {
|
|
|
|
|
item.docid = Number(item.docid)
|
|
|
|
|
}
|
|
|
|
|
if (item.opid) {
|
|
|
|
|
item.opid = Number(item.opid)
|
|
|
|
|
}
|
|
|
|
|
if (item.saleid) {
|
|
|
|
|
item.saleid = Number(item.saleid)
|
|
|
|
|
}
|
|
|
|
|
if (item.businessid) {
|
|
|
|
|
item.businessid = Number(item.businessid)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
oldBook.value = JSON.parse(JSON.stringify(form.value.bookingSlotSaleInfoList))
|
|
|
|
|
} else {
|
|
|
|
|
form.value.bookingSlotSaleInfoList = []
|
|
|
|
|
}
|
|
|
|
|
if (form.value.bookingSlotSaleInfoList.length > 0) {
|
|
|
|
|
optionsStore.getOptionsByCodeAsync('GetSaleList').then(res => {
|
|
|
|
|
UserListBus.value = res
|
|
|
|
|
})
|
|
|
|
|
optionsStore.getOptionsByCodeAsync('GetSaleList').then(res => {
|
|
|
|
|
UserListSale.value = res
|
|
|
|
|
})
|
|
|
|
|
optionsStore.getOptionsByCodeAsync('GetCustomerServiceList').then(res => {
|
|
|
|
|
UserListOp.value = res
|
|
|
|
|
})
|
|
|
|
|
optionsStore.getOptionsByCodeAsync('GetVouchingClerkList').then(res => {
|
|
|
|
|
UserListDoc.value = res
|
|
|
|
|
})
|
|
|
|
|
optionsStore.getOptionsByCodeAsync('GetCustomerServiceList').then(res => {
|
|
|
|
|
UserListCus.value = res
|
|
|
|
|
})
|
|
|
|
|
GetControllerClientList().then(res => {
|
|
|
|
|
CustomerList.value = res.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
createMessage.error(res.message)
|
|
|
|
|
}
|
|
|
|
@ -748,7 +740,7 @@ async function handleSave() {
|
|
|
|
|
const data = {
|
|
|
|
|
...values,
|
|
|
|
|
...valuesT,
|
|
|
|
|
ctnList:form.value.ctnList,
|
|
|
|
|
ctnList: form.value.ctnList,
|
|
|
|
|
bookingSlotSaleInfoList: form.value.bookingSlotSaleInfoList
|
|
|
|
|
}
|
|
|
|
|
data.ctnStat = boxTotal.value
|
|
|
|
@ -757,26 +749,9 @@ async function handleSave() {
|
|
|
|
|
BookingSlotSave(data).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
createMessage.success('保存成功')
|
|
|
|
|
type.value = 'Edit'
|
|
|
|
|
type.value = 'edit'
|
|
|
|
|
id.value = res.data.id
|
|
|
|
|
form.value = res.data
|
|
|
|
|
form.value.bookingSlotSaleInfoList.forEach(item => {
|
|
|
|
|
if (item.custserviceid) {
|
|
|
|
|
item.custserviceid = Number(item.custserviceid)
|
|
|
|
|
}
|
|
|
|
|
if (item.docid) {
|
|
|
|
|
item.docid = Number(item.docid)
|
|
|
|
|
}
|
|
|
|
|
if (item.opid) {
|
|
|
|
|
item.opid = Number(item.opid)
|
|
|
|
|
}
|
|
|
|
|
if (item.saleid) {
|
|
|
|
|
item.saleid = Number(item.saleid)
|
|
|
|
|
}
|
|
|
|
|
if (item.businessid) {
|
|
|
|
|
item.businessid = Number(item.businessid)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
loading.value = false
|
|
|
|
|
} else {
|
|
|
|
|
createMessage.error(res.message)
|
|
|
|
|