Bladeren bron

Merge remote-tracking branch 'origin/lyz_dev' into lyz_dev

# Conflicts:
#	src/views/currency/list.vue
suwenjiang 1 week geleden
bovenliggende
commit
e798baa28d
4 gewijzigde bestanden met toevoegingen van 671 en 501 verwijderingen
  1. 71 0
      src/locales/en.json
  2. 71 0
      src/locales/zh.json
  3. 265 237
      src/views/currency/list.vue
  4. 264 264
      src/views/merchant/index.vue

+ 71 - 0
src/locales/en.json

@@ -95,5 +95,76 @@
       "discountAmountForGoods": "Discount Amount for Goods",
       "quantity": "Quantity"
     }
+  },
+  "currency":{
+    "currency": "Currency",
+    "pleaseEnterCurrencyNameOrSymbol": "Please enter the currency name or symbol",
+    "search": "Search",
+    "reset": "Reset",
+    "addNewCurrency": "Add New Currency",
+    "ID": "ID",
+    "currencyName": "Currency Name",
+    "currencySymbol": "Currency Symbol",
+    "createTime": "Creation Time",
+    "operation": "Operation",
+    "modify": "Modify",
+    "pleaseEnterCurrencyName": "Please enter the currency name",
+    "pleaseEnterCurrencySymbol": "Please enter the currency symbol",
+    "confirm": "Confirm",
+    "cancel": "Cancel"
+  },
+  "merchant":{
+    "merchantNumber": "Merchant Number",
+    "pleaseEnterMerchantNumber": "Please enter the merchant number",
+    "merchantName": "Merchant Name",
+    "pleaseEnterMerchantName": "Please enter the merchant name",
+    "status": "Status",
+    "enabledKey": "A",
+    "enabled": "Enabled",
+    "disabledKey": "N",
+    "disabled": "Disabled",
+    "search": "Search",
+    "reset": "Reset",
+    "addNewMerchant": "Add New Merchant",
+    "ID": "ID",
+    "contactPerson": "Contact Person",
+    "phoneNumber": "Phone Number",
+    "address": "Address",
+    "createTime": "Creation Time",
+    "operation": "Operation",
+    "modify": "Modify",
+    "delete": "Delete",
+    "merchantNumber": "Merchant Number",
+    "pleaseEnterMerchantNumberTip": "Please enter the merchant number, 5 - 30 characters. If not entered, the system will generate it automatically.",
+    "merchantType": "Merchant Type",
+    "pleaseSelectMerchantType": "Please select the merchant type",
+    "selectSuitableIndustryTip": "Tip: Select a suitable industry.",
+    "merchantName": "Merchant Name",
+    "pleaseEnterMerchantName": "Please enter the merchant name",
+    "merchantLogo": "Merchant Logo",
+    "clickToModifyLogoTip": "(Tip: Click the picture to modify.)",
+    "contactPerson": "Contact Person",
+    "pleaseEnterContactPersonName": "Please enter the contact person's name",
+    "contactPhone": "Contact Phone",
+    "pleaseEnterContactPhone": "Please enter the contact phone number",
+    "contactAddress": "Contact Address",
+    "pleaseEnterContactAddress": "Please enter the contact address",
+    "wxMiniAppId": "WeChat Mini Program appId",
+    "pleaseEnterWxMiniAppIdTip": "Please enter the WeChat Mini Program appId, 30 - 50 characters.",
+    "wxMiniAppSecret": "WeChat Mini Program appSecret",
+    "pleaseEnterWxMiniAppSecretTip": "Please enter the WeChat Mini Program appSecret, 30 - 50 characters.",
+    "wxOfficialAppId": "WeChat Official Account appId",
+    "wxOfficialAppSecret": "WeChat Official Account appSecret",
+    "remarkInfo": "Remark Information",
+    "pleaseEnterContent": "Please enter the content",
+    "status": "Status",
+    "enabledKey": "A",
+    "enabledLabel": "A",
+    "enabled": "Enabled",
+    "disabledKey": "N",
+    "disabledLabel": "N",
+    "disabled": "Disabled",
+    "confirm": "Confirm",
+    "cancel": "Cancel"
   }
 }

+ 71 - 0
src/locales/zh.json

@@ -89,5 +89,76 @@
       "discountAmountForGoods": "优惠金额",
       "quantity": "数量"
     }
