|
|
@@ -6,13 +6,13 @@
|
|
|
<PublicRange
|
|
|
v-model="queryParams"
|
|
|
:region-tree="regionTree"
|
|
|
- :yamada-fc-brand="yamada_fc_brand"
|
|
|
- :yamada-business-type="yamada_business_type"
|
|
|
+ :yamada-fc-brand="yamadaFcBrand"
|
|
|
+ :yamada-business-type="yamadaBusinessType"
|
|
|
@check-change="handleCheckChange"
|
|
|
/>
|
|
|
<div class="shop-name-section" style="padding-left: 58px;">
|
|
|
<label for="shopName" class="shop-name-label">店铺名</label>
|
|
|
- <input type="text" id="shopName" class="shop-name-input">
|
|
|
+ <input type="text" id="shopName" class="shop-name-input" v-model="queryParams.storeName">
|
|
|
</div>
|
|
|
<div class="btn-section" style="padding-left: 78px; margin-top: 25px;">
|
|
|
<button class="operate-btn" @click="handleExportCSV">CSV出力</button>
|
|
|
@@ -36,8 +36,8 @@ const surveyStore = useSurveyStore();
|
|
|
/**
|
|
|
* データ辞書から品牌と業務タイプのデータを取得します
|
|
|
*/
|
|
|
-const { yamada_fc_brand } = proxy.useDict('yamada_fc_brand');
|
|
|
-const { yamada_business_type } = proxy.useDict('yamada_business_type');
|
|
|
+const { yamada_fc_brand: yamadaFcBrand } = proxy.useDict('yamada_fc_brand');
|
|
|
+const { yamada_business_type: yamadaBusinessType } = proxy.useDict('yamada_business_type');
|
|
|
|
|
|
/**
|
|
|
* 地域ツリーデータと選択された地域コードの配列を保持します
|
|
|
@@ -53,7 +53,8 @@ const data = reactive({
|
|
|
queryParams: {
|
|
|
brandCode: [],
|
|
|
businessTypeCode: [],
|
|
|
- regions: []
|
|
|
+ regions: [],
|
|
|
+ storeName: ''
|
|
|
}
|
|
|
});
|
|
|
const { queryParams} = toRefs(data);
|
|
|
@@ -159,6 +160,17 @@ const collectSelectedRegions = (nodes, isParent = false) => {
|
|
|
* CSV形式でデータをエクスポートする関数です
|
|
|
*/
|
|
|
function handleExportCSV() {
|
|
|
+
|
|
|
+ const params = {
|
|
|
+ // FC
|
|
|
+ brandCodes: queryParams.value.brandCode,
|
|
|
+ // 業種
|
|
|
+ businessTypeCodes: queryParams.value.businessTypeCode,
|
|
|
+ // エリア
|
|
|
+ regionCodes: queryParams.value.regions.map(region => region.region_code),
|
|
|
+ // 店铺名
|
|
|
+ storeName: queryParams.value.storeName
|
|
|
+ };
|
|
|
ElMessageBox.confirm(
|
|
|
'CSV出力を実行しますか?',
|
|
|
'確認',
|
|
|
@@ -170,7 +182,7 @@ function handleExportCSV() {
|
|
|
)
|
|
|
.then(() => {
|
|
|
// 用户点击"はい"(是)时执行导出
|
|
|
- download('system/survey/exportCustomerCsv', {}, `ymdf_customer${new Date().getTime()}.csv`);
|
|
|
+ download('system/survey/exportCustomerCsv', params, `ymdf_customer${new Date().getTime()}.csv`);
|
|
|
})
|
|
|
.catch(() => {
|
|
|
// 用户点击"いいえ"(否)时不执行操作,自动关闭弹窗
|
|
|
@@ -181,6 +193,17 @@ function handleExportCSV() {
|
|
|
* DM宛名用のデータをエクスポートする関数です
|
|
|
*/
|
|
|
function handleExportDM() {
|
|
|
+
|
|
|
+ const params = {
|
|
|
+ // FC
|
|
|
+ brandCodes: queryParams.value.brandCode,
|
|
|
+ // 業種
|
|
|
+ businessTypeCodes: queryParams.value.businessTypeCode,
|
|
|
+ // エリア
|
|
|
+ regionCodes: queryParams.value.regions.map(region => region.region_code),
|
|
|
+ // 店铺名
|
|
|
+ storeName: queryParams.value.storeName
|
|
|
+ };
|
|
|
ElMessageBox.confirm(
|
|
|
'DM宛名出力を実行しますか?',
|
|
|
'確認',
|
|
|
@@ -192,7 +215,7 @@ function handleExportDM() {
|
|
|
)
|
|
|
.then(() => {
|
|
|
// 用户点击"はい"(是)时执行导出
|
|
|
- download('system/survey/exportCustomerDm', {}, `ymdf_customer${new Date().getTime()}.csv`);
|
|
|
+ download('system/survey/exportCustomerDm', params, `ymdf_customer${new Date().getTime()}.csv`);
|
|
|
})
|
|
|
.catch(() => {
|
|
|
// 用户点击"いいえ"(否)时不执行操作,自动关闭弹窗
|