Browse Source

始宁农业管理后台:内容管理-通知管理

panyong 2 years ago
parent
commit
de7afc2f10

+ 12 - 50
htmldev/shiningManage/src/views/productManage/products/index.vue

@@ -23,6 +23,7 @@
               :key="item.value"></el-option>
           </el-select>
         </el-form-item>
+        <!-- TODO 状态取值 -->
         <el-form-item label="状态:">
           <el-select
             clearable
@@ -48,6 +49,7 @@
       class="marginT-10 order-table"
       border
       :max-height="vheight">
+      <el-table-column label="商品货号" prop="product_code" min-width="140"></el-table-column>
       <el-table-column label="农产品名字" prop="product_title" min-width="200" show-overflow-tooltip></el-table-column>
       <el-table-column label="农产品描述" prop="product_desc" min-width="200" show-overflow-tooltip></el-table-column>
       <el-table-column label="商品主图" prop="product_img_url" min-width="100">
@@ -59,33 +61,10 @@
           </el-image>
         </template>
       </el-table-column>
-      <el-table-column label="商品轮播图" prop="product_rotation_img_list" min-width="100">
-        <template slot-scope="scope">
-          <template v-if="scope.row.product_rotation_img_list.length > 0">
-            <el-image
-              style="display:block;width: 80px; height: 80px;font-size: 0;"
-              :src="scope.row.product_rotation_img_list[0]"
-              :preview-src-list="scope.row.product_rotation_img_list">
-            </el-image>
-          </template>
-        </template>
-      </el-table-column>
-      <el-table-column label="商品详情图" prop="product_detail_img_list" min-width="100">
-        <template slot-scope="scope">
-          <template v-if="scope.row.product_detail_img_list.length > 0">
-            <el-image
-              style="display:block;width: 80px; height: 80px;font-size: 0;"
-              :src="scope.row.product_detail_img_list[0]"
-              :preview-src-list="scope.row.product_detail_img_list">
-            </el-image>
-          </template>
-        </template>
-      </el-table-column>
       <el-table-column label="分类" prop="product_category_name"></el-table-column>
       <el-table-column label="商品品牌" prop="product_brand_name"></el-table-column>
       <el-table-column label="商品规格" prop="product_spec"></el-table-column>
       <el-table-column label="单位" prop="product_unit"></el-table-column>
-      <el-table-column label="商品货号" prop="product_code" min-width="140"></el-table-column>
       <el-table-column label="批发价(元)" prop="product_all_price" min-width="100">
         <template slot-scope="scope">{{ scope.row.product_all_price | fen2Yuan }}</template>
       </el-table-column>
@@ -93,24 +72,24 @@
         <template slot-scope="scope">{{ scope.row.product_price | fen2Yuan }}</template>
       </el-table-column>
       <el-table-column label="库存" prop="product_count"></el-table-column>
-      <el-table-column label="发售时间" prop="product_sale_at" min-width="160">
-        <template slot-scope="scope">{{ scope.row.product_sale_at > 0 ? scope.row.product_sale_at : '' }}</template>
-      </el-table-column>
       <el-table-column label="类型" prop="product_sale_at">
         <template slot-scope="scope">{{ scope.row.product_sale_at > 0 ? '现货' : '预售' }}</template>
       </el-table-column>
-      <el-table-column label="申请人" prop="user_id" show-overflow-tooltip>
+      <el-table-column label="发售时间" prop="product_sale_at" min-width="160">
+        <template slot-scope="scope">{{ scope.row.product_sale_at > 0 ? scope.row.product_sale_at : '' }}</template>
+      </el-table-column>
+      <el-table-column label="农户信息" prop="user_id" show-overflow-tooltip>
         <template slot-scope="scope">
-          {{ scope.row.user_id }}{{ scope.row.user_name ? scope.row.user_name + '/' : '' }}
+          {{ scope.row.user_id }}{{ scope.row.user_name ? '/' + scope.row.user_name : '' }}
         </template>
       </el-table-column>
-      <el-table-column label="店铺名称" prop="shop_name" show-overflow-tooltip>
-        <template slot-scope="scope">{{ scope.row.shop_name }}</template>
-      </el-table-column>
-      <el-table-column label="审核状态" prop="product_status">
+      <el-table-column label="状态" prop="product_status">
         <template slot-scope="scope">{{ getProductStatusText(scope.row.product_status) }}</template>
       </el-table-column>
-      <el-table-column label="申请时间" prop="created_at" min-width="160"></el-table-column>
+      <el-table-column label="优秀推荐" prop="product_is_recommend" min-width="160">
+        <template slot-scope="scope">{{ scope.row.product_is_recommend === 1 ? '是' : '否' }}</template>
+      </el-table-column>
+      <el-table-column label="创建时间" prop="product_check_at" min-width="160"></el-table-column>
       <el-table-column label="操作">
         <template slot-scope="scope">
           <el-button type="text" @click="edit(scope.row)">操作</el-button>