+  },
+  "currency":{
+    "currency": "货币",
+    "pleaseEnterCurrencyNameOrSymbol": "请输货币名称/符号",
+    "search": "搜索",
+    "reset": "重置",
+    "addNewCurrency": "新增货币",
+    "ID": "ID",
+    "currencyName": "货币名称",
+    "currencySymbol": "货币符号",
+    "createTime": "创建时间",
+    "operation": "操作",
+    "modify": "修改",
+    "pleaseEnterCurrencyName": "请输入货币名称",
+    "pleaseEnterCurrencySymbol": "请输入货币符号",
+    "confirm": "确定",
+    "cancel": "取消"
+  },
+  "merchant":{
+    "merchantNumber": "商户号",
+    "pleaseEnterMerchantNumber": "请输入商户号",
+    "merchantName": "商户名称",
+    "pleaseEnterMerchantName": "请输入商户名称",
+    "status": "状态",
+    "enabledKey": "A",
+    "enabled": "启用",
+    "disabledKey": "N",
+    "disabled": "禁用",
+    "search": "搜索",
+    "reset": "重置",
+    "addNewMerchant": "新增商户",
+    "ID": "ID",
+    "contactPerson": "联系人",
+    "phoneNumber": "手机号",
+    "address": "地址",
+    "createTime": "创建时间",
+    "operation": "操作",
+    "modify": "修改",
+    "delete": "删除",
+    "merchantNumber": "商户号",
+    "pleaseEnterMerchantNumberTip": "请输入商户号,5 - 30个字符,未输入则系统自动生成",
+    "merchantType": "商户类型",
+    "pleaseSelectMerchantType": "请选择商户类型",
+    "selectSuitableIndustryTip": "提示:选择适合的行业",
+    "merchantName": "商户名称",
+    "pleaseEnterMerchantName": "请输入商户名称",
+    "merchantLogo": "商户logo",
+    "clickToModifyLogoTip": "(提示:点击图片修改)",
+    "contactPerson": "联系人",
+    "pleaseEnterContactPersonName": "请输入联系人姓名",
+    "contactPhone": "联系电话",
+    "pleaseEnterContactPhone": "请输入联系电话",
+    "contactAddress": "联系地址",
+    "pleaseEnterContactAddress": "请输入联系地址",
+    "wxMiniAppId": "微信小程序appId",
+    "pleaseEnterWxMiniAppIdTip": "请输入微信小程序appId,30 - 50个字符",
+    "wxMiniAppSecret": "微信小程序appSecret",
+    "pleaseEnterWxMiniAppSecretTip": "请输入微信小程序appSecret,30 - 50个字符",
+    "wxOfficialAppId": "微信公众号appId",
+    "wxOfficialAppSecret": "微信公众号appSecret",
+    "remarkInfo": "备注信息",
+    "pleaseEnterContent": "请输入内容",
+    "status": "状态",
+    "enabledKey": "A",
+    "enabledLabel": "A",
+    "enabled": "启用",
+    "disabledKey": "N",
+    "disabledLabel": "N",
+    "disabled": "禁用",
+    "confirm": "确定",
+    "cancel": "取消"
   }
 }

+ 265 - 237
src/views/currency/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container">
+     <div class="app-container">
     <el-form
       :model="queryParams"
       class="main-search"
@@ -9,21 +9,27 @@
       v-show="showSearch"
       label-width="68px"
     >
-      <el-form-item label="货币" prop="name">
+      <el-form-item :label="$t('currency.currency')" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="请输货币名称/符号"
+          :placeholder="$t('currency.pleaseEnterCurrencyNameOrSymbol')"
           clearable
           style="width: 240px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
-          搜索
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+        >
+          {{ $t('currency.search') }}
+        </el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
+          {{ $t('currency.reset') }}
         </el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
         <el-button
           type="primary"
           plain
@@ -32,11 +38,10 @@
           @click="handleAdd"
           v-hasPermi="['store:add']"
         >
-          新增货币
+          {{ $t('currency.addNewCurrency') }}
         </el-button>
       </el-form-item>
     </el-form>
-
     <el-table
       ref="tables"
       v-loading="loading"
@@ -45,12 +50,11 @@
       :default-sort="defaultSort"
       @sort-change="handleSortChange"
     >
