浏览代码

集計条件指定

quyx@nextosd.com 4 月之前
父节点
当前提交
a403fccc00

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "jsencrypt": "3.3.2",
     "nprogress": "0.2.0",
     "pinia": "2.1.7",
+    "pinia-plugin-persistedstate": "^3.2.1",
     "splitpanes": "3.1.5",
     "vue": "3.4.31",
     "vue-cropper": "1.1.1",

+ 9 - 0
src/api/fcbi/survey.js

@@ -67,3 +67,12 @@ export function listSurveyAnswer(query) {
     params: query
   })
 }
+
+// 查询売上集計結果列表
+export function salesSurvey(query) {
+  return request({
+    url: '/system/survey/sales',
+    method: 'get',
+    params: query
+  })
+}

+ 7 - 0
src/components/PublicRange.vue

@@ -21,6 +21,7 @@
 
     <!-- 業種选择 -->
     <el-form-item
+        v-if="showBusinessType"
         label="業種"
         prop="businessTypeCode"
         class="business-type-form-item"
@@ -80,6 +81,10 @@ const props = defineProps({
     type: Array,
     required: true,
     default: () => []
+  },
+  showBusinessType: {
+    type: Boolean,
+    default: true
   }
 });
 
@@ -134,6 +139,8 @@ watch(
   margin-left: 57px !important;
   margin-right: 20px;
   margin-top: 0;
+  color: #606266;
+  font-weight: 700;
 }
 
 .region-tree-container {

+ 2 - 0
src/main.js

@@ -15,6 +15,7 @@ import directive from './directive' // ディレクティブ
 import plugins from './plugins' // プラグイン
 import {download} from '@/utils/request'
 import { createPinia } from 'pinia'
+import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
 
 // SVGアイコン
 import 'virtual:svg-icons-register'
@@ -42,6 +43,7 @@ import DictTag from '@/components/DictTag'
 
 const app = createApp(App)
 const pinia = createPinia()
+pinia.use(piniaPluginPersistedstate);
 
 // グローバルメソッドのマウント
 app.config.globalProperties.useDict = useDict

+ 14 - 0
src/router/index.js

@@ -181,6 +181,20 @@ export const constantRoutes = [
             }
         ]
     },
+    {
+        path: '/salesAdmin',
+        component: Layout,
+        hidden: true,
+        redirect: 'noredirect',
+        children: [
+            {
+                path: 'salesSumResult',
+                component: () => import('@/views/fcbi/sales/sumResult'),
+                name: 'salesSumResult',
+                meta: {title: '売上集計結果', icon: 'user'}
+            }
+        ]
+    },
 ]
 
 // ダイナミックルート、ユーザー権限に基づいて動的に読み込みます

+ 25 - 0
src/store/surveyStore.js

@@ -73,4 +73,29 @@ export const useSurveyStore = defineStore('survey', {
             this.businessTypeCode = data
         }
     }
+})
+
+export const useSurveySalesStore = defineStore('surveySales', {
+    state: () => ({
+        // 存储销售统计传递的数据
+        salesData: {
+            // 日期相关(月指定/年度指定)
+            monthYear: null, // 月指定-年份
+            startMonth: null, // 月指定-月份
+            startYear: null, // 年度指定-年度
+            // FC选择值
+            brandCode: [],
+            // エリア选择值
+            regions: [],
+            // 标志位
+            salesFlag: 0
+        }
+    }),
+    actions: {
+        // 设置销售统计数据
+        setSalesData(data) {
+            this.salesData = { ...data }
+        }
+    },
+    persist: true
 })

+ 43 - 3
src/views/fcbi/customer/export.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="app-container">
     <div class="form-container">
-      <div class="filter-item" style="padding-left: 58px; margin-top: -15px;">抽出条件</div>
+      <div class="filter-item">抽出条件</div>
       <PublicRange
           v-model="queryParams"
           :region-tree="regionTree"
@@ -28,6 +28,7 @@ import {reactive, ref, onMounted, getCurrentInstance, watch, toRefs} from 'vue';
 import PublicRange from '../../../components/PublicRange.vue';
 import { useSurveyStore } from '@/store/surveyStore';
 import {download} from "@/utils/request.js";
+import { ElMessageBox } from 'element-plus';
 
 const { proxy } = getCurrentInstance();
 const surveyStore = useSurveyStore();
