Bladeren bron

Merge branch 'lyz_dev' of http://1.94.207.143:3000/chongqing/store-admin into lyz_dev

Mcal 1 week geleden
bovenliggende
commit
771c1d6c54

+ 1 - 1
src/locales/en.json

@@ -231,7 +231,7 @@
     "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.",
+    "pleaseEnterMerchantNumberTip": "Please enter the merchant number, 5 - 30 characters",
     "merchantType": "Merchant Type",
     "pleaseSelectMerchantType": "Please select the merchant type",
     "selectSuitableIndustryTip": "Tip: Select a suitable industry.",

+ 1 - 1
src/locales/ru.json

@@ -225,7 +225,7 @@
         "operation": "Операция",
         "modify": "Изменить",
         "delete": "Удалить",
-        "pleaseEnterMerchantNumberTip": "Пожалуйста, введите номер торговца (5-30 символов), если не введен, будет сгенерирован автоматически",
+        "pleaseEnterMerchantNumberTip": "Введите номер продавца, от 5 до 30 символов",
         "merchantType": "Тип торговца",
         "pleaseSelectMerchantType": "Пожалуйста, выберите тип торговца",
         "selectSuitableIndustryTip": "Подсказка: выберите подходящую отрасль",

+ 1 - 1
src/locales/sr.json

@@ -286,7 +286,7 @@
     "modify": "Izmeni",
     "delete": "Obriši",
     "merchantNumber": "Broj trgovca",
-    "pleaseEnterMerchantNumberTip": "Unesite broj trgovca, 5 - 30 karaktera, ako nije uneto, sistem će automatski generisati",
+    "pleaseEnterMerchantNumberTip": "Unesite broj trgovca, 5 - 30 karaktera",
     "merchantType": "Tip trgovca",
     "pleaseSelectMerchantType": "Izaberite tip trgovca",
     "selectSuitableIndustryTip": "Napomena: izaberite odgovarajuću industriju",

+ 1 - 1
src/locales/zh.json

@@ -227,7 +227,7 @@
     "modify": "修改",
     "delete": "删除",
     "merchantNumber": "商户号",
-    "pleaseEnterMerchantNumberTip": "请输入商户号,5 - 30个字符,未输入则系统自动生成",
+    "pleaseEnterMerchantNumberTip": "请输入商户号,5 - 30个字符",
     "merchantType": "商户类型",
     "pleaseSelectMerchantType": "请选择商户类型",
     "selectSuitableIndustryTip": "提示:选择适合的行业",

+ 4 - 5
src/views/goods/cate/index.vue

@@ -92,7 +92,6 @@
       <el-table-column :label="$t('goodList.Name')" align="center" prop="name" />
       <el-table-column :label="$t('goodList.image')" align="center" width="200">
         <template slot-scope="scope">
-          <!-- imagePath +  -->
           <img class="list-img" :src="scope.row.logo" />
         </template>
       </el-table-column>
@@ -224,7 +223,7 @@
                 :headers="uploadHeader"
                 :on-success="handleUploadSuccess"
               >
-                <img v-if="this.form.logo" :src="this.form.logo" class="list-img" />
+                <img v-if="form.logo" :src="form.logo" class="list-img" />
                 <i class="el-icon-plus"></i>
               </el-upload>
             </el-form-item>