-      <el-table-column label="ID" prop="id" width="55" />
-      <el-table-column label="货币名称" align="center" prop="name" />
-      <el-table-column label="货币符号" align="center" prop="symbol" />
-
+      <el-table-column :label="$t('currency.ID')" prop="id" width="55" />
+      <el-table-column :label="$t('currency.currencyName')" align="center" prop="name" />
+      <el-table-column :label="$t('currency.currencySymbol')" align="center" prop="symbol" />
       <el-table-column
-        label="创建时间"
+        :label="$t('currency.createTime')"
         align="center"
         prop="createTime"
         sortable="custom"
@@ -61,21 +65,24 @@
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
-
       <el-table-column
-        label="操作"
+        :label="$t('currency.operation')"
         align="center"
         width="180"
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">
-            修改
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >
+            {{ $t('currency.modify') }}
           </el-button>
         </template>
       </el-table-column>
     </el-table>
-
     <pagination
       v-show="total > 0"
       :total="total"
@@ -83,7 +90,6 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
     <!-- 添加或修改对话框 -->
     <el-dialog
       :title="title"
@@ -95,243 +101,265 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="货币名称" prop="name">
-              <el-input v-model="form.name" placeholder="请输入货币名称" maxlength="30" />
+            <el-form-item :label="$t('currency.currencyName')" prop="name">
+              <el-input
+                v-model="form.name"
+                :placeholder="$t('currency.pleaseEnterCurrencyName')"
+                maxlength="30"
+              />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="24">
-            <el-form-item label="货币符号" prop="name">
-              <el-input v-model="form.symbol" placeholder="请输入货币符号" maxlength="30" />
+            <el-form-item :label="$t('currency.currencySymbol')" prop="symbol">
+              <el-input
+                v-model="form.symbol"
+                :placeholder="$t('currency.pleaseEnterCurrencySymbol')"
+                maxlength="30"
+              />
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确定</el-button>
-        <el-button @click="cancel">取消</el-button>
+        <el-button type="primary" @click="submitForm">{{ $t('currency.confirm') }}</el-button>
+        <el-button @click="cancel">{{ $t('currency.cancel') }}</el-button>
       </div>
     </el-dialog>
     <FuintQrCode :showDialog="openQrCode" :qr="qr" @closeDialog="closeDialog" />
   </div>
-</template>
+  </template>
 
