huangmp 2 лет назад
Родитель
Сommit
07c0c90517
1 измененных файлов с 57 добавлено и 0 удалено
  1. 57 0
      src/views/modules/prod/prodComm.vue

+ 57 - 0
src/views/modules/prod/prodComm.vue

@@ -21,6 +21,13 @@
 <!--              <el-option :label="$t('productComm.noPass')" :value="-1"></el-option>-->
 <!--            </el-select>-->
 <!--          </el-form-item>-->
+          <el-form-item prop="status" label="审核状态">
+            <el-select key="status" v-model="searchForm.status" :clearable="true">
+              <el-option label="待审核" value="0"></el-option>
+              <el-option label="通过" value="1"></el-option>
+              <el-option label="不通过" value="-1"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item :label="$t('productComm.recTime') + ':'">
             <el-date-picker
               v-model="recDateRange"
@@ -70,6 +77,16 @@
               </div>
             </template>
           </el-table-column>
+          <el-table-column
+            align="center"
+            prop="status"
+            label="审核状态">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.status === 0" type="warning">待审核</el-tag>
+              <el-tag v-if="scope.row.status === 1" type="success">通过</el-tag>
+              <el-tag v-if="scope.row.status === -1" type="danger">不通过</el-tag>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             prop="isDeleted"
@@ -165,6 +182,11 @@
                   @click="deleteHandle(scope.row.prodCommId)"
                   >{{$t("text.delBtn")}}
                 </div>
+                <div
+                  class="default-btn text-btn"
+                  @click="handleAudit(scope.row.prodCommId)"
+                >审核
+                </div>
               </div>
             </template>
           </el-table-column>
@@ -221,6 +243,41 @@ export default {
   mounted () {
   },
   methods: {
+    handleAudit(prodCommId){
+      this.$confirm("请确认审核状态", this.$i18n.t('text.tips'), {
+        distinguishCancelAndClose:true,
+        confirmButtonText: "通过",
+        cancelButtonText: "不通过",
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/prod/prodComm/audit'),
+          method: 'post',
+          data: this.$http.adornData({prodCommId:prodCommId, status: 1})
+        }).then(({ data }) => {
+          this.getDataList(this.page);
+          this.$message({
+            message: "审核操作成功",
+            type: 'success',
+          })
+        })
+      }).catch(action => {
+        if(action === 'cancel'){
+          this.$http({
+            url: this.$http.adornUrl('/prod/prodComm/audit'),
+            method: 'post',
+            data: this.$http.adornData({prodCommId:prodCommId, status:-1})
+          }).then(({ data }) => {
+            this.getDataList(this.page);
+            this.$message({
+              message: "审核操作成功",
+              type: 'success',
+            })
+          })
+        }
+      })
+    },
+
     openOrderInfo(prodCommId){
       this.$http({
         url: this.$http.adornUrl(`/prod/prodComm/info/${prodCommId}`),