ソースを参照

更新 wuchan参数;新增 更新销售状态

wzg 2 年 前
コミット
842af7e9cf
3 ファイル変更79 行追加1 行削除
  1. 5 0
      src/apis/fetch.js
  2. 58 1
      src/views/voyage/voyageDetail.vue
  3. 16 0
      src/views/voyage/voyageList.vue

+ 5 - 0
src/apis/fetch.js

@@ -240,4 +240,9 @@ export default {
   getAccidentList(data) {
     return $http("/voyage/getAccidentList", data);
   },
+
+  // 更新航次销售状态
+  updateSaleStatus(data) {
+    return $http("/wuchan/update/voyageSaleStatus", data);
+  },
 };

+ 58 - 1
src/views/voyage/voyageDetail.vue

@@ -36,6 +36,32 @@
   </div>
   <div class="line-container-p24">
     <div v-auth="'VOYAGEINFO'">
+      <div class="line">
+        <div class="info-line">
+          <div class="info-line-title">航次编号</div>
+          <div style="width: 240px">
+            {{ voyage.wuchanVoyageInfo?.hhdVoyageCode }}
+          </div>
+        </div>
+
+        <div class="info-line">
+          <div class="info-line-title">销售状态</div>
+          <div>
+            <el-select
+              style="width: 240px"
+              v-model="voyage.wuchanVoyageInfo.saleStatus"
+              placeholder="销售状态"
+              size="small"
+              @change="updateSaleStatus"
+            >
+              <el-option label="采购" value="采购" />
+              <el-option label="销售" value="销售" />
+              <el-option label="调拨" value="调拨" />
+              <el-option label="其他" value="1其他" />
+            </el-select>
+          </div>
+        </div>
+      </div>
       <div class="line">
         <div class="info-line">
           <div class="info-line-title">航次名称</div>
@@ -106,6 +132,16 @@
           ></el-input>
         </div>
       </div>
+      <div class="line">
+        <div class="info-line">
+          <div class="info-line-title">承运商</div>
+          <el-input
+            class="info-line-text"
+            v-model="voyage.proxyName"
+            disabled
+          ></el-input>
+        </div>
+      </div>
       <div id="map-container" class="map-container"></div>
       <div class="line" style="margin-top: 30px">
         <div class="info-line">
@@ -1204,7 +1240,9 @@ import { subTimeStr } from "utils/utils";
 
 const route = useRoute();
 let map = ref();
-let voyage = ref({});
+let voyage = ref({
+  wuchanVoyageInfo: {},
+});
 let medias = ref([]);
 let coordinates = ref();
 let previewSrcList = ref([]);
@@ -1894,6 +1932,25 @@ function deleteAccident(id) {
     });
 }
 
+async function updateSaleStatus(e) {
+  let res = await api.updateSaleStatus({
+    voyageId: route.query.id,
+    saleStatus: e,
+  });
+  console.log(res);
+  if (res.data.status == 0) {
+    ElMessage({
+      type: "success",
+      message: "修改成功!",
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      message: res.data.msg,
+    });
+  }
+}
+
 onMounted(() => {
   getVoyageDetail(true);
 });

+ 16 - 0
src/views/voyage/voyageList.vue

@@ -450,6 +450,16 @@
         min-width="100"
         align="center"
       ></el-table-column>
+      <el-table-column
+        prop="voyageName"
+        label="航次编号"
+        min-width="120"
+        align="center"
+      >
+        <template v-slot="scope">
+          {{ scope.row.wuchanVoyageInfo?.hhdVoyageCode }}
+        </template>
+      </el-table-column>
       <el-table-column
         prop="voyageName"
         label="航次名称"
@@ -461,6 +471,12 @@
           }}{{ `${scope.row.contractNum ? " - 已合并" : ""}` }}
         </template>
       </el-table-column>
+      <el-table-column
+        prop="proxyName"
+        label="承运商"
+        min-width="120"
+        align="center"
+      ></el-table-column>
       <el-table-column
         prop="loadPort"
         label="装货港"