-<script>
-import FuintQrCode from '@/components/Fuint/QrCode'
-import { getToken } from '@/utils/auth'
-import { saveCurrency, getCurrencyList, updateCurrency } from '@/api/currency'
-export default {
-  name: 'StoreList',
-  components: {
-    FuintQrCode
-  },
-  data() {
-    return {
-      // 二维码
-      qr: null,
-      // 二维码对话框
-      openQrCode: false,
-      // 遮罩层
-      loading: true,
-      // 标题
-      title: '',
-      // 选中数组
-      ids: [],
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 表格数据
-      list: [],
-      // 是否显示弹出层
-      open: false,
-      // 日期范围
-      dateRange: [],
-      // 默认排序
-      defaultSort: { prop: 'operTime', order: 'descending' },
-      // 表单参数
-      form: {
-        name: '',
-        symbol: ''
-      },
-      // 微信支付证书
-      wxCertPath: '',
-      // 上传地址
-      uploadAction: process.env.VUE_APP_SERVER_URL + '/backendApi/file/upload',
-      // 隐藏上传
-      hideUpload: false,
-      // 上传文件列表
-      uploadFiles: [],
-      uploadHeader: { 'Access-Token': getToken() },
-      merchantOptions: [],
-      // 图片根目录
-      imagePath: '',
-      // 查询参数
-      queryParams: {
-        page: 1,
-        pageSize: 10,
-        name: ''
-      },
-      // 表单校验
-      rules: {
-        name: [{ required: true, message: '货币名称不能为空', trigger: 'blur' }],
-        symbol: [{ required: true, message: '货币符号不能为空', trigger: 'blur' }]
-      }
-    }
-  },
-  created() {
-    this.getList()
-  },
-  methods: {
-    // 查询列表
-    getList() {
-      this.loading = true
-      getCurrencyList(this.queryParams).then((response) => {
-        console.log('res;', response)
-        this.list = response.data
-        this.total = response.total
-        this.loading = false
-      })
-    },
-    // 搜索按钮操作
-    handleQuery() {
-      this.queryParams.page = 1
-      this.getList()
-    },
-    // 重置按钮操作
-    resetQuery() {
-      this.dateRange = []
-      this.resetForm('queryForm')
-      this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
-      this.handleQuery()
-    },
-    // 状态修改
-    handleStatusChange(row) {
-      let text = row.status == 'A' ? '启用' : '禁用'
-      this.$modal
-        .confirm('确认要' + text + '"' + row.name + '"店铺吗?')
-        .then(function () {
-          return updateStoreStatus(row.id, row.status)
-        })
-        .then(() => {
-          this.$modal.msgSuccess(text + '成功')
-        })
-        .catch(function () {
-          row.status = row.status === 'N' ? 'A' : 'N'
-        })
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.operId)
-      this.multiple = !selection.length
+  <script>
+  import FuintQrCode from "@/components/Fuint/QrCode";
+  import { getToken } from "@/utils/auth";
+  import {
+    getStoreList,
+    updateStoreStatus,
+    getStoreInfo,
+    saveStore,
+  } from "@/api/store";
+  import {saveCurrency,getCurrencyList} from '@/api/currency'
+  export default {
+    name: "StoreList",
+    components: {
+      FuintQrCode,
     },
-    // 排序触发事件
-    handleSortChange(column, prop, order) {
-      this.queryParams.orderByColumn = column.prop
-      this.queryParams.isAsc = column.order
-      this.getList()
-    },
-    // 新增按钮操作
-    handleAdd() {
-      this.reset()
-      this.open = true
-      this.title = '新增货币'
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: '',
-        name: '',
-        symbol: ''
-      }
-      this.resetForm('form')
+    data() {
+      return {
+        // 二维码
+        qr: null,
+        // 二维码对话框
+        openQrCode: false,
+        // 遮罩层
+        loading: true,
+        // 标题
+        title: "",
+        // 选中数组
+        ids: [],
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 表格数据
+        list: [],
+        // 是否显示弹出层
+        open: false,
+        // 日期范围
+        dateRange: [],
+        // 默认排序
+        defaultSort: { prop: "operTime", order: "descending" },
+        // 表单参数
+        form: {
+          name: "",
+          symbol:''
+        },
+        // 微信支付证书
+        wxCertPath: "",
+        // 上传地址
+        uploadAction: process.env.VUE_APP_SERVER_URL + "/backendApi/file/upload",
+        // 隐藏上传
+        hideUpload: false,
+        // 上传文件列表
+        uploadFiles: [],
+        uploadHeader: { "Access-Token": getToken() },
+        merchantOptions: [],
+        // 图片根目录
+        imagePath: "",
+        // 查询参数
+        queryParams: {
+          page: 1,
+          pageSize: 10,
+          name: "",
+        },
+        // 表单校验
+        rules: {
+          name: [
+            { required: true, message: "货币名称不能为空", trigger: "blur" },
+
+          ],
+          symbol:[
+            { required: true, message: "货币符号不能为空", trigger: "blur" },
+          ]
+        },
+      };
     },
-    // 取消按钮
-    cancel() {
-      this.open = false
-      this.reset()
+    created() {
+      this.getList();
     },
-    // 提交按钮
-    submitForm: function () {
-      this.$refs['form'].validate((valid) => {
-        if (valid) {
-          if (this.form.id) {
-            updateCurrency(this.form).then((response) => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.getList()
-            })
-          } else {
-            saveCurrency(this.form).then((response) => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.getList()
-            })
+    methods: {
+      // 查询列表
+      getList() {
+        this.loading = true;
+        getCurrencyList(this.queryParams).then(
+          (response) => {
+            console.log('res;',response)
+            this.list = response.data
+            this.total = response.total
+            this.loading = false;
           }
-          // if (this.form.id) {
-          //   saveStore(this.form).then((response) => {
-          //     this.$modal.msgSuccess("修改成功");
-          //     this.open = false;
-          //     this.getList();
-          //   });
-          // } else {
-          //   saveStore(this.form).then((response) => {
-          //     this.$modal.msgSuccess("新增成功");
-          //     this.open = false;
-          //     this.getList();
-          //   });
-          // }
-        }
-      })
-    },
-    // 二维码
-    handleQrCode(row) {
-      this.qr = { type: 'store', id: row.id }
-      this.openQrCode = true
-    },
-    // 关闭二维码
-    closeDialog() {
-      this.openQrCode = false
-    },
-    // 修改按钮操作
-    handleUpdate(row) {
-      this.reset()
+        );
+      },
+      // 搜索按钮操作
+      handleQuery() {
+        this.queryParams.page = 1;
+        this.getList();
+      },
+      // 重置按钮操作
+      resetQuery() {
+        this.dateRange = [];
+        this.resetForm("queryForm");
+        this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
+        this.handleQuery();
+      },
+      // 状态修改
+      handleStatusChange(row) {
+        let text = row.status == "A" ? "启用" : "禁用";
+        this.$modal
+          .confirm("确认要" + text + '"' + row.name + '"店铺吗?')
+          .then(function () {
+            return updateStoreStatus(row.id, row.status);
+          })
+          .then(() => {
+            this.$modal.msgSuccess(text + "成功");
+          })
+          .catch(function () {
+            row.status = row.status === "N" ? "A" : "N";
+          });
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map((item) => item.operId);
+        this.multiple = !selection.length;
+      },
+      // 排序触发事件
+      handleSortChange(column, prop, order) {
+        this.queryParams.orderByColumn = column.prop;
+        this.queryParams.isAsc = column.order;
+        this.getList();
+      },
+      // 新增按钮操作
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.title = "新增货币";
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          id: "",
+          name: "",
+          symbol:'',
+        };
+        this.resetForm("form");
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 提交按钮
+      submitForm: function () {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if(this.form.id){
+              updateCurrency(this.form).then((response) => {
+                this.$modal.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
+              })
+            }else{
+                saveCurrency(this.form).then(response => {
+                    this.$modal.msgSuccess("新增成功");
+                    this.open = false;
+                    this.getList();
+                });
+            }
+            // if (this.form.id) {
+            //   saveStore(this.form).then((response) => {
+            //     this.$modal.msgSuccess("修改成功");
+            //     this.open = false;
+            //     this.getList();
+            //   });
+            // } else {
+            //   saveStore(this.form).then((response) => {
+            //     this.$modal.msgSuccess("新增成功");
+            //     this.open = false;
+            //     this.getList();
+            //   });
+            // }
+          }
+        });
+      },
+      // 二维码
+      handleQrCode(row) {
+        this.qr = { type: "store", id: row.id };
+        this.openQrCode = true;
+      },
+      // 关闭二维码
+      closeDialog() {
+        this.openQrCode = false;
+      },
+      // 修改按钮操作
+      handleUpdate(row) {
+        this.reset();
 
-      this.title = '编辑货币'
-      this.open = true
-      const { id, name, symbol } = row
-      this.form = { id, name, symbol }
-    },
+        this.title = "编辑货币";
+        this.open = true;
+        const {id,name,symbol} = row
+        this.form={id,name,symbol}
 
-    handleUploadSuccess(file) {
-      this.form.logo = file.data.fileName
-    },
-    handleUploadLicenseSuccess(file) {
-      this.form.license = file.data.fileName
+      },
+
+      handleUploadSuccess(file) {
+        this.form.logo = file.data.fileName;
+      },
+      handleUploadLicenseSuccess(file) {
+        this.form.license = file.data.fileName;
+      },
+      handleUploadCertSuccess(file) {
+        this.form.wxCertPath = file.data.fileName;
+        this.wxCertPath = file.data.fileName;
+      },
     },