@@ -166,27 +145,10 @@ export default {
     }
   },
   methods: {
-    add() {
-      this.detailsDialog.exData = {}
-      this.detailsDialog.show = true
-    },
     edit(row) {
       this.detailsDialog.exData = row
       this.detailsDialog.show = true
     },
-    del(row) {
-      this.$confirm('确定要删除吗', '确认', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async () => {
-        const data = await this.$fetch('/api/auth/department/del', { id: row.id })
-        if (data.code == 200) {
-          this.$message.success('删除成功')
-          this.init()
-        }
-      }).catch(() => {})
-    },
     getProductStatusText(val) {
       const index = this.arrProductStatus.findIndex(item => item.value === val)
       if (index > -1) {

+ 19 - 20
htmldev/shiningManage/src/views/productManage/toBeReviewed/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="padding-20">
     <div class="search-box">
+      <!-- TODO 筛选条件 -->
       <el-form ref="form" :inline="true" :model="searchForm" clearable label-width="100px" class="mt-10">
         <el-form-item label="农户编号:">
           <el-input v-model="searchForm.user_id" placeholder="请输入农户编号" clearable></el-input>
@@ -23,6 +24,7 @@
               :key="item.value"></el-option>
           </el-select>
         </el-form-item>
+        <!-- TODO 审核状态选项 -->
         <el-form-item label="审核状态:">
           <el-select
             clearable
@@ -35,7 +37,18 @@
               :key="item.value"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item class="ml-10">
+        <el-form-item label="申请时间:">
+          <el-date-picker
+            :editable="false"
+            v-model="time"
+            @change="timearr => {timearr ? (searchForm.start_time = timearr[0] + ' 00:00:00', searchForm.end_time = timearr[1] + ' 23:59:59') : searchForm.start_time = searchForm.end_time = undefined}"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            start-placeholder="开始时间"
+            end-placeholder="结束时间"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item>
           <el-button icon="el-icon-search" type="primary" @click="searchSubmit">查询</el-button>
         </el-form-item>
       </el-form>
@@ -81,7 +94,9 @@
           </template>
         </template>
       </el-table-column>
+      <!-- TODO 分类维护 -->
       <el-table-column label="分类" prop="product_category_name"></el-table-column>
+      <!-- TODO 品牌维护 -->
       <el-table-column label="商品品牌" prop="product_brand_name"></el-table-column>
       <el-table-column label="商品规格" prop="product_spec"></el-table-column>
       <el-table-column label="单位" prop="product_unit"></el-table-column>
@@ -100,7 +115,7 @@
       </el-table-column>
       <el-table-column label="申请人" prop="user_id" show-overflow-tooltip>
         <template slot-scope="scope">
-          {{ scope.row.user_id }}{{ scope.row.user_name ? scope.row.user_name + '/' : '' }}
+          {{ scope.row.user_id }}{{ scope.row.user_name ? '/' + scope.row.user_name : '' }}
         </template>
       </el-table-column>
       <el-table-column label="店铺名称" prop="shop_name" show-overflow-tooltip>
@@ -111,7 +126,8 @@
       </el-table-column>
       <el-table-column label="申请时间" prop="created_at" min-width="160"></el-table-column>
       <el-table-column label="审核人" prop="product_check_name" min-width="80"></el-table-column>
-      <el-table-column label="审核备注" prop="product_check_remark" min-width="140" show-overflow-tooltip></el-table-column>
+      <el-table-column label="审核备注" prop="product_check_remark" min-width="140"
+                       show-overflow-tooltip></el-table-column>
       <el-table-column label="审核时间" prop="product_check_at" min-width="160"></el-table-column>
       <el-table-column label="操作">
         <template slot-scope="scope">
@@ -168,27 +184,10 @@ export default {
     }
   },
   methods: {
-    add() {
-      this.detailsDialog.exData = {}
-      this.detailsDialog.show = true
-    },
     edit(row) {
       this.detailsDialog.exData = row
       this.detailsDialog.show = true
     },
-    del(row) {
-      this.$confirm('确定要删除吗', '确认', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async () => {
-        const data = await this.$fetch('/api/auth/department/del', { id: row.id })
-        if (data.code == 200) {
-          this.$message.success('删除成功')
-          this.init()
-        }
-      }).catch(() => {})
-    },
     getProductStatusText(val) {
       const index = this.arrProductStatus.findIndex(item => item.value === val)
       if (index > -1) {