Browse Source

优化其他设置

zhengjinyi 5 years ago
parent
commit
d62dd1fa18
4 changed files with 50 additions and 9 deletions
  1. 1 1
      src/views/goods/list-select.vue
  2. 16 3
      src/views/other/about.vue
  3. 16 2
      src/views/other/after.vue
  4. 17 3
      src/views/other/notes.vue

+ 1 - 1
src/views/goods/list-select.vue

@@ -11,7 +11,7 @@
       <el-form class="demo-form-inline goods-list">
 
         <el-form-item label="商品ID:" style="width:225px;float: left;margin-bottom: 8px;">
-          <el-input v-model="listQuery.id" placeholder="请输入商品ID" maxlength="30" style="width: 150px;" class="filter-item" @keyup.enter.native="handleFilter" />
+          <el-input v-model="listQuery.id" type="number" placeholder="请输入商品ID" maxlength="30" style="width: 150px;" class="filter-item" @keyup.enter.native="handleFilter" />
         </el-form-item>
         <el-form-item label="商品名称:" style="width:240px;float: left;">
           <el-input v-model="listQuery.productName" placeholder="请输入商品名称" style="width: 150px;" class="filter-item" @keyup.enter.native="handleFilter" />

+ 16 - 3
src/views/other/about.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="app-container">
+    <div class="tinymce-title"><span class="title-tip">*</span>关于我们:</div>
     <tinymce v-model="introduction" :height="300" />
     <el-form ref="dataForm" :rules="rules" :model="from" label-position="left" label-width="80px" style="float: left;margin-top: 20px;">
       <el-form-item label="联系我们" prop="contactNumber">
@@ -44,7 +45,6 @@ export default {
   methods: {
     initData() {
       getOrganizeInfo({ id: this.organizeID }).then(response => {
-        console.log(response)
         this.introduction = response.data.introduction
         this.from.contactNumber = response.data.contactNumber
       })
@@ -52,6 +52,10 @@ export default {
     onSubmite() {
       this.$refs['dataForm'].validate((valid) => {
         if (valid) {
+          if (this.introduction === '') {
+            this.$message({ message: '内容不能为空', type: 'warning', center: true })
+            return
+          }
           const Formobj = { id: this.organizeID, introduction: this.introduction }
           const params = Object.assign(Formobj, this.from)
           this.loadingbut = true
@@ -71,6 +75,15 @@ export default {
 }
 </script>
 
-<style scoped>
-
+<style lang="scss" scoped>
+  .tinymce-title{
+    font-size: 14px;
+    line-height: 20px;
+    padding: 10px 0;
+    text-align: left;
+    font-weight: bold;
+  }
+  .title-tip{
+    color: red;
+  }
 </style>

+ 16 - 2
src/views/other/after.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="app-container">
+    <div class="tinymce-title"><span class="title-tip">*</span>售后无忧:</div>
     <tinymce v-model="afterSale" :height="300" />
     <div slot="footer" class="dialog-footer" style="float: right;padding:80px 0 80px 0;">
       <el-button type="primary" style="width:100px;" :loading="loadingbut" @click="onSubmite()">{{ loadingbuttext }}</el-button>
@@ -38,6 +39,10 @@ export default {
       })
     },
     onSubmite() {
+      if (this.afterSale === '') {
+        this.$message({ message: '内容不能为空', type: 'warning', center: true })
+        return
+      }
       this.loadingbut = true
       this.loadingbuttext = '提交中'
       updateOrganizeInfo({ id: this.organizeID, afterSale: this.afterSale }).then(response => {
@@ -53,6 +58,15 @@ export default {
 }
 </script>
 
-<style scoped>
-
+<style lang="scss" scoped>
+  .tinymce-title{
+    font-size: 14px;
+    line-height: 20px;
+    padding: 10px 0;
+    text-align: left;
+    font-weight: bold;
+  }
+  .title-tip{
+    color: red;
+  }
 </style>

+ 17 - 3
src/views/other/notes.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="app-container">
+    <div class="tinymce-title"><span class="title-tip">*</span>购物须知:</div>
     <tinymce v-model="shoppingNotes" :height="300" />
     <div slot="footer" class="dialog-footer" style="float: right;padding:80px 0 80px 0;">
       <el-button type="primary" style="width:100px;" :loading="loadingbut" @click="onSubmite()">{{ loadingbuttext }}</el-button>
@@ -38,9 +39,13 @@ export default {
       })
     },
     onSubmite() {
+      if (this.shoppingNotes === '') {
+        this.$message({ message: '内容不能为空', type: 'warning', center: true })
+        return
+      }
       this.loadingbut = true
       this.loadingbuttext = '提交中'
-      updateOrganizeInfo({ id: this.organizeID, afterSale: this.shoppingNotes }).then(response => {
+      updateOrganizeInfo({ id: this.organizeID, shoppingNotes: this.shoppingNotes }).then(response => {
         this.$message({ message: response.msg, type: 'success', center: true })
         this.loadingbut = false
         this.loadingbuttext = '提交'
@@ -53,6 +58,15 @@ export default {
 }
 </script>
 
-<style scoped>
-
+<style lang="scss" scoped>
+  .tinymce-title{
+    font-size: 14px;
+    line-height: 20px;
+    padding: 10px 0;
+    text-align: left;
+    font-weight: bold;
+  }
+  .title-tip{
+    color: red;
+  }
 </style>