-    handleUploadCertSuccess(file) {
-      this.form.wxCertPath = file.data.fileName
-      this.wxCertPath = file.data.fileName
-    }
+  };
+  </script>
+  <style scoped>
+  .common-dialog >>> .el-upload--picture-card {
+    width: 60px;
+    height: 50px;
+    line-height: 60px;
+  }
+  .upload-cert >>> .el-upload {
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+  }
+  .upload-cert .file-name {
+    width: 700px;
+    text-align: left;
   }
-}
-</script>
-<style scoped>
-.common-dialog >>> .el-upload--picture-card {
-  width: 60px;
-  height: 50px;
-  line-height: 60px;
-}
-.upload-cert >>> .el-upload {
-  width: 20px;
-  height: 20px;
-  line-height: 20px;
-}
-.upload-cert .file-name {
-  width: 700px;
-  text-align: left;
-}
-</style>
+  </style>

+ 264 - 264
src/views/merchant/index.vue

@@ -1,117 +1,117 @@
 <template>
   <div class="app-container">
     <el-form
-      :model="queryParams"
-      ref="queryForm"
-      size="small"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
+        :model="queryParams"
+        ref="queryForm"
+        size="small"
+        :inline="true"
+        v-show="showSearch"
+        label-width="68px"
     >
-      <el-form-item label="商户号" prop="no">
-        <el-input
-          v-model="queryParams.no"
-          placeholder="请输入商户号"
-          clearable
-          style="width: 150px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="商户名称" prop="name">
-        <el-input
-          v-model="queryParams.name"
-          placeholder="请输入商户名称"
-          clearable
-          style="width: 200px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 120px">
-          <el-option key="A" label="启用" value="A" />
-          <el-option key="N" label="禁用" value="N" />
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
-          搜索
-        </el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['merchant:index']"
-        >
-          新增商户
-        </el-button>
-      </el-form-item>
+        <el-form-item :label="$t('merchant.merchantNumber')" prop="no">
+            <el-input
+                v-model="queryParams.no"
+                :placeholder="$t('merchant.pleaseEnterMerchantNumber')"
+                clearable
+                style="width: 150px"
+                @keyup.enter.native="handleQuery"
+            />
+        </el-form-item>
+        <el-form-item :label="$t('merchant.merchantName')" prop="name">
+            <el-input
+                v-model="queryParams.name"
+                :placeholder="$t('merchant.pleaseEnterMerchantName')"
+                clearable
+                style="width: 200px"
+                @keyup.enter.native="handleQuery"
+            />
+        </el-form-item>
+        <el-form-item :label="$t('merchant.status')" prop="status">
+            <el-select v-model="queryParams.status" :placeholder="$t('merchant.status')" clearable style="width: 120px">
+                <el-option :key="$t('merchant.enabledKey')" :label="$t('merchant.enabled')" :value="A" />
+                <el-option :key="$t('merchant.disabledKey')" :label="$t('merchant.disabled')" :value="N" />
+            </el-select>
+        </el-form-item>
+        <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
+                {{ $t('merchant.search') }}
+            </el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('merchant.reset') }}</el-button>
+            <el-button
+                type="primary"
+                plain
+                icon="el-icon-plus"
+                size="mini"
+                @click="handleAdd"
+                v-hasPermi="['merchant:index']"
+            >
+                {{ $t('merchant.addNewMerchant') }}
+            </el-button>
+        </el-form-item>
     </el-form>
 
     <el-table
