|
|
@@ -119,6 +119,7 @@
|
|
|
v-model="shipOwnerRuleForm.shipOwnerName"
|
|
|
placeholder="请选择"
|
|
|
@selectItem="selectShipOwner($event)"
|
|
|
+ @clear="clearShipOwner()"
|
|
|
></RemoteSelect>
|
|
|
<el-button type="primary" size="small">添加新船东</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -146,9 +147,15 @@
|
|
|
>
|
|
|
<div class="df aic pointer">
|
|
|
<el-card
|
|
|
- class="w260 mr10"
|
|
|
+ :class="[
|
|
|
+ 'w260',
|
|
|
+ 'mr10',
|
|
|
+ currentBankCardIndex == index ? 'current-card' : '',
|
|
|
+ ]"
|
|
|
shadow="never"
|
|
|
v-for="(item, index) in bankCardInfo"
|
|
|
+ @click="currentBankCardIndex = index"
|
|
|
+ :key="index"
|
|
|
>
|
|
|
<div class="df aic">
|
|
|
<div class="card-title">持卡人姓名</div>
|
|
|
@@ -181,7 +188,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<div class="df aic mt30 jcfe">
|
|
|
- <el-button @click="onShipOwnerSubmit" type="primary">
|
|
|
+ <el-button @click="editOrderShipOwner()" type="primary">
|
|
|
保存船东资料
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -447,8 +454,31 @@ function addShipOwnerBankCard() {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+const currentBankCardIndex = ref(0);
|
|
|
+async function editOrderShipOwner() {
|
|
|
+ if (bankCardInfo.value.length === 0) {
|
|
|
+ ElNotification({
|
|
|
+ title: "提示",
|
|
|
+ message: "请添加银行卡",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let postData = {
|
|
|
+ orderId: route.query.id,
|
|
|
+ shipOwnerId: shipOwnerRuleForm.value.shipOwnerId,
|
|
|
+ shipId: shipInfo.value.id,
|
|
|
+ shipOwnerBankCardId: bankCardInfo.value[currentBankCardIndex.value].id,
|
|
|
+ };
|
|
|
|
|
|
-function onShipOwnerSubmit() {}
|
|
|
+ let { data } = await api.editOrderShipOwner(postData);
|
|
|
+}
|
|
|
+function clearShipOwner() {
|
|
|
+ shipOwnerRuleForm.value = {};
|
|
|
+ bankCardInfo.value = [];
|
|
|
+ currentBankCardIndex.value = 0;
|
|
|
+ shipInfo.value = {};
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
getOrderDetail();
|
|
|
});
|
|
|
@@ -467,4 +497,8 @@ onMounted(() => {
|
|
|
.w260 {
|
|
|
width: 260px;
|
|
|
}
|
|
|
+
|
|
|
+.current-card {
|
|
|
+ border: 1px solid #409eff;
|
|
|
+}
|
|
|
</style>
|