@@ -365,12 +364,12 @@ export default {
     handleStatusChange(row) {
       let text = row.status == 'A' ? this.$t('goodList.enable') : this.$t('goodList.disable')
       this.$modal
-        .confirm(this.$t('goodList.confirmGoods', { text: text, name: row.name }))  
+        .confirm(this.$t('goodList.confirmGoods', { text: text, name: row.name }))
         .then(function () {
           return updateGoodsCateStatus(row.id, row.status)
         })
         .then(() => {
-          this.$modal.msgSuccess(this.$t('goodList.success', { text: text }))  
+          this.$modal.msgSuccess(this.$t('goodList.success', { text: text }))
         })
         .catch(function () {
           row.status = row.status === 'N' ? 'A' : 'N'
@@ -441,7 +440,7 @@ export default {
       const id = row.id || this.ids
       getGoodsCateInfo(id).then((response) => {
         this.form = response.data.cateInfo
-        this.uploadFiles = [{ url: response.data.imagePath + this.form.logo, status: 'finished' }]
+        this.uploadFiles = [{ url: this.form.logo, status: 'finished' }]
         this.open = true
         this.title = this.$t('goodList.editProductCategory')
       })

+ 3 - 4
src/views/goods/goods/goodsForm.vue

@@ -87,7 +87,6 @@
               </el-row> -->
               <el-row>
                 <el-col :span="24">
-                  {{ uploadFiles }}
                   <el-form-item :label="$t('goodList.ProductImage')" prop="images">
                     <el-upload
                       class="form__head-icon-upload"
@@ -522,15 +521,15 @@ export default {
             }
           })
           if (!isValid1) {
-            app.$modal.alert(this.$t('goodList.skuLength'))  
+            app.$modal.alert(this.$t('goodList.skuLength'))
             return false
           }
           if (!isValid1) {
-            app.$modal.alert(this.$t('goodList.inventory'))  
+            app.$modal.alert(this.$t('goodList.inventory'))
             return false
           }
           if (!isValid2) {
-            app.$modal.alert(this.$t('goodList.price'))  
+            app.$modal.alert(this.$t('goodList.price'))
             return false
           }
         }

+ 278 - 246
src/views/merchant/index.vue

@@ -6,7 +6,7 @@
         size="small"
         :inline="true"
         v-show="showSearch"
-        
+        label-width="68px"
     >
         <el-form-item :label="$t('merchant.merchantNumber')" prop="no">
             <el-input
@@ -27,9 +27,9 @@
             />
         </el-form-item>
         <el-form-item :label="$t('merchant.status')" prop="status">
-            <el-select v-model="queryParams.status" :placeholder="$t('merchant.status')" clearable >
-                <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 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>
@@ -58,60 +58,64 @@
         :default-sort="defaultSort"
         @sort-change="handleSortChange"
     >
-        <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-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 +126,193 @@
       @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="$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-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="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>
@@ -351,36 +383,36 @@ export default {
       },
       rules: {
         type: [
-            { 
-                required: true, 
-                message: this.$t('merchant.merchantNumberRequired'), 
-                trigger: 'blur' 
+            {
+                required: true,
+                message: this.$t('merchant.merchantNumberRequired'),
+                trigger: 'blur'
             }
         ],
         no: [
-            { 
-                required: true, 
-                message: this.$t('merchant.merchantNumberRequired'), 
-                trigger: 'blur' 
+            {
+                required: true,
+                message: this.$t('merchant.merchantNumberRequired'),
+                trigger: 'blur'
             },
-            { 
-                min: 5, 
-                max: 30, 
-                message: this.$t('merchant.merchantNumberLengthRange'), 
-                trigger: 'blur' 
+            {
+                min: 5,
+                max: 30,
+                message: this.$t('merchant.merchantNumberLengthRange'),
+                trigger: 'blur'
             }
         ],
         name: [
-            { 
-                required: true, 
-                message: this.$t('merchant.merchantNameRequired'), 
-                trigger: 'blur' 
+            {
+                required: true,
+                message: this.$t('merchant.merchantNameRequired'),
+                trigger: 'blur'
             },
-            { 
-                min: 2, 
-                max: 30, 
-                message: this.$t('merchant.merchantNameLengthRange'), 
-                trigger: 'blur' 
+            {
+                min: 2,
+                max: 30,
+                message: this.$t('merchant.merchantNameLengthRange'),
+                trigger: 'blur'
             }
         ]
     }
@@ -392,14 +424,14 @@ export default {
   methods: {
     // 查询日志
     getList() {
-        this.loading = true;
-        getMerchantList(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
-            this.list = response.data.dataList.content;
-            this.total = response.data.dataList.totalElements;
-            this.imagePath = response.data.imagePath;
-            this.typeOptions = response.data.typeList;
-            this.loading = false;
-        });
+      this.loading = true
+      getMerchantList(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+        this.list = response.data.dataList.content
+        this.total = response.data.dataList.totalElements
+        this.imagePath = response.data.imagePath
+        this.typeOptions = response.data.typeList
+        this.loading = false
+      })
     },
     // 搜索按钮操作
     handleQuery() {

+ 8 - 2
src/views/order/detail.vue

@@ -35,9 +35,11 @@
             </el-col>
           </el-row>
           <el-row class="row">
-            <el-col :span="8">
+            <el-col :span="24">
               <span class="head">{{ $t('orderList.detail.remarkInfo') }}:</span>
-              <span class="control-label">{{ orderInfo.remark ? orderInfo.remark : '-' }}</span>
+              <span class="control-label element">
+                {{ orderInfo.remark ? orderInfo.remark : '-' }}
+              </span>
             </el-col>
           </el-row>
         </div>
@@ -345,6 +347,10 @@ export default {
         line-height: 22px;
         padding: 5px 10px 5px 10px;
       }
+      .element {
+        white-space: normal; /* 让文本正常换行,空格被合并 */
+        word-wrap: break-word; /* 允许在单词中间断行,以避免文本溢出 */
+      }
     }
   }
 }

+ 22 - 17
src/views/order/index.vue

@@ -7,7 +7,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      
+
     >
       <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn">
         <el-input
@@ -91,7 +91,9 @@
         <el-button type="danger" icon="el-icon-download" size="mini" @click="handleQuery(true)">
           {{ $t('orderList.export') }}
         </el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('orderList.reset') }}</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
+          {{ $t('orderList.reset') }}
+        </el-button>
       </el-form-item>
     </el-form>
 
@@ -755,27 +757,30 @@ export default {
         this.queryParams.startTime = '';
         this.queryParams.endTime = '';
         this.storeIds = [];
-        
+
         this.resetForm('queryForm');
         this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
         this.handleQuery(false);
     },
     // 状态修改
     handleStatusChange(row) {
-        let text = row.status === 'A' ? this.$t('orderList.enable') : this.$t('orderList.disable');
-        const confirmMsg = this.$t('orderList.confirmChangeOrderStatus', { action: text, orderSn: row.orderSn });
-        this.$modal
-           .confirm(confirmMsg)
-           .then(() => {
-                return updateOrderStatus(row.id, row.status);
-            })
-           .then(() => {
-                const successMsg = this.$t('orderList.statusChangeSuccess', { action: text });
-                this.$modal.msgSuccess(successMsg);
-            })
-           .catch(() => {
-                row.status = row.status === 'N' ? 'A' : 'N';
-            });
+      let text = row.status === 'A' ? this.$t('orderList.enable') : this.$t('orderList.disable')
+      const confirmMsg = this.$t('orderList.confirmChangeOrderStatus', {
+        action: text,
+        orderSn: row.orderSn
+      })
+      this.$modal
+        .confirm(confirmMsg)
+        .then(() => {
+          return updateOrderStatus(row.id, row.status)
+        })
+        .then(() => {
+          const successMsg = this.$t('orderList.statusChangeSuccess', { action: text })
+          this.$modal.msgSuccess(successMsg)
+        })
+        .catch(() => {
+          row.status = row.status === 'N' ? 'A' : 'N'
+        })
     },
     // 多选框选中数据
     handleSelectionChange(selection) {

+ 129 - 150
src/views/statistic/index.vue

@@ -4,41 +4,36 @@
       <div class="title">{{ $t('operational.dataOverview') }}</div>
       <div class="content" v-loading="loading">
         <el-row class="line">
-        <div class="date-picker">
+          <div class="date-picker">
             <el-date-picker
-                v-model="startTime"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                type="datetime"
-                style="width: 200px"
-                :placeholder="$t('operational.startTimePlaceholder')"
+              v-model="startTime"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              type="datetime"
+              style="width: 200px"
+              :placeholder="$t('operational.startTimePlaceholder')"
             ></el-date-picker>
-            <span class="sp"> ~ </span>
+            <span class="sp">~</span>
             <el-date-picker
-                v-model="endTime"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                type="datetime"
-                style="width: 200px"
-                :placeholder="$t('operational.endTimePlaceholder')"
+              v-model="endTime"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              type="datetime"
+              style="width: 200px"
+              :placeholder="$t('operational.endTimePlaceholder')"
             ></el-date-picker>
-        </div>
-        <div class="do-search">
+          </div>
+          <div class="do-search">
             <el-button icon="el-icon-refresh" size="small" @click="reset">
-                {{ $t('operational.reset') }}
+              {{ $t('operational.reset') }}
             </el-button>
-            <el-button
-                type="primary"
-                icon="el-icon-search"
-                size="small"
-                @click="getMainData"
-            >
-                {{ $t('operational.query') }}
+            <el-button type="primary" icon="el-icon-search" size="small" @click="getMainData">
+              {{ $t('operational.query') }}
             </el-button>
             <span class="ex" @click="setDay(3)">{{ $t('operational.lastThreeDays') }}</span>
             <span class="ex" @click="setDay(7)">{{ $t('operational.lastSevenDays') }}</span>
             <span class="ex" @click="setDay(15)">{{ $t('operational.lastFifteenDays') }}</span>
             <span class="ex" @click="setDay(30)">{{ $t('operational.lastThirtyDays') }}</span>
-        </div>
-    </el-row>
+          </div>
+        </el-row>
         <el-row class="line">
           <el-col class="item" :span="6">
             <div class="do">
@@ -92,11 +87,7 @@
               </svg>
               <p class="text">{{ $t('operational.transactionAmount') }}</p>
               <p class="number">
-                {{
-                  mainData.payAmount
-                    ? mainData.payAmount.toFixed(2)
-                    : (0.0).toFixed(2)
-                }}
+                {{ mainData.payAmount ? mainData.payAmount.toFixed(2) : (0.0).toFixed(2) }}
               </p>
             </div>
           </el-col>
@@ -117,15 +108,11 @@
                   p-id="3587"
                   fill="#8a8a8a"
                 ></path>
-                <path
-                  d="M576 128L352 352h448L576 128z"
-                  p-id="3588"
-                  fill="#8a8a8a"
-                ></path>
+                <path d="M576 128L352 352h448L576 128z" p-id="3588" fill="#8a8a8a"></path>
               </svg>
               <p class="text">{{ $t('operational.totalPayAmount') }}</p>
               <p class="number">
-                {{ mainData.totalPayAmount ? mainData.totalPayAmount : "0.00" }}
+                {{ mainData.totalPayAmount ? mainData.totalPayAmount : '0.00' }}
               </p>
             </div>
           </el-col>
@@ -152,7 +139,7 @@
             </div>
           </el-col>
         </el-row>
-        <el-row class="line">
+        <!-- <el-row class="line">
           <el-col class="item second-line" :span="6">
             <div class="do">
               <svg
@@ -190,7 +177,7 @@
               <p class="number">{{ mainData.totalPayUserCount }}</p>
             </div>
           </el-col>
-        </el-row>
+        </el-row> -->
       </div>
     </div>
     <div class="overview">
@@ -227,74 +214,66 @@
       </div>
     </div>
     <div class="overview">
-        <div class="title">{{ $t('operational.dataRanking') }}</div>
-        <div class="content">
-            <el-row>
-                <el-col class="item" :span="12">
-                    <div class="title">{{ $t('operational.goodsSalesRanking') }}</div>
-                    <el-table
-                        v-loading="loading"
-                        :data="goodsList"
-                        style="border: solid 1px #cccccc"
-                    >
-                        <el-table-column :label="$t('operational.id')" prop="id" width="60" />
-                        <el-table-column :label="$t('operational.goodsName')" align="center">
-                            <template slot-scope="scope">
-                                <span>{{ scope.row.name }}</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column :label="$t('operational.salesVolume')" align="center" prop="num" />
-                        <el-table-column
-                            :label="$t('operational.salesAmount')"
-                            align="center"
-                            prop="amount"
-                        >
-                            <template slot-scope="scope">
-                                <span>{{ scope.row.amount.toFixed(2) }}</span>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                </el-col>
-                <el-col class="item" :span="12">
-                    <div class="title">{{ $t('operational.userConsumptionRanking') }}</div>
-                    <el-table
-                        v-loading="loading"
-                        :data="memberList"
-                        style="border: solid 1px #cccccc"
-                    >
-                        <el-table-column :label="$t('operational.id')" prop="id" width="60" />
-                        <el-table-column :label="$t('operational.userName')" align="center" width="100">
-                            <template slot-scope="scope">
-                                <span>{{ scope.row.name }}</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column :label="$t('operational.memberNumber')" align="center" prop="userNo" />
-                        <el-table-column
-                            :label="$t('operational.consumptionAmount')"
-                            align="center"
-                            prop="amount"
-                        >
-                            <template slot-scope="scope">
-                                <span>{{ scope.row.amount.toFixed(2) }}</span>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                </el-col>
-            </el-row>
-        </div>
+      <div class="title">{{ $t('operational.dataRanking') }}</div>
+      <div class="content">
+        <el-row>
+          <el-col class="item" :span="12">
+            <div class="title">{{ $t('operational.goodsSalesRanking') }}</div>
+            <el-table v-loading="loading" :data="goodsList" style="border: solid 1px #cccccc">
+              <el-table-column :label="$t('operational.id')" prop="id" width="60" />
+              <el-table-column :label="$t('operational.goodsName')" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.name }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column :label="$t('operational.salesVolume')" align="center" prop="num" />
+              <el-table-column :label="$t('operational.salesAmount')" align="center" prop="amount">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.amount.toFixed(2) }}</span>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-col>
+          <el-col class="item" :span="12">
+            <div class="title">{{ $t('operational.userConsumptionRanking') }}</div>
+            <el-table v-loading="loading" :data="memberList" style="border: solid 1px #cccccc">
+              <el-table-column :label="$t('operational.id')" prop="id" width="60" />
+              <el-table-column :label="$t('operational.userName')" align="center" width="100">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.name }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                :label="$t('operational.memberNumber')"
+                align="center"
+                prop="userNo"
+              />
+              <el-table-column
+                :label="$t('operational.consumptionAmount')"
+                align="center"
+                prop="amount"
+              >
+                <template slot-scope="scope">
+                  <span>{{ scope.row.amount.toFixed(2) }}</span>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-col>
+        </el-row>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
-import { getNumDayTime } from "@/utils/fuint";
-import { getStatisticData } from "@/api/home";
-import { getMainData, getTopData } from "@/api/statistic";
-import commonChart from "../components/charts/index";
+import { getNumDayTime } from '@/utils/fuint'
+import { getStatisticData } from '@/api/home'
+import { getMainData, getTopData } from '@/api/statistic'
+import commonChart from '../components/charts/index'
 export default {
-  name: "Statistic",
+  name: 'Statistic',
   components: {
-    commonChart,
+    commonChart
   },
   data() {
     return {
@@ -309,89 +288,89 @@ export default {
         payAmount: 0,
         totalPayAmount: 0,
         activeUserCount: 0,
-        totalPayUserCount: 0,
+        totalPayUserCount: 0
       },
       chart1: {
-          title: this.$t('operational.lastSevenDaysOrderCount'),
-          color: "#ff5b57",
-          chartType: "bar",
-          header: [this.$t('operational.orderStatistics')]
+        title: this.$t('operational.lastSevenDaysOrderCount'),
+        color: '#ff5b57',
+        chartType: 'bar',
+        header: [this.$t('operational.orderStatistics')]
       },
       chart2: {
-          title: this.$t('operational.incomeTrendChart'),
-          color: "#113a28",
-          chartType: "line",
-          header: [this.$t('operational.memberStatistics')]
+        title: this.$t('operational.incomeTrendChart'),
+        color: '#113a28',
+        chartType: 'line',
+        header: [this.$t('operational.memberStatistics')]
       },
       chartData1: [],
       chartData2: [],
       goodsList: [],
-      memberList: [],
-    };
+      memberList: []
+    }
   },
   created() {
-    this.getMainData();
-    this.getChartsData();
-    this.getTopData();
+    this.getMainData()
+    this.getChartsData()
+    this.getTopData()
   },
   methods: {
     // 重置
     reset() {
-      this.startTime = "";
-      this.endTime = "";
+      this.startTime = ''
+      this.endTime = ''
     },
     // 设置日期
     setDay(day) {
-      this.startTime = getNumDayTime(day - 1);
-      this.endTime = getNumDayTime(0);
-      this.getMainData();
-      this.getTopData();
+      this.startTime = getNumDayTime(day - 1)
+      this.endTime = getNumDayTime(0)
+      this.getMainData()
+      this.getTopData()
     },
     // 查询首页数据
     getMainData() {
-      this.loading = true;
-      const param = { startTime: this.startTime, endTime: this.endTime };
+      this.loading = true
+      const param = { startTime: this.startTime, endTime: this.endTime }
       getMainData(param).then((response) => {
-        this.mainData = response.data;
-        this.loading = false;
-      });
+        this.mainData = response.data
+        this.loading = false
+      })
     },
     // 查询统计数据
     getChartsData() {
-      const app = this;
-      app.loading = true;
+      const app = this
+      app.loading = true
       // 近7日订单数量和活跃会员数量
-      getStatisticData({ tag: "order,user_active" }).then((response) => {
-        const data = response.data;
-        const labelData1 = data.data[0] ? data.data[0] : [];
-        const labelData2 = data.data[1] ? data.data[1] : [];
-        const dataList1 = [];
-        const dataList2 = [];
+      getStatisticData({ tag: 'order,user_active' }).then((response) => {
+        const data = response.data
+        const labelData1 = data.data[0] ? data.data[0] : []
+        const labelData2 = data.data[1] ? data.data[1] : []
+        const dataList1 = []
+        const dataList2 = []
 
         data.labels.forEach(function (label, index) {
-          const value1 = labelData1[index] ? labelData1[index] : 0;
-          const value2 = labelData2[index] ? labelData2[index] : 0;
-          dataList1.push({ name: label, value0: value1 });
-          dataList2.push({ name: label, value0: value2 });
-        });
-        app.chartData1 = dataList1;
-        app.chartData2 = dataList2;
-        app.loading = false;
-      });
+          const value1 = labelData1[index] ? labelData1[index] : 0
+          const value2 = labelData2[index] ? labelData2[index] : 0
+          dataList1.push({ name: label, value0: value1 })
+          dataList2.push({ name: label, value0: value2 })
+        })
+        app.chartData1 = dataList1
+        app.chartData2 = dataList2
+        app.loading = false
+      })
     },
     // 查询排行榜数据
     getTopData() {
-      const app = this;
-      app.loading = true;
-      const param = { startTime: this.startTime, endTime: this.endTime };
+      const app = this
+      app.loading = true
+      const param = { startTime: this.startTime, endTime: this.endTime }
       getTopData(param).then((response) => {
-        app.loading = false;
-        app.goodsList = response.data.goodsList;
-        app.memberList = response.data.memberList;
-      });
-    },
-  },
-};
+        app.loading = false
+        app.goodsList = response.data.goodsList
+        app.memberList = response.data.memberList
+      })
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">