-      ref="tables"
-      v-loading="loading"
-      :data="list"
-      @selection-change="handleSelectionChange"
-      :default-sort="defaultSort"
-      @sort-change="handleSortChange"
+        ref="tables"
+        v-loading="loading"
+        :data="list"
+        @selection-change="handleSelectionChange"
+        :default-sort="defaultSort"
+        @sort-change="handleSortChange"
     >
-      <el-table-column label="ID" prop="id" width="55">
-        <template slot-scope="scope">
-          <span>{{ showIdLastFour(scope.row.id) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="商户号" align="center" prop="no" />
-      <el-table-column label="商户名称" align="center" prop="name" />
-      <el-table-column label="联系人" align="center" prop="contact" />
-      <el-table-column label="手机号" align="center" prop="phone" />
-      <el-table-column label="地址" align="center" prop="address" />
-      <el-table-column
-        label="创建时间"
-        align="center"
-        prop="createTime"
-        sortable="custom"
-        :sort-orders="['descending', 'ascending']"
-        width="180"
-      >
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" prop="status">
-        <template slot-scope="scope">
-          <el-switch
-            v-model="scope.row.status"
-            active-value="A"
-            inactive-value="N"
-            @change="handleStatusChange(scope.row)"
-          ></el-switch>
-        </template>
-      </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            v-hasPermi="['merchant:index']"
-            @click="handleUpdate(scope.row)"
-          >
-            修改
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            v-hasPermi="['merchant:index']"
-            @click="handleDelete(scope.row)"
-          >
-            删除
-          </el-button>
-        </template>
-      </el-table-column>
+        <el-table-column :label="$t('merchant.ID')" prop="id" width="55">
+            <template slot-scope="scope">
+                <span>{{ showIdLastFour(scope.row.id) }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('merchant.merchantNumber')" align="center" prop="no" />
+        <el-table-column :label="$t('merchant.merchantName')" align="center" prop="name" />
+        <el-table-column :label="$t('merchant.contactPerson')" align="center" prop="contact" />
+        <el-table-column :label="$t('merchant.phoneNumber')" align="center" prop="phone" />
+        <el-table-column :label="$t('merchant.address')" align="center" prop="address" />
+        <el-table-column
+            :label="$t('merchant.createTime')"
+            align="center"
+            prop="createTime"
+            sortable="custom"
+            :sort-orders="['descending', 'ascending']"
+            width="180"
+        >
+            <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.createTime) }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('merchant.status')" align="center" prop="status">
+            <template slot-scope="scope">
+                <el-switch
+                    v-model="scope.row.status"
+                    active-value="A"
+                    inactive-value="N"
+                    @change="handleStatusChange(scope.row)"
+                ></el-switch>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('merchant.operation')" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+                <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-edit"
+                    v-hasPermi="['merchant:index']"
+                    @click="handleUpdate(scope.row)"
+                >
+                    {{ $t('merchant.modify') }}
+                </el-button>
+                <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    v-hasPermi="['merchant:index']"
+                    @click="handleDelete(scope.row)"
+                >
+                    {{ $t('merchant.delete') }}
+                </el-button>
+            </template>
+        </el-table-column>
     </el-table>
 
     <pagination
@@ -122,165 +122,165 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改对话框 -->
-    <el-dialog
-      :title="title"
-      :visible.sync="open"
-      class="common-dialog"
-      width="800px"
-      append-to-body
+        <!-- 添加或修改对话框 -->
+        <el-dialog
+        :title="title"
+        :visible.sync="open"
+        class="common-dialog"
+        width="800px"
+        append-to-body
     >
-      <el-form ref="form" :model="form" :rules="rules" label-width="180px">
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="商户号" prop="no">
-              <el-input
-                v-model="form.no"
-                placeholder="请输入商户号,5-30个字符,未输入则系统自动生成"
-                maxlength="30"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="商户类型" prop="type">
-              <el-select
-                class="input"
-                v-model="form.type"
-                clearable
-                placeholder="请选择商户类型"
-                style="width: 300px"
-              >
-                <el-option
-                  v-for="item in typeOptions"
-                  :key="item.key"
-                  :label="item.name"
-                  :value="item.key"
-                ></el-option>
-              </el-select>
-              <div class="form-tips">提示:选择适合的行业</div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="商户名称" prop="name">
-              <el-input v-model="form.name" placeholder="请输入商户名称" maxlength="30" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="9">
-            <el-form-item label="商户logo" prop="logo">
-              <el-upload
-                :action="uploadAction"
-                list-type="picture-card"
-                :class="{ hide: hideUpload }"
-                :file-list="uploadFiles"
-                :auto-upload="true"
-                :show-file-list="false"
-                :headers="uploadHeader"
-                :on-success="handleUploadSuccess"
-              >
-                <img v-if="form.logo" :src="imagePath + form.logo" class="list-img" />
-                <i v-if="!form.logo" class="el-icon-plus"></i>
-              </el-upload>
-            </el-form-item>
-          </el-col>
-          <p class="form-tips">(提示:点击图片修改)</p>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="联系人" prop="contact">
-              <el-input v-model="form.contact" placeholder="请输入联系人姓名" maxlength="30" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="联系电话" prop="contactPhone">
-              <el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="30" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="联系地址" prop="address">
-              <el-input v-model="form.address" placeholder="请输入联系地址" maxlength="200" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="微信小程序appId" prop="wxAppId">
-              <el-input
-                v-model="form.wxAppId"
-                placeholder="请输入微信小程序appId,30-50个字符"
-                maxlength="50"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="微信小程序appSecret" prop="wxAppSecret">
-              <el-input
-                v-model="form.wxAppSecret"
-                placeholder="请输入微信小程序appSecret,30-50个字符"
-                maxlength="50"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="微信公众号appId" prop="wxOfficialAppId">
-              <el-input
-                v-model="form.wxOfficialAppId"
-                placeholder="请输入微信小程序appId,30-50个字符"
-                maxlength="50"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="微信公众号appSecret" prop="wxOfficialAppSecret">
-              <el-input
-                v-model="form.wxOfficialAppSecret"
-                placeholder="请输入微信小程序appSecret,30-50个字符"
-                maxlength="50"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="备注信息">
-              <el-input
-                v-model="form.description"
-                type="textarea"
-                placeholder="请输入内容"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="状态">
-              <el-radio-group v-model="form.status">
-                <el-radio key="A" label="A" value="A">启用</el-radio>
-                <el-radio key="N" label="N" value="N">禁用</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确定</el-button>
-        <el-button @click="cancel">取消</el-button>
-      </div>
+        <el-form ref="form" :model="form" :rules="rules" label-width="180px">
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.merchantNumber')" prop="no">
+                        <el-input
+                            v-model="form.no"
+                            :placeholder="$t('merchant.pleaseEnterMerchantNumberTip')"
+                            maxlength="30"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.merchantType')" prop="type">
+                        <el-select
+                            class="input"
+                            v-model="form.type"
+                            clearable
+                            :placeholder="$t('merchant.pleaseSelectMerchantType')"
+                            style="width: 300px"
+                        >
+                            <el-option
+                                v-for="item in typeOptions"
+                                :key="item.key"
+                                :label="item.name"
+                                :value="item.key"
+                            ></el-option>
+                        </el-select>
+                        <div class="form-tips">{{ $t('merchant.selectSuitableIndustryTip') }}</div>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.merchantName')" prop="name">
+                        <el-input v-model="form.name" :placeholder="$t('merchant.pleaseEnterMerchantName')" maxlength="30" />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="9">
+                    <el-form-item :label="$t('merchant.merchantLogo')" prop="logo">
+                        <el-upload
+                            :action="uploadAction"
+                            list-type="picture-card"
+                            :class="{ hide: hideUpload }"
+                            :file-list="uploadFiles"
+                            :auto-upload="true"
+                            :show-file-list="false"
+                            :headers="uploadHeader"
+                            :on-success="handleUploadSuccess"
+                        >
+                            <img v-if="form.logo" :src="imagePath + form.logo" class="list-img" />
+                            <i v-if="!form.logo" class="el-icon-plus"></i>
+                        </el-upload>
+                    </el-form-item>
+                </el-col>
+                <p class="form-tips">{{ $t('merchant.clickToModifyLogoTip') }}</p>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.contactPerson')" prop="contact">
+                        <el-input v-model="form.contact" :placeholder="$t('merchant.pleaseEnterContactPersonName')" maxlength="30" />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.contactPhone')" prop="contactPhone">
+                        <el-input v-model="form.phone" :placeholder="$t('merchant.pleaseEnterContactPhone')" maxlength="30" />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.contactAddress')" prop="address">
+                        <el-input v-model="form.address" :placeholder="$t('merchant.pleaseEnterContactAddress')" maxlength="200" />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.wxMiniAppId')" prop="wxAppId">
+                        <el-input
+                            v-model="form.wxAppId"
+                            :placeholder="$t('merchant.pleaseEnterWxMiniAppIdTip')"
+                            maxlength="50"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.wxMiniAppSecret')" prop="wxAppSecret">
+                        <el-input
+                            v-model="form.wxAppSecret"
+                            :placeholder="$t('merchant.pleaseEnterWxMiniAppSecretTip')"
+                            maxlength="50"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.wxOfficialAppId')" prop="wxOfficialAppId">
+                        <el-input
+                            v-model="form.wxOfficialAppId"
+                            :placeholder="$t('merchant.pleaseEnterWxMiniAppIdTip')"
+                            maxlength="50"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.wxOfficialAppSecret')" prop="wxOfficialAppSecret">
+                        <el-input
+                            v-model="form.wxOfficialAppSecret"
+                            :placeholder="$t('merchant.pleaseEnterWxMiniAppSecretTip')"
+                            maxlength="50"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.remarkInfo')">
+                        <el-input
+                            v-model="form.description"
+                            type="textarea"
+                            :placeholder="$t('merchant.pleaseEnterContent')"
+                        ></el-input>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('merchant.status')">
+                        <el-radio-group v-model="form.status">
+                            <el-radio :key="$t('merchant.enabledKey')" :label="$t('merchant.enabledLabel')" value="A">{{ $t('merchant.enabled') }}</el-radio>
+                            <el-radio :key="$t('merchant.disabledKey')" :label="$t('merchant.disabledLabel')" value="N">{{ $t('merchant.disabled') }}</el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitForm">{{ $t('merchant.confirm') }}</el-button>
+            <el-button @click="cancel">{{ $t('merchant.cancel') }}</el-button>
+        </div>
     </el-dialog>
   </div>
 </template>