@@ -158,14 +159,44 @@ const collectSelectedRegions = (nodes, isParent = false) => {
  * CSV形式でデータをエクスポートする関数です
  */
 function handleExportCSV() {
-  download('system/survey/exportCustomerCsv', {}, `ymdf_customer${new Date().getTime()}.csv`);
+  ElMessageBox.confirm(
+      'CSV出力を実行しますか?',
+      '確認',
+      {
+        confirmButtonText: 'はい',
+        cancelButtonText: 'いいえ',
+        type: 'info',
+      }
+  )
+      .then(() => {
+        // 用户点击"はい"(是)时执行导出
+        download('system/survey/exportCustomerCsv', {}, `ymdf_customer${new Date().getTime()}.csv`);
+      })
+      .catch(() => {
+        // 用户点击"いいえ"(否)时不执行操作,自动关闭弹窗
+      });
 }
 
 /**
  * DM宛名用のデータをエクスポートする関数です
  */
 function handleExportDM() {
-  download('system/survey/exportCustomerDm', {}, `ymdf_customer${new Date().getTime()}.csv`);
+  ElMessageBox.confirm(
+      'DM宛名出力を実行しますか?',
+      '確認',
+      {
+        confirmButtonText: 'はい',
+        cancelButtonText: 'いいえ',
+        type: 'info',
+      }
+  )
+      .then(() => {
+        // 用户点击"はい"(是)时执行导出
+        download('system/survey/exportCustomerDm', {}, `ymdf_customer${new Date().getTime()}.csv`);
+      })
+      .catch(() => {
+        // 用户点击"いいえ"(否)时不执行操作,自动关闭弹窗
+      });
 }
 </script>
 
@@ -176,7 +207,9 @@ function handleExportDM() {
 .shop-name-label {
   display: inline-block;
   margin-right: 10px;
+  font-size: 14px;
   color: #606266;
+  font-weight: 700;
 }
 .shop-name-input {
   width: 300px;
@@ -205,4 +238,11 @@ function handleExportDM() {
     margin-left: 20px;
   }
 }
+.filter-item{
+  padding-left: 58px;
+  margin-top: -45px;
+  font-size: 14px;
+  color: #606266;
+  font-weight: 700;
+}
 </style>

+ 129 - 0
src/views/fcbi/sales/sumResult.vue

@@ -0,0 +1,129 @@
+<!-- 売上集計結果 -->
+<template>
+  <div class="app-container">
+    <div class="csv-title">CSV出力</div>
+    <el-table v-show="initLoadingCompleted" v-loading="listLoading" :border="true" :data="certificationItemList">
+      <el-table-column :show-overflow-tooltip="true" align="left" header-align="center" label="FC" min-width="60"
+                       prop="fcName"
+      >
+      </el-table-column>
+        <el-table-column :show-overflow-tooltip="true" align="left" header-align="center" label="エリア" min-width="70"
+                         prop="areaName"
+                         width=""/>
+        <el-table-column :show-overflow-tooltip="true" align="left" header-align="center" label="売上合計" min-width="80"
+                         prop="totalSales"
+                         width=""/>
+        <el-table-column :show-overflow-tooltip="true" align="left" header-align="center" label="店舗数" min-width="100"
+                         prop="storeCount"
+                         width=""/>
+        <el-table-column :show-overflow-tooltip="true" align="right" header-align="center" label="平均売上" min-width="30"
+                         prop="avgSales"
+                         width=""/>
+      <el-table-column :show-overflow-tooltip="true" align="right" header-align="center" label="前月比" min-width="30"
+                       prop="prevRatio"
+                       width=""/>
+      <el-table-column :show-overflow-tooltip="true" align="right" header-align="center" label="FC内売上シェア" min-width="30"
+                       prop="salesShare"
+                       width=""/>
+    </el-table>
+
+    <pagination v-show="listTotalCnt>0"
+                v-model:limit="queryParams.pageSize"
+                v-model:page="queryParams.pageNum"
+                :total="listTotalCnt"
+                @pagination="getSearchList"/>
+  </div>
+</template>
+
+<script name="SurveyList" setup>
+
+import { salesSurvey} from "@/api/fcbi/survey.js"
+import { useSurveySalesStore } from '@/store/surveyStore';
+
+// 認証項目のテーブルデータを格納するリアクティブ
+const certificationItemList = ref([]);
+// データ読み込み中のローディング状態を管理するリアクティブ
+const listLoading = ref(false);
+// 検索結果の総件数を格納するリアクティブ
+const listTotalCnt = ref(0);
+// 初期ロードが完了したかどうかを示すリアクティブ
+const initLoadingCompleted = ref(false);
+const surveySalesStore = useSurveySalesStore();
+
+/**
+ * コンポーネントの状態を管理するリアクティブオブジェクト
+ */
+const data = reactive({
+  form: {},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 100,
+    monthYear: '',
+    startMonth: '',
+    startYear: '',
+    brandCode: [],
+    regions: [],
+    salesFlag: 0
+  },
+});
+
+// リアクティブオブジェクトからプロパティを参照可能なオブジェクトに変換
+const {queryParams} = toRefs(data);
+
+onMounted(() => {
+  const {
+    monthYear,
+    startMonth,
+    startYear,
+    brandCodes,
+    regionCodes,
+    salesFlag
+  } = surveySalesStore.salesData;
+
+  queryParams.value.monthYear = monthYear;
+  queryParams.value.startMonth = startMonth;
+  queryParams.value.startYear = startYear;
+  queryParams.value.regionCodes = regionCodes;
+  queryParams.value.brandCodes = brandCodes;
+  queryParams.value.salesFlag = salesFlag;
+  getSearchList();
+});
+
+/**
+ * 発注リストを検索する関数
+ * APIを呼び出して検索条件に一致する発注データを取得する
+ */
+function getSearchList() {
+  listLoading.value = true;
+  const params = {
+    pageNum: queryParams.value.pageNum,
+    pageSize: queryParams.value.pageSize,
+    // 月指定参数(仅当月指定时有效)
+    monthYear: queryParams.value.monthYear,
+    startMonth: queryParams.value.startMonth,
+    // 年度指定参数(仅当年度指定时有效)
+    startYear: queryParams.value.startYear,
+    // FC选择值
+    brandCodes: queryParams.value.brandCodes,
+    // エリア选择值
+    regionCodes: queryParams.value.regionCodes,
+    // 标志位(用于后端判断逻辑)
+    salesFlag: queryParams.value.salesFlag
+  };
+  salesSurvey(params).then(response => {
+    certificationItemList.value = response.rows;
+    listTotalCnt.value = response.total;
+    listLoading.value = false;
+    initLoadingCompleted.value = true;
+  });
+}
+</script>
+
+<style>
+.csv-title {
+  font-size: 14px;
+  color: #606266;
+  margin: 0 0 15px 20px;
+  padding-top: 10px;
+}
+</style>

+ 424 - 0
src/views/fcbi/sales/sumSettings.vue

@@ -0,0 +1,424 @@
+<!-- 売上集計条件指定 -->
+<template>
+  <div class="app-container">
+    <div class="form-container">
+      <div class="section-container">
+        <div class="form-section">対象 </div>
+      <el-form-item class="radio-group-vertical">
+        <div class="radio-container">
+          <el-radio
+              label="immediate"
+              v-model="queryParams.releaseType"
+              class="vertical-radio"
+          >月指定</el-radio>
+          <div class="scheduled-row">
+            <!-- 期間指定时显示的日期选择(同行) -->
+            <div class="date-group"  >
+              <!-- 日期选择器代码保持不变 -->
+              <el-select v-model="queryParams.monthYear" placeholder="" class="date-select" :disabled="queryParams.releaseType === 'scheduled'">
+                <el-option v-for="year in years" :key="year" :label="year" :value="year"></el-option>
+              </el-select>
+              <span class="date-label">年</span>
+              <el-select
+                  v-model="queryParams.startMonth"
+                  placeholder=""
+                  class="date-select-small"
+                  :disabled="queryParams.releaseType === 'scheduled'"
+              >
+                <el-option
+                    v-for="month in months"
+                    :key="month"
+                    :label="month"
+                    :value="month"
+                ></el-option>
+              </el-select>
+              <span class="date-label">月</span>
+              <el-form-item>
+                <el-button @click="resetForm"  v-hasPermi="['fcbi:survey:form']" class="append-button">集計条件リセット</el-button>
+              </el-form-item>
+            </div>
+          </div>
+          <el-radio
+              label="scheduled"
+              v-model="queryParams.releaseType"
+              class="scheduled-radio"
+          >年度指定</el-radio>
+          <div class="scheduled-row">
+            <!-- 期間指定时显示的日期选择(同行) -->
+            <div class="date-group"  >
+              <!-- 日期选择器代码保持不变 -->
+              <el-select v-model="queryParams.startYear" placeholder="" class="date-select"  :disabled="queryParams.releaseType === 'immediate'">
+                <el-option v-for="year in years" :key="year" :label="year" :value="year"></el-option>
+              </el-select>
+              <span class="date-label">年度</span>
+            </div>
+          </div>
+        </div>
+      </el-form-item>
+      </div>
+      <el-form-item label="集計種別" style="margin-left: 50px;margin-top: -15px">
+        <el-radio-group v-model="queryParams.aggregationType"  class="custom-radio-group">
+          <el-radio label="FC_CHECKBOX">FC別集計</el-radio>
+          <el-radio label="TYPE_CHECKBOX">エリア別集計</el-radio>
+          <el-radio label="STORE_CHECKBOX">店舗別集計</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <div class="divider"></div>
+      <PublicRange
+          v-model="queryParams"
+          :region-tree="regionTree"
+          :yamada-fc-brand="yamada_fc_brand"
+          :yamada-business-type="yamada_business_type"
+          @check-change="handleCheckChange"
+          :show-business-type="false"
+      />
+      <div class="btn-section" style="padding-left: 78px; margin-top: 25px;">
+        <button class="operate-btn" @click="Confirm"  v-hasPermi="['fcbi:sales:sum']">集計</button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script name="SurveyExport" setup>
+import { getRegionTree } from "@/api/fcbi/survey.js";
+import {reactive, ref, onMounted, getCurrentInstance, watch, toRefs} from 'vue';
+import PublicRange from '../../../components/PublicRange.vue';
+import { useSurveyStore } from '@/store/surveyStore';
+import { useSurveySalesStore } from '@/store/surveyStore';
+import { useRouter } from 'vue-router';
+
+const { proxy } = getCurrentInstance();
+const surveyStore = useSurveyStore();
+const surveySalesStore = useSurveySalesStore();
+const router = useRouter();
+
+/**
+ * データ辞書から品牌と業務タイプのデータを取得します
+ */
+const { yamada_fc_brand } = proxy.useDict('yamada_fc_brand');
+const { yamada_business_type } = proxy.useDict('yamada_business_type');
+
+/**
+ * 地域ツリーデータと選択された地域コードの配列を保持します
+ */
+const regionTree = ref([]);
+const selectedRegions = ref([]);
+
+/**
+ * フォームの入力データを保持するオブジェクトです
+ */
+const data = reactive({
+  // 検索条件を格納するオブジェクト
+  queryParams: {
+    brandCode: [],
+    businessTypeCode: [],
+    releaseType: 'immediate',
+    aggregationType: 'FC_CHECKBOX',
+    monthYear: null,
+    startMonth: null,
+    startYear: null,
+    regions: []
+  }
+});
+const { queryParams} = toRefs(data);
+
+const currentYear = new Date().getFullYear();
+const years = Array.from({ length: 11 }, (_, i) => currentYear + i);
+const months = Array.from({ length: 12 }, (_, i) => i + 1);
+/**
+ * 地域ツリーのデータが更新されたときに、選択された地域を更新します
+ */
+watch(regionTree, () => {
+  if (regionTree.value.length > 0) {
+    updateSelectedRegions(regionTree.value);
+  }
+}, { deep: true });
+
+watch(
+    () => queryParams.value.releaseType,
+    (newVal) => {
+      if (newVal === 'immediate') {
+        queryParams.value.startYear = null;
+      } else {
+        queryParams.value.monthYear = null;
+        queryParams.value.startMonth = null;
+      }
+    },
+    { immediate: true }
+);
+
+/**
+ * コンポーネントのマウント後に地域ツリーデータを初期化します
+ */
+onMounted(async () => {
+  const response = await getRegionTree();
+  if (response?.success) {
+    const regions = response.data.regions || []
+    regionTree.value = regions
+    surveyStore.setRegionTree(regions)
+    if (regionTree.value.length > 0) {
+      updateSelectedRegions(regionTree.value);
+    }
+  } else {
+    error.value = response?.message || '地域データの取得に失敗しました';
+    console.error('地域データの取得に失敗しました:', response);
+  }
+});
+
+/**
+ * 地域のチェック状態が変更されたときのハンドラー関数です
+ */
+const handleCheckChange = (regionId, isChecked) => {
+  const region = findRegionById(regionTree.value, regionId);
+  if (region) {
+    if (isChecked) {
+      if (!selectedRegions.value.some(r => r.region_code === region.region_code)) {
+        selectedRegions.value.push({
+          region_code: region.region_code
+        });
+      }
+    } else {
+      selectedRegions.value = selectedRegions.value.filter(r => r.region_code !== region.region_code);
+    }
+    queryParams.value.regions = selectedRegions.value;
+  }
+};
+
+/**
+ * 指定されたIDを持つ地域ノードをツリーから再帰的に検索します
+ */
+const findRegionById = (nodes, id) => {
+  for (const node of nodes) {
+    if (node.id === id) {
+      return node;
+    }
+    if (node.children && node.children.length > 0) {
+      const found = findRegionById(node.children, id);
+      if (found) {
+        return found;
+      }
+    }
+  }
+  return null;
+};
+
+/**
+ * 選択されたすべての地域を再帰的に更新し、サブノードのみを収集します
+ */
+const updateSelectedRegions = (nodes) => {
+  selectedRegions.value = [];
+  // 最上位ノードは親ノードとしてマークされ、再帰的に子ノードを処理します
+  collectSelectedRegions(nodes, true);
+  queryParams.value.regions = selectedRegions.value;
+};
+
+/**
+ * 選択されたすべてのサブエリアオブジェクトを再帰的に収集します(親ノードをスキップ)
+ */
+const collectSelectedRegions = (nodes, isParent = false) => {
+  nodes.forEach(node => {
+    // 親ノード(上位ノード)の場合は、収集をスキップして再帰的に子ノードを処理します
+    if (isParent) {
+      if (node.children && node.children.length > 0) {
+        collectSelectedRegions(node.children, false);
+      }
+      return;
+    }
+    if (node.checked) {
+      selectedRegions.value.push({
+        region_code: node.region_code
+      });
+    }
+    if (node.children && node.children.length > 0) {
+      collectSelectedRegions(node.children, false);
+    }
+  });
+};
+
+const Confirm = () => {
+
+  let isValid = true;
+
+  if (queryParams.value.releaseType === 'immediate') {
+    if (!queryParams.value.monthYear) {
+      isValid = false;
+      proxy.$message.warning('月指定の年を選択してください');
+    }
+    if (!queryParams.value.startMonth) {
+      isValid = false;
+      proxy.$message.warning('月指定の月を選択してください');
+    }
+  }
+  else if (queryParams.value.releaseType === 'scheduled') {
+    if (!queryParams.value.startYear) {
+      isValid = false;
+      proxy.$message.warning('年度指定の年度を選択してください');
+    }
+  }
+
+  if (!isValid) {
+    return;
+  }
+
+  if (queryParams.value.aggregationType === 'FC_CHECKBOX') {
+    let salesFlag = 0;
+    const hasArea = queryParams.value.regions && queryParams.value.regions.length > 0; // エリア是否至少选一个
+    const isMonth = queryParams.value.releaseType === 'immediate'; // 是否是月指定
+
+    if (isMonth) {
+      salesFlag = hasArea ? 1 : 2;
+    } else {
+      salesFlag = hasArea ? 3 : 4;
+    }
+
+    const transferData = {
+      monthYear: isMonth ? queryParams.value.monthYear : null,
+      startMonth: isMonth ? queryParams.value.startMonth : null,
+      startYear: !isMonth ? queryParams.value.startYear : null,
+      // FC选择值
+      brandCodes: queryParams.value.brandCode,
+      // エリア选择值
+      regionCodes: queryParams.value.regions.map(region => region.region_code),
+      salesFlag
+    };
+
+    surveySalesStore.setSalesData(transferData);
+
+    router.push({ name: 'salesSumResult' });
+  }
+};
+
+const resetForm = () => {
+  // 1. 重置核心参数
+  queryParams.value.releaseType = 'immediate';
+  queryParams.value.aggregationType = 'FC_CHECKBOX';
+  queryParams.value.monthYear = null;
+  queryParams.value.startMonth = null;
+  queryParams.value.startYear = null;
+  queryParams.value.brandCode = [];
+
+  selectedRegions.value = [];
+  queryParams.value.regions = [];
+  if (regionTree.value.length > 0) {
+    resetRegionTreeCheck(regionTree.value);
+  }
+};
+
+const resetRegionTreeCheck = (nodes) => {
+  nodes.forEach(node => {
+    node.checked = false;
+    if (node.children && node.children.length > 0) {
+      resetRegionTreeCheck(node.children);
+    }
+  });
+};
+</script>
+
+<style scoped>
+.form-container {
+  margin-top: 40px;
+}
+.operate-btn {
+  background-color: #0080c7;
+  color: white;
+  border: none;
+  padding: 6px 12px;
+  cursor: pointer;
+  width: 240px;
+  margin-left: 90px;
+}
+@media (max-width:48em) {
+  .operate-btn {
+    width: 100px;
+    margin-left: 20px;
+  }
+}
+.radio-group-vertical {
+  margin-left: -20px;
+}
+@media (max-width:48em) {
+  .radio-group-vertical  {
+    margin-left: 7%;
+  }
+}
+.radio-container {
+  display: flex;
+  flex-direction: column;
+  gap: 12px;
+}
+.vertical-radio {
+  display: flex;
+  align-items: center;
+}
+.scheduled-row {
+  display: flex;
+  align-items: center;
+  margin-left: 88px;
+  margin-top: -45px;
+}
+@media (max-width:48em) {
+  .scheduled-row  {
+    margin-left: 13%;
+    width: 80%;
+  }
+}
+.date-group {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+  margin-left: 8px;
+}
+.date-select {
+  min-width: 80px;
+}
+.date-select-small {
+  min-width: 60px;
+}
+.date-label {
+  font-size: 14px;
+  color: #666;
+  white-space: nowrap;
+}
+.section-container {
+  display: flex;
+  align-items: center;
+  margin-bottom: 12px;
+}
+
+.form-section {
+  font-size: 14px;
+  color: #606266;
+  font-weight: 700;
+  min-width: 80px;
+  margin-top: -55px;
+  margin-left: 60px;
+}
+@media (max-width:48em) {
+  .section-container {
+    flex-direction: column;
+    align-items: flex-start;
+    gap: 8px;
+  }
+  .form-section {
+    padding-right: 0;
+    margin-left: 7%;
+  }
+}
+
+.custom-radio-group {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  margin-left: 2px !important;
+}
+.divider {
+  height: 1px;
+  background-color: #0080c7;
+  margin: 10px 27px;
+}
+.append-button{
+  background-color: #0080c7;
+  color: white;
+  margin-left: 100px;
+}
+</style>

+ 1 - 0
src/views/fcbi/survey/answer.vue

@@ -242,6 +242,7 @@ onMounted(() => loadSurveyData())
   padding: 5px;
   border: 1px solid #ddd;
   resize: vertical;
+  line-height: 1.7;
 }
 
 .back-button {

+ 19 - 4
src/views/fcbi/survey/decision.vue

@@ -1,7 +1,6 @@
 <!-- アンケートフォーム確認 -->
 <template>
   <div class="app-container">
-    <p>アンケートフォーム作成</p>
     <div class="form-container">
       <el-form ref="queryRef"
                :model="queryParams"
@@ -20,7 +19,7 @@
               disabled
           ></el-input>
         </el-form-item>
-        <div style=" padding-left: 29px;margin-top: -15px;">公開範囲</div>
+        <div class="form-range">公開範囲</div>
         <el-form-item label="FC" prop="brandCode" style="margin-left: 60px; display: flex; align-items: center; margin-top: 10px;">
           <div class="el-form-item__label" style="flex-shrink: 0; margin-right: 20px;"></div>
           <el-checkbox-group v-model="queryParams.brandCode" disabled>
@@ -144,7 +143,7 @@
             </div>
           </div>
         </el-form-item>
-        <div style="margin-left: 25px; margin-top: 15px;">自由作成フォーム</div>
+        <div class="form-free">自由作成フォーム</div>
 
         <div v-for="(question, index) in questions" :key="question.sortOrder" class="question-block">
           <el-form-item style="margin-left: 50px; margin-top: 3px;">
@@ -545,6 +544,8 @@ p {
 /* 地区标题样式 */
 .area-title {
   font-size: 14px;
+  color: #606266;
+  font-weight: 700;
   margin-left: 57px !important;
 }
 /* 移动端地区标题适配 */
@@ -633,7 +634,7 @@ p {
 /* 选项追加按钮样式 */
 .append-btn {
   display: inline-block;
-  background-color: black;
+  background-color: #0080c7;
   color: white;
   margin-left:18%;
 }
@@ -683,4 +684,18 @@ p {
     margin-right: 10px;
   }
 }
+.form-range{
+  padding-left: 29px;
+  margin-top: -15px;
+  font-size: 14px;
+  color: #606266;
+  font-weight: 700;
+}
+.form-free{
+  font-size: 14px;
+  color: #606266;
+  font-weight: 700;
+  margin-left: 25px;
+  margin-top: 15px;
+}
 </style>

+ 19 - 5
src/views/fcbi/survey/form.vue

@@ -1,7 +1,6 @@
 <!-- アンケートフォーム作成 -->
 <template>
   <div class="app-container">
-    <p>アンケートフォーム作成</p>
     <div class="form-container">
       <el-form ref="queryRef"
                :model="queryParams"
@@ -19,7 +18,7 @@
               :rows="2"
           ></el-input>
         </el-form-item>
-        <div style=" padding-left: 29px;margin-top: -15px;">公開範囲</div>
+        <div class="form-range">公開範囲</div>
         <PublicRange
             v-model="queryParams"
             :region-tree="regionTree"
@@ -130,7 +129,7 @@
             </div>
           </div>
         </el-form-item>
-        <div style="margin-left: 25px; margin-top: 15px;">自由作成フォーム</div>
+        <div class="form-free">自由作成フォーム</div>
 
         <div v-for="(question, index) in questions" :key="question.sortOrder" class="question-block">
           <el-form-item style="margin-left: 50px; margin-top: 3px;">
@@ -904,8 +903,9 @@ p {
 /* 表单区块标题样式(公開期間、エリア等标题) */
 .form-section {
   font-size: 14px;
-  font-weight: bold;
   margin: -10px 0 5px 27px;
+  color: #606266;
+  font-weight: 700;
 }
 /* 垂直排列的单选框组容器样式 */
 .radio-group-vertical {
@@ -1068,7 +1068,7 @@ p {
 /* 选项追加按钮样式 */
 .append-btn {
   display: inline-block;
-  background-color: black;
+  background-color: #0080c7;
   color: white;
   margin-left:18%;
 }
@@ -1118,4 +1118,18 @@ p {
     margin-right: 10px;
   }
 }
+.form-range{
+  padding-left: 29px;
+  margin-top: -15px;
+  font-size: 14px;
+  color: #606266;
+  font-weight: 700;
+}
+.form-free{
+  font-size: 14px;
+  color: #606266;
+  font-weight: 700;
+  margin-left: 25px;
+  margin-top: 15px;
+}
 </style>

+ 4 - 4
src/views/fcbi/survey/index.vue

@@ -13,9 +13,9 @@
                   clearable
                   maxlength="128" @keyup.enter="handleQuery"/>
       </el-form-item>
-      <el-form-item>
-        <el-button @click="surveyForm"  v-hasPermi="['fcbi:survey:form']" class="append-button">アンケート作成</el-button>
-      </el-form-item>
+<!--      <el-form-item>-->
+<!--        <el-button @click="surveyForm"  v-hasPermi="['fcbi:survey:form']" class="append-button">アンケート作成</el-button>-->
+<!--      </el-form-item>-->
       <el-row v-show="initLoadingCompleted" :gutter="10" class="mb8">
         <el-col :span="11">
           <el-form-item label="回答日付">
@@ -292,7 +292,7 @@ function formatPublicPeriod(row) {
 
     const start = formatToYmd(publicStartTime);
     const end = formatToYmd(publicEndTime);
-    return start && end ? `${start}~${end}` : (start || end || '');
+    return start && end ? `${start}${end}` : (start || end || '');
   }
 }