|
@@ -51,7 +51,7 @@
|
|
|
clearable
|
|
clearable
|
|
|
style="width: 330px"
|
|
style="width: 330px"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
- <div class="seach-btn" @click="getVoyageList()">查询</div>
|
|
|
|
|
|
|
+ <div class="search-btn" @click="getVoyageList()">查询</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="cargo-owner-add" @click="voyageAddDialogVisible = true">
|
|
<div class="cargo-owner-add" @click="voyageAddDialogVisible = true">
|
|
|
添加航次
|
|
添加航次
|
|
@@ -83,7 +83,7 @@
|
|
|
<el-form-item prop="cargoOwnerId" label="货主">
|
|
<el-form-item prop="cargoOwnerId" label="货主">
|
|
|
<el-autocomplete
|
|
<el-autocomplete
|
|
|
v-model="voyageForm.cargoOwnerName"
|
|
v-model="voyageForm.cargoOwnerName"
|
|
|
- :fetch-suggestions="seachCargoOwner"
|
|
|
|
|
|
|
+ :fetch-suggestions="searchCargoOwner"
|
|
|
placeholder="选择货主"
|
|
placeholder="选择货主"
|
|
|
@select="selectCargoOwner"
|
|
@select="selectCargoOwner"
|
|
|
/>
|
|
/>
|
|
@@ -106,10 +106,22 @@
|
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="loadPort" label="装货港">
|
|
<el-form-item prop="loadPort" label="装货港">
|
|
|
- <el-input v-model="voyageForm.loadPort"></el-input>
|
|
|
|
|
|
|
+ <!-- <el-input v-model="voyageForm.loadPort"></el-input> -->
|
|
|
|
|
+ <el-autocomplete
|
|
|
|
|
+ v-model="voyageForm.loadPort"
|
|
|
|
|
+ :fetch-suggestions="searchLoadPort"
|
|
|
|
|
+ placeholder="选择装货港"
|
|
|
|
|
+ @select="selectLoadPort"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="dischargeProt" label="卸货港">
|
|
<el-form-item prop="dischargeProt" label="卸货港">
|
|
|
- <el-input v-model="voyageForm.dischargeProt"></el-input>
|
|
|
|
|
|
|
+ <!-- <el-input v-model="voyageForm.dischargeProt"></el-input> -->
|
|
|
|
|
+ <el-autocomplete
|
|
|
|
|
+ v-model="voyageForm.dischargeProt"
|
|
|
|
|
+ :fetch-suggestions="searchDischargeProt"
|
|
|
|
|
+ placeholder="选择卸货港"
|
|
|
|
|
+ @select="selectDischargeProt"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="cargo" label="货种">
|
|
<el-form-item prop="cargo" label="货种">
|
|
|
<el-input v-model="voyageForm.cargo"></el-input>
|
|
<el-input v-model="voyageForm.cargo"></el-input>
|
|
@@ -316,6 +328,8 @@ export default {
|
|
|
let addVoyageForm = ref(null);
|
|
let addVoyageForm = ref(null);
|
|
|
|
|
|
|
|
async function addVoyage() {
|
|
async function addVoyage() {
|
|
|
|
|
+ console.log("提交", voyageForm.voyageForm);
|
|
|
|
|
+ return;
|
|
|
addVoyageForm.value.validate(async (valid) => {
|
|
addVoyageForm.value.validate(async (valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
// console.log("提交", voyageForm.voyageForm);
|
|
// console.log("提交", voyageForm.voyageForm);
|
|
@@ -359,9 +373,9 @@ export default {
|
|
|
voyageForm.voyageForm.shipId = item.shipId;
|
|
voyageForm.voyageForm.shipId = item.shipId;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- async function seachCargoOwner(queryString, cb) {
|
|
|
|
|
|
|
+ async function searchCargoOwner(queryString, cb) {
|
|
|
if (!queryString) return;
|
|
if (!queryString) return;
|
|
|
- let res = await api.seachUser({
|
|
|
|
|
|
|
+ let res = await api.searchUser({
|
|
|
term: queryString,
|
|
term: queryString,
|
|
|
identity: 2,
|
|
identity: 2,
|
|
|
});
|
|
});
|
|
@@ -379,6 +393,34 @@ export default {
|
|
|
voyageForm.voyageForm.cargoOwnerId = item.userId;
|
|
voyageForm.voyageForm.cargoOwnerId = item.userId;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ async function searchLoadPort(queryString, cb) {
|
|
|
|
|
+ if (!queryString) return;
|
|
|
|
|
+ let res = await api.getCol({
|
|
|
|
|
+ term: queryString,
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.data.status == 0) {
|
|
|
|
|
+ cb(res.data.result);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const selectLoadPort = (item) => {
|
|
|
|
|
+ voyageForm.voyageForm.loadPort = item.value;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ async function searchDischargeProt(queryString, cb) {
|
|
|
|
|
+ if (!queryString) return;
|
|
|
|
|
+ let res = await api.getCol({
|
|
|
|
|
+ term: queryString,
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.data.status == 0) {
|
|
|
|
|
+ cb(res.data.result);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const selectDischargeProt = (item) => {
|
|
|
|
|
+ voyageForm.voyageForm.dischargeProt = item.value;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
function resetAddVoyageForm() {
|
|
function resetAddVoyageForm() {
|
|
|
voyageAddDialogVisible.value = false;
|
|
voyageAddDialogVisible.value = false;
|
|
|
voyageForm.voyageForm.shipOwnerName = "";
|
|
voyageForm.voyageForm.shipOwnerName = "";
|
|
@@ -407,15 +449,19 @@ export default {
|
|
|
...toRefs(voyageForm),
|
|
...toRefs(voyageForm),
|
|
|
searchShip,
|
|
searchShip,
|
|
|
selectShip,
|
|
selectShip,
|
|
|
- seachCargoOwner,
|
|
|
|
|
|
|
+ searchCargoOwner,
|
|
|
selectCargoOwner,
|
|
selectCargoOwner,
|
|
|
resetAddVoyageForm,
|
|
resetAddVoyageForm,
|
|
|
|
|
+ searchLoadPort,
|
|
|
|
|
+ selectLoadPort,
|
|
|
|
|
+ searchDischargeProt,
|
|
|
|
|
+ selectDischargeProt,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
-.seach-btn {
|
|
|
|
|
|
|
+.search-btn {
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
width: 60px;
|
|
width: 60px;
|
|
|
height: 32px;
|
|
height: 32px;
|
|
@@ -507,7 +553,7 @@ export default {
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.seach-btn {
|
|
|
|
|
|
|
+.search-btn {
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
width: 60px;
|
|
width: 60px;
|
|
|
height: 38px;
|
|
height: 38px;
|