quyx@nextosd.com 5 月之前
父节点
当前提交
8b7809d003

+ 3 - 3
src/layout/components/TagsView/index.vue

@@ -289,9 +289,9 @@ function handleScroll() {
       }
 
       &.active {
-        background-color: #42b983;
-        color: #fff;
-        border-color: #42b983;
+        background-color: #fdd000;
+        color: #141414;
+        border-color: #fdd000;
 
         &::before {
           content: '';

+ 1 - 1
src/store/modules/settings.js

@@ -10,7 +10,7 @@ const useSettingsStore = defineStore(
     {
         state: () => ({
             title: '',
-            theme: storageSetting.theme || '#409EFF',
+            theme: storageSetting.theme || '',
             sideTheme: storageSetting.sideTheme || sideTheme,
             showSettings: showSettings,
             topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,

+ 1 - 4
src/views/bbib/order/compilation.vue

@@ -87,7 +87,7 @@
        </template>
       </el-table-column>
 
-    <el-table-column align="center" header-align="center" v-for="(num, index) in originalDataLength" :key="index" :label="num"  >
+    <el-table-column align="center" header-align="center" v-for="(num, index) in 31" :key="index" :label="num"  >
       <el-table-column align="center" header-align="center" :label="getElement(num)" :prop="'num_' + num" min-width="40" >
         <template #default="scope">
           <template v-if="scope.row.isNewRow">
@@ -157,7 +157,6 @@ const originalDataList = ref([]);
 const isSaved = ref(false); 
 
 const canAddNewRow = ref(true); 
-const originalDataLength = ref(0);
 const route = useRoute()
 const orderId = route.params.orderId
 const version = ref(Number(route.params.version));
@@ -368,8 +367,6 @@ const getList = () => {
     const filteredData = originalData.filter(item => {
       return item.monthPlanId !== undefined && item.monthPlanId !== null && item.monthPlanId !== '';
     });
-
-    originalDataLength.value = filteredData.length;
     
     // 为每行数据添加原始值和修改标记(初始化时为空)
     const enhancedData = filteredData.map(item => ({

+ 2 - 1
src/views/bbib/order/detail.vue

@@ -202,6 +202,7 @@ const router = useRouter()
 const orderId = route.params.orderId 
 const receivedversion  = Number(route.query.version);
 const newFlag  = Number(route.query.newFlag);
+const actionKind = 1;
 
 const actionForm  = ref({
   actionType: '', // 下拉列表选中值
@@ -399,7 +400,7 @@ function getSearchList() {
 
 function getActionList() {
   listLoading.value = true;
-  const data = { orderId };
+  const data = { orderId, actionKind };
   listAction(data).then(response => {
     insertedOrderList.value = response.data || [];
     

+ 62 - 220
src/views/bbib/order/instruction.vue

@@ -7,103 +7,57 @@
       </el-select>
     </el-form-item>
 
-  <el-table :row-class-name="tableRowClassName" v-show="initLoadingCompleted" v-loading="listLoading" :border="true" :data="examKindList" class="order-version" :cell-style="cellStyle" >
+  <el-table v-show="initLoadingCompleted" v-loading="listLoading" :border="true" :data="examKindList" class="order-version" >
      <el-table-column align="center" header-align="center" label="AM" prop="AM" min-width="44">
        <template #default="scope">
-         <template v-if="scope.row.isNewRow">
-           <input v-model="scope.row.AM" class="no-border-input"  ></input>
-         </template>
-         <template v-else>
            {{ scope.row.AM }} 
-         </template>
        </template>
     </el-table-column>
       <el-table-column label="線便" header-align="center">
       <el-table-column align="center" header-align="center" label="発" prop="departureCode" min-width="72">
       <template #default="scope">
-         <template v-if="scope.row.isNewRow">
-           <input v-model="scope.row.departureCode" class="no-border-input" ></input>
-         </template>
-         <template v-else>
            {{ scope.row.departureCode }} 
-         </template>
        </template>
       </el-table-column>
       <el-table-column align="center" header-align="center" label="着" prop="arrivalCode" min-width="72">
       <template #default="scope">
-         <template v-if="scope.row.isNewRow">
-           <input v-model="scope.row.arrivalCode" class="no-border-input" ></input>
-         </template>
-         <template v-else>
            {{ scope.row.arrivalCode }} 
-         </template>
        </template>
       </el-table-column>
       <el-table-column align="center" header-align="center" label="系統" prop="systemCode" min-width="51">
       <template #default="scope">
-         <template v-if="scope.row.isNewRow">
-           <input v-model="scope.row.systemCode" class="no-border-input" ></input>
-         </template>
-         <template v-else>
            {{ scope.row.systemCode }} 
-         </template>
        </template>
       </el-table-column>
       <el-table-column align="center" header-align="center" label="線便名" prop="lineName" min-width="100">
       <template #default="scope">
-         <template v-if="scope.row.isNewRow">
-           <input v-model="scope.row.lineName" class="no-border-input" ></input>
-         </template>
-         <template v-else>
            {{ scope.row.lineName }} 
-         </template>
        </template>
       </el-table-column>
       </el-table-column>
       <el-table-column align="center" header-align="center" label="入庫場所" prop="wareHouseLocation" min-width="81">
       <template #default="scope">
-         <template v-if="scope.row.isNewRow">
-           <input v-model="scope.row.wareHouseLocation" class="no-border-input" ></input>
-         </template>
-         <template v-else>
            {{ scope.row.wareHouseLocation }} 
-         </template>
        </template>
       </el-table-column>
       <el-table-column align="center" header-align="center" label="入庫時間" prop="wareHouseTime" min-width="77">
       <template #default="scope">
-         <template v-if="scope.row.isNewRow">
-           <input v-model="scope.row.wareHouseTime" class="no-border-input" ></input>
-         </template>
-         <template v-else>
            {{ scope.row.wareHouseTime }} 
-         </template>
        </template>
       </el-table-column>
       <el-table-column align="right" header-align="center" label="使用車両(トン)" prop="vehicleTon" min-width="77">
       <template #default="scope">
-         <template v-if="scope.row.isNewRow">
-           <input v-model="scope.row.vehicleTon" class="right-aligned-input" ></input>
-         </template>
-         <template v-else>
            {{ scope.row.vehicleTon }} 
-         </template>
        </template>
       </el-table-column>
-    <el-table-column align="center" header-align="center" v-for="(num, index) in originalDataLength" :key="index" :label="num"  >
+    <el-table-column align="center" header-align="center" v-for="(num, index) in 31" :key="index" :label="num"  >
       <el-table-column align="center" header-align="center" :label="getElement(num)" :prop="'num_' + num" min-width="40" >
         <template #default="scope">
-          <template v-if="scope.row.isNewRow">
-            <input v-model="scope.row[`num_${num}`]" class="no-border-input" ></input>
-          </template>
-           <template v-else>
              <span 
-               @click="open(scope.row, num)" 
                style="display: block; min-height: 24px;"
              >
               {{ getDataByIndex(index) || ' ' }}
             </span>
-           </template>
         </template>
       </el-table-column>
     </el-table-column>
@@ -117,72 +71,87 @@
 </template>
 
 <script name="OrderInstruction" setup>
-import { listOrder, getOrder, delOrder, addOrder, updateOrder,getOrderCompilation } from "@/api/bbib/order"
-import {formatMsg, parseAlphabetNumeric} from "@/utils/yamato";
-import {delay} from "@/utils/index.js";
-import {encryptField} from "@/utils/encrypt.js";
+import { getOrder, addOrder, getOrderCompilation } from "@/api/bbib/order"
 import { useRoute } from 'vue-router'
 import { useRouter } from 'vue-router'
 
-const {proxy} = getCurrentInstance();
-
+// テーブル表示用のデータリスト
 const examKindList = ref([]);
+// 元データのリスト(日付ごとのデータ)
 const originalDataList = ref([]);
 
-const canAddNewRow = ref(true); 
-const originalDataLength = ref(0);
-
+// ルートパラメータ取得
 const route = useRoute()
 const router = useRouter()
 const orderId = route.params.orderId
 const version = route.params.version
+// 選択中のバージョン
 const selectedVersion = ref(route.params.version || '');
+// 新規フラグ(1:新規作成モード)
 const newFlag  = Number(route.query.newFlag);
 
+/**
+ * 編集ボタンクリック時の処理
+ * 注文編集画面に遷移します
+ */
 const handleEdit = () => {
   router.push({
     name: 'OrderCompilation',
-      params: { 
+    params: { 
       orderId: orderId,
       version: version 
     }
   })
 }
 
+/**
+ * インデックスに基づいてデータを取得するコンピューテッドプロパティ
+ * 新規作成モードかどうかに応じてデータ取得方法を切り替えます
+ */
 const getDataByIndex = computed(() => {
-      return (index) => {
-        return newFlag === 1 
-          ? getNewDataByIndex(index) 
-          : getOriginalDataByIndex(index);
-      };
-    });
+  return (index) => {
+    return newFlag === 1 
+      ? getNewDataByIndex(index) 
+      : getOriginalDataByIndex(index);
+  };
+});
 
+/**
+ * データを初期化する関数
+ * 元データを加工し、編集用のフィールドを追加します
+ */
 const initializeData = (data) => {
   return data.map(row => {
     const originalData = {};
+    // 1〜31日分のデータを初期化
     for (let i = 1; i <= 31; i++) {
-      originalData[`num_${i}`] = row[`num_${i}`] || ''; // 确保原始值非 null
+      originalData[`num_${i}`] = row[`num_${i}`] || ''; // 値がない場合は空文字を設定
     }
     return { 
       ...row, 
       __originalData: originalData, 
-      __modifiedFields: [], // 初始化修改标记数组
+      __modifiedFields: [], // 変更フラグ管理用配列
       isNewRow: false 
-    }; // 标记非新行
+    };
   });
 };
 
+/**
+ * 注文ページへ遷移する処理
+ * 選択した指示書で注文を作成します
+ */
 const handleGoToOrderPage = async () => {
-  // 定义要传递给后端的参数
+  // バックエンドに送信するパラメータ
   const actionType = 14
   const actionCode = orderId
   
-  // 调用API
+  // API呼び出し
   await addOrder({
     actionType,
     actionCode
   })
   
+  // 注文詳細ページに遷移
   router.push({
     name: 'OrderDetail',
     query: { 
@@ -191,55 +160,7 @@ const handleGoToOrderPage = async () => {
   });
 };
 
-
-
-watch(examKindList, () => {
-  checkAddButtonState();
-}, { deep: true });
-
-function checkAddButtonState() {
-  const lastRow = examKindList.value[examKindList.value.length - 1];
-  if (lastRow && lastRow.isNewRow) {
-    canAddNewRow.value = lastRow.発 && lastRow.着 && lastRow.系統;
-  }
-}
-
-//増便
-const addNewRow = () => {
-  const newRow = {
-    AM: '',
-    departureCode: '',
-    arrivalCode: '',
-    systemCode: '',
-    lineName: '',
-    wareHouseLocation: '',
-    wareHouseTime: '',
-    vehicleTon: '',
-    isNewRow: true,
-    highlightRow: true // 新增高亮标记
-  }
-  
-  for (let i = 1; i <= 31; i++) {
-    newRow[`num_${i}`] = ''
-  }
-  
-  examKindList.value.push(newRow);
-  checkAddButtonState();
-}
-
-const tableRowClassName = ({row}) => {
-  return row.highlightRow ? 'highlight-row' : ''
-}
-
-// 控制对话框显示
-const dialogVisible = ref(false);
-// 下拉框选项数据
-const reasonOptions = ref([
-  { value: 'option1', label: '选项1' },
-  { value: 'option2', label: '选项2' },
-  { value: 'option3', label: '选项3' }
-])
-
+// バージョン選択用のオプションリスト
 const versionOptions = ref([
   { value: '1', label: 'ver-1' },
   { value: '2', label: 'ver-2' },
@@ -249,150 +170,71 @@ const versionOptions = ref([
   { value: '6', label: 'ver-6' },
   { value: '7', label: 'ver-7' },
 ])
-// 绑定下拉框的值
-const selectedReason = ref('');
-// 绑定文本框的值
-const changedValue = ref('');
-
-const currentRow = ref(null)
-const currentNum = ref(null)
-
-const cellStyle = ({ row, column }) => {
-  const prop = column.property;
-  if (!prop?.startsWith('num_') || row.isNewRow) return {}; // 跳过非 num_ 列和新行
-
-  const originalValue = row.__originalData[prop];
-  const currentValue = row[prop] || ''; // 处理 null 为 ''
-
-  // 新增:检查是否有修改标记
-  return row.__modifiedFields?.includes(prop)
-    ? { 
-        backgroundColor: '#f0f7ff', 
-      } 
-    : {};
-};
-
-
-const open = (row, num) => {
-  currentRow.value = row
-  currentNum.value = num
-  selectedReason.value = reasonOptions.value[0].value
-  changedValue.value = ''
-  dialogVisible.value = true
-};
-
-// 处理回车键事件
-const handleEnter = () => {
-  const valueToUpdate = changedValue.value;
-  
-  if (currentRow.value && currentNum.value) {
-    const prop = `num_${currentNum.value}`;
-    const originalValue = currentRow.value.__originalData[prop];
-    
-   // 判断原始值是否为空且输入值不为空
-    if (!originalValue && valueToUpdate) {
-      currentRow.value[prop] = '〇';
-    } else if (valueToUpdate === originalValue) {
-      // 保持原值,不做任何修改
-    } else {
-      // 否则更新空值
-      currentRow.value[prop] = '';
-    }
-    
-    // 记录修改状态
-    if (!currentRow.value.__modifiedFields) {
-      currentRow.value.__modifiedFields = [];
-    }
-    
-    // 如果新值与原始值不同,则添加到修改列表
-    if (valueToUpdate !== originalValue) {
-      if (!currentRow.value.__modifiedFields.includes(prop)) {
-        currentRow.value.__modifiedFields.push(prop);
-      }
-    } else {
-      // 如果相同且已在修改列表中,则移除
-      const index = currentRow.value.__modifiedFields.indexOf(prop);
-      if (index !== -1) {
-        currentRow.value.__modifiedFields.splice(index, 1);
-      }
-    }
-  }
-  
-  dialogVisible.value = false;
-};
   
-
-const openDialog = ref(false);
+// 初期ロード完了フラグ
 const initLoadingCompleted = ref(false);
+// リストロード中フラグ
 const listLoading = ref(false);
-const submitFormLoading = ref(false);
-
-const listTotalCnt = ref(0);
-const dialogTitle = ref("");
 
-const data = reactive({
-  form: {},
-  queryParams: {
-    pageNum: 1,
-    pageSize: 10,
-    certificationType: null,
-    examName: null,
-  },
-  rules: {
-    certificationType: [{required: true, message: formatMsg('E0003', "検定種類"), trigger: 'blur'}],
-    examName: [{required: true, message: formatMsg('E0003', "試験名"), trigger: 'blur'}],
-  }
-});
+// フォームデータ
+const data = reactive({});
 
+// フォームデータの参照
 const {queryParams, form, rules} = toRefs(data);
 
+/**
+ * 日付に対応する曜日文字列を取得する関数
+ */
 const getElement = (num) => {
   const index = num - 1;
   return originalDataList.value[index]?.runWeekDayStr  || '';
 };
 
-
 /**
- * 検定種類マスタリストを取得
+ * 注文指示書データを取得する関数
+ * APIからデータを取得し、テーブルに表示するための加工を行います
  */
 const getList = () => {
   listLoading.value = true;
   const data = { orderId };
   getOrderCompilation(data).then(response => {
     const originalData = response.data;
-   const filteredData = originalData.filter(item => {
+    // monthPlanIdが存在するデータのみを抽出
+    const filteredData = originalData.filter(item => {
       return item.monthPlanId !== undefined && item.monthPlanId !== null && item.monthPlanId !== '';
     });
     
-    originalDataLength.value = filteredData.length; 
     originalDataList.value = filteredData; 
+    // 重複データを除外
     const uniqueData = Array.from(
       new Map(originalData.map(item => [item.orderId, item])).values()
     );
     
-    // 初始化处理后的数据
+    // データを初期化して表示用リストにセット
     examKindList.value = initializeData(uniqueData);
     listLoading.value = false;
     initLoadingCompleted.value = true;
   });
 };
 
+/**
+ * 元データから指定インデックスのデータを取得する関数
+ */
 const getOriginalDataByIndex = (index) => {
   return originalDataList.value[index]?.originalData || '';
 };
+
+/**
+ * 新規データから指定インデックスのデータを取得する関数
+ */
 const getNewDataByIndex = (index) => {
   return originalDataList.value[index]?.newData || '';
 };
+
+// コンポーネント初期化時にデータを取得
 getList();
 </script>
 <style>
-.eikin-dialog-edit {
-  .el-form-item:not(.is-required) {
-    .el-form-item__label {
-      text-indent: 13px;
-    }
-  }
-}
 .custom-add-btn {
   position: relative; top: 5px; 
   color: #0066cc; 

+ 3 - 3
src/views/bbib/result/index.vue

@@ -12,10 +12,10 @@
           </el-select>
         </el-form-item>
         <el-form-item label="輸送パートナーID">
-          <el-input v-model="queryParams.partnerCode" class="small-input"></el-input>
+          <el-input v-model="queryParams.partnerCode" class="small-input" :maxlength="10"></el-input>
         </el-form-item>
             <el-form-item label="実績ID">
-              <el-input v-model="queryParams.resultId" class="small-input"></el-input>
+              <el-input v-model="queryParams.resultId" class="small-input" :maxlength="64"></el-input>
             </el-form-item>
         <el-form-item label="区間種別">
           <el-checkbox-group v-model="queryParams.sectionType">
@@ -144,7 +144,7 @@
   </div>
 </template>
 
-<script name="CertificationItem" setup>
+<script name="ResultList" setup>
 
 import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/bbib/result"
 import {computed} from 'vue';