|
@@ -1188,6 +1188,16 @@
|
|
|
destroy-on-close
|
|
destroy-on-close
|
|
|
width="80%"
|
|
width="80%"
|
|
|
>
|
|
>
|
|
|
|
|
+ <div class="df aic distribute-group">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-for="(item, index) in voyage.voyageDetails"
|
|
|
|
|
+ class="mr20"
|
|
|
|
|
+ :type="distributePortId == item.portId ? 'primary' : ''"
|
|
|
|
|
+ @click="distributePortId = item.portId"
|
|
|
|
|
+ >{{ item.portName }}</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="hr m10-0"></div>
|
|
|
<div class="df aic distribute-group">
|
|
<div class="df aic distribute-group">
|
|
|
<el-button
|
|
<el-button
|
|
|
class="mr20"
|
|
class="mr20"
|
|
@@ -2254,6 +2264,7 @@ let isDistributeModalVisable = ref(false);
|
|
|
let previewList = ref([]);
|
|
let previewList = ref([]);
|
|
|
let checkedImages = ref([]);
|
|
let checkedImages = ref([]);
|
|
|
let distributeType = ref(-1);
|
|
let distributeType = ref(-1);
|
|
|
|
|
+let distributePortId = ref(-1);
|
|
|
let checkedPreviewList = ref([]);
|
|
let checkedPreviewList = ref([]);
|
|
|
let recordIds = ref("");
|
|
let recordIds = ref("");
|
|
|
let ocrTruckRecordTableData = ref([]);
|
|
let ocrTruckRecordTableData = ref([]);
|
|
@@ -2279,6 +2290,7 @@ function showDistributeModal() {
|
|
|
function distributeModalClose() {
|
|
function distributeModalClose() {
|
|
|
isDistributeModalVisable.value = false;
|
|
isDistributeModalVisable.value = false;
|
|
|
distributeType.value = -1;
|
|
distributeType.value = -1;
|
|
|
|
|
+ distributePortId.value = -1;
|
|
|
distributePoundForm.value = {
|
|
distributePoundForm.value = {
|
|
|
dischargeTime: "",
|
|
dischargeTime: "",
|
|
|
dischargeTons: "",
|
|
dischargeTons: "",
|
|
@@ -2288,6 +2300,13 @@ function distributeModalClose() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function submitDistribute() {
|
|
async function submitDistribute() {
|
|
|
|
|
+ if (distributePortId.value == -1) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ message: "请选择要分配的港口!",
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (distributeType.value == -1) {
|
|
if (distributeType.value == -1) {
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: "error",
|
|
type: "error",
|
|
@@ -2298,8 +2317,16 @@ async function submitDistribute() {
|
|
|
let postData = {};
|
|
let postData = {};
|
|
|
let type = distributeType.value;
|
|
let type = distributeType.value;
|
|
|
if (2 == type) {
|
|
if (2 == type) {
|
|
|
- postData = { poundBillData: distributePoundForm.value };
|
|
|
|
|
|
|
+ postData = {
|
|
|
|
|
+ poundBillData: {
|
|
|
|
|
+ ...distributePoundForm.value,
|
|
|
|
|
+ portId: distributePortId.value,
|
|
|
|
|
+ },
|
|
|
|
|
+ };
|
|
|
} else if (4 == type) {
|
|
} else if (4 == type) {
|
|
|
|
|
+ for (let i of ocrTruckRecordTableData.value) {
|
|
|
|
|
+ i.portId = distributePortId.value;
|
|
|
|
|
+ }
|
|
|
postData = { carLoadDatas: ocrTruckRecordTableData.value };
|
|
postData = { carLoadDatas: ocrTruckRecordTableData.value };
|
|
|
}
|
|
}
|
|
|
let res = await api.distribute({
|
|
let res = await api.distribute({
|