Browse Source

粮脉动态审核

zxz 3 years ago
parent
commit
f3ee43a964

+ 9 - 0
src/api/V2/platformaudit/index.js

@@ -18,3 +18,12 @@ export const API_GET_SALE_LIST = '/salePlanInfo/selectSalePlanInfo'
 export const API_POST_DELETESALE = '/salePlanInfo/api/deleteSalePlanInfo'
 export const API_POST_DELETESALE = '/salePlanInfo/api/deleteSalePlanInfo'
 //交易信息审核(销售)
 //交易信息审核(销售)
 export const API_POST_SALEREVIEW = '/salePlanInfo/api/examine'
 export const API_POST_SALEREVIEW = '/salePlanInfo/api/examine'
+//粮脉动态审核(列表)
+export const API_GET_DYNAMICS_LIST = '/settledCompanyDynamics/selectSettledCompanyDynamicsPage'
+//粮脉动态审核(查看)
+export const API_GET_DYNAMICS_LOOK = '/settledCompanyDynamics/getSettledCompanyDynamics'
+//粮脉动态审核(删除)
+export const API_POST_DYNAMICS_DELETE = '/settledCompanyDynamics/api/deleteSettledCompanyInfo'
+//粮脉动态审核
+export const API_POST_DYNAMICS_EXAMINE = '/settledCompanyDynamics/api/examine'
+

+ 13 - 1
src/model/platformaudit/index.js

@@ -11,6 +11,10 @@ import {
     API_GET_SALE_LIST,
     API_GET_SALE_LIST,
     API_POST_DELETESALE,
     API_POST_DELETESALE,
     API_POST_SALEREVIEW,
     API_POST_SALEREVIEW,
+    API_GET_DYNAMICS_LIST,
+    API_GET_DYNAMICS_LOOK,
+    API_POST_DYNAMICS_DELETE,
+    API_POST_DYNAMICS_EXAMINE,
 } from '@/api/V2/platformaudit'
 } from '@/api/V2/platformaudit'
 // import { app } from 'electron'
 // import { app } from 'electron'
 // 粮商审核
 // 粮商审核
@@ -32,4 +36,12 @@ export const saleList = appRx.get(API_GET_SALE_LIST, errorCatcher, errorHandle,
 // 销售交易信息删除
 // 销售交易信息删除
 export const deletesale = appRx.post(API_POST_DELETESALE, errorCatcher, errorHandle, filter)
 export const deletesale = appRx.post(API_POST_DELETESALE, errorCatcher, errorHandle, filter)
 // 销售交易信息审核
 // 销售交易信息审核
-export const saleexamine = appRx.post(API_POST_SALEREVIEW, errorCatcher, errorHandle, filter)
+export const saleexamine = appRx.post(API_POST_SALEREVIEW, errorCatcher, errorHandle, filter)
+// 粮脉动态审核(列表)
+export const dynamicsList = appRx.get(API_GET_DYNAMICS_LIST, errorCatcher, errorHandle, filter)
+// 粮脉动态审核(查看)
+export const dynamicsLook = appRx.get(API_GET_DYNAMICS_LOOK, errorCatcher, errorHandle, filter)
+// 粮脉动态审核(删除)
+export const dynamicsDelete = appRx.post(API_POST_DYNAMICS_DELETE, errorCatcher, errorHandle, filter)
+// 粮脉动态审核
+export const dynamicsExamine = appRx.post(API_POST_DYNAMICS_EXAMINE, errorCatcher, errorHandle, filter)

+ 117 - 65
src/views/platformaudit/grainPulseDynamic.vue

@@ -44,7 +44,7 @@
     <div class="container">
     <div class="container">
       <el-table
       <el-table
         class="wenzi"
         class="wenzi"
-        :data="tranManagementList.records"
+        :data="dynamicsList.records"
         style="width: 100%"
         style="width: 100%"
         height="680"
         height="680"
       >
       >
@@ -54,11 +54,10 @@
             <span v-else>{{ scope.$index + 1 }}</span>
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="salePlanNo" label="昵称"> </el-table-column>
-        <el-table-column prop="seller" label="账号"></el-table-column>
-        <el-table-column prop="goodsName" label="发布主体"> </el-table-column>
-        <el-table-column prop="plannedSaleVolume" label="标题">
-        </el-table-column>
+        <el-table-column prop="userName" label="昵称"> </el-table-column>
+        <el-table-column prop="phone" label="账号"></el-table-column>
+        <el-table-column prop="compName" label="发布主体"> </el-table-column>
+        <el-table-column prop="title" label="标题"> </el-table-column>
         <el-table-column prop="updateDate" label="更新时间" width="140">
         <el-table-column prop="updateDate" label="更新时间" width="140">
         </el-table-column>
         </el-table-column>
         <el-table-column prop="" label="操作" width="180">
         <el-table-column prop="" label="操作" width="180">
@@ -87,7 +86,7 @@
               class="record"
               class="record"
               v-if="scope.row.statusFlag == 1"
               v-if="scope.row.statusFlag == 1"
               v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
               v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
-              @click="reject(scope.row)"
+              @click="rejectList(scope.row)"
               >驳回</el-button
               >驳回</el-button
             >
             >
             <el-button
             <el-button
@@ -95,7 +94,7 @@
               type="text"
               type="text"
               class="record"
               class="record"
               v-if="scope.row.statusFlag == 1"
               v-if="scope.row.statusFlag == 1"
-              @click="adopt(scope.row)"
+              @click="adoptOut(scope.row)"
               v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
               v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
               >通过</el-button
               >通过</el-button
             >
             >
@@ -126,43 +125,41 @@
       :visible.sync="dialogFormVisible"
       :visible.sync="dialogFormVisible"
       :append-to-body="true"
       :append-to-body="true"
     >
     >
-      <el-form class="customer" :model="form">
-        <el-form-item label="发布主体" :label-width="formLabelWidth">
-          {{ 111111 }}
+      <el-form class="customer">
+        <el-form-item label="发布主体">
+          {{ SettledCompanyDynamicsList.compName }}
         </el-form-item>
         </el-form-item>
-        <el-form-item label="标题" :label-width="formLabelWidth">
-          {{ 11111111 }}
+        <el-form-item label="标题">
+          {{ SettledCompanyDynamicsList.title }}
         </el-form-item>
         </el-form-item>
-        <el-form-item label="内容" :label-width="formLabelWidth">
-          <el-input>{{ 111111111 }}</el-input>
+        <el-form-item label="内容">
+          {{ SettledCompanyDynamicsList.content }}
         </el-form-item>
         </el-form-item>
-          <el-form-item label="定位" :label-width="formLabelWidth">
-          <span>营口市</span>
+        <el-form-item label="定位">
+          {{ SettledCompanyDynamicsList.city }}
         </el-form-item>
         </el-form-item>
-        <!-- <img width="100%" :src="customerlist.cardAddressUrl2" alt />
-        <img width="100%" :src="customerlist.cardAddressUrl2" alt />
-        <img width="100%" :src="customerlist.cardAddressUrl2" alt />
-        <img width="100%" :src="customerlist.cardAddressUrl2" alt />
-        <img width="100%" :src="customerlist.cardAddressUrl2" alt />
-        <img width="100%" :src="customerlist.cardAddressUrl2" alt />
-        <img width="100%" :src="customerlist.cardAddressUrl2" alt />
-        <img width="100%" :src="customerlist.cardAddressUrl2" alt />
-        <img width="100%" :src="customerlist.cardAddressUrl2" alt /> -->
+        <h4>附件</h4>
+        <img width="50%" :src="SettledCompanyDynamicsList.address" alt />
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
-        <!-- <span v-if="scope.row.status == '待审核'"> -->
-          <el-button @click="reject()">驳回</el-button>
-          <el-button @click="adopt()">通过</el-button>
-        <!-- </span>
-        <span v-if="scope.row.status == '已审核'"
+        <span v-if="SettledCompanyDynamicsList.statusFlag == '1'">
+        <el-button @click="reject(id)" type="danger">驳回</el-button>
+        <el-button @click="adopt(id)" type="primary">通过</el-button>
+        </span>
+        <span v-else-if="SettledCompanyDynamicsList.statusFlag != '1'"
           ><el-button @click="dialogFormVisible = fase">关闭</el-button>
           ><el-button @click="dialogFormVisible = fase">关闭</el-button>
-        </span> -->
+        </span>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { saleList, deletesale, saleexamine } from '@/model/platformaudit/index'
+import {
+  dynamicsList,
+  dynamicsLook,
+  dynamicsDelete,
+  dynamicsExamine,
+} from '@/model/platformaudit/index'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 import { EventBus } from 'base-core-lib'
 import { EventBus } from 'base-core-lib'
@@ -204,15 +201,22 @@ export default {
       searchType: 1,
       searchType: 1,
       compId: sessionStorage.getItem('ws-pf_compId'),
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       deptCircularPage: {},
-      tranManagementList: [],
-      id:'',
+      dynamicsList: [],
+      pcFlag: 1,
+      SettledCompanyDynamicsList: {
+        compName: '',
+        title: '',
+        content: '',
+        address: '',
+        city: '',
+      },
       deptBudgetList: {},
       deptBudgetList: {},
       searchTypeList: [
       searchTypeList: [
         { value: '待审核', type: 1 },
         { value: '待审核', type: 1 },
         { value: '已通过', type: 2 },
         { value: '已通过', type: 2 },
         { value: '全部', type: '' },
         { value: '全部', type: '' },
       ],
       ],
-      salePlanInfo: {
+      settledCompanyDynamicsInfo: {
         id: '',
         id: '',
         flag: '',
         flag: '',
       },
       },
@@ -258,7 +262,7 @@ export default {
         type: 'warning',
         type: 'warning',
       })
       })
         .then(() => {
         .then(() => {
-          deletesale({
+          dynamicsDelete({
             id: row.id,
             id: row.id,
           })
           })
             .toPromise()
             .toPromise()
@@ -272,9 +276,15 @@ export default {
     },
     },
     //查看//传参
     //查看//传参
     nocomplete(row) {
     nocomplete(row) {
-    this.id = row.id
+      dynamicsLook({
+        id: row.id,
+      })
+        .toPromise()
+        .then((response) => {
+          this.SettledCompanyDynamicsList = response
+          this.id=response.id
+        })
       this.dialogFormVisible = true
       this.dialogFormVisible = true
-
     },
     },
     //查找
     //查找
     lookUp() {
     lookUp() {
@@ -291,16 +301,43 @@ export default {
       this.getList()
       this.getList()
     },
     },
     //审核通过
     //审核通过
-    adopt() {
-      this.salePlanInfo.id = this.id
-      this.salePlanInfo.flag = 1
+    adopt(id) {
+      this.settledCompanyDynamicsInfo.flag = 1
+      this.settledCompanyDynamicsInfo.id = id
+      this.$confirm(`确定通过该动态信息?`, '提示', {
+        confirmButtonText: '通过',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          dynamicsExamine(this.settledCompanyDynamicsInfo)
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '通过成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              EventBus.$emit('error', response.message)
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+        //列表审核通过
+    adoptList(row) {
+      this.settledCompanyDynamicsInfo.flag = 1
+      this.settledCompanyDynamicsInfo.id = row.id
       this.$confirm(`确定通过该动态信息?`, '提示', {
       this.$confirm(`确定通过该动态信息?`, '提示', {
         confirmButtonText: '通过',
         confirmButtonText: '通过',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         type: 'warning',
         type: 'warning',
       })
       })
         .then(() => {
         .then(() => {
-          saleexamine(this.salePlanInfo)
+          dynamicsExamine(this.settledCompanyDynamicsInfo)
             .toPromise()
             .toPromise()
             .then((response) => {
             .then((response) => {
               this.$notify.success({
               this.$notify.success({
@@ -318,16 +355,44 @@ export default {
         })
         })
     },
     },
     //审核驳回
     //审核驳回
-    reject() {
-      this.salePlanInfo.id = this.id
-      this.salePlanInfo.flag = 2
+    reject(id) {
+      this.settledCompanyDynamicsInfo.flag = 2
+      this.settledCompanyDynamicsInfo.id = id
+      this.$confirm(`确定驳回该动态信息?`, '提示', {
+        confirmButtonText: '驳回',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          dynamicsExamine(this.settledCompanyDynamicsInfo)
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '驳回成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              console.log(response)
+              EventBus.$emit('error', response.message)
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    //列表审核驳回
+    rejectList(row) {
+      this.settledCompanyDynamicsInfo.flag = 2
+      this.settledCompanyDynamicsInfo.id = row.id
       this.$confirm(`确定驳回该动态信息?`, '提示', {
       this.$confirm(`确定驳回该动态信息?`, '提示', {
         confirmButtonText: '驳回',
         confirmButtonText: '驳回',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         type: 'warning',
         type: 'warning',
       })
       })
         .then(() => {
         .then(() => {
-          saleexamine(this.salePlanInfo)
+          dynamicsExamine(this.settledCompanyDynamicsInfo)
             .toPromise()
             .toPromise()
             .then((response) => {
             .then((response) => {
               this.$notify.success({
               this.$notify.success({
@@ -380,37 +445,24 @@ export default {
       console.log(`当前页: ${val}`)
       console.log(`当前页: ${val}`)
       this.getList()
       this.getList()
     },
     },
-    //销售列表
+    //粮脉动态列表
     getList() {
     getList() {
-      saleList({
-        compId: sessionStorage.getItem('ws-pf_compId'),
+      dynamicsList({
         searchType: this.searchType,
         searchType: this.searchType,
+        // phone: this.phone,
+        pcFlag: this.pcFlag,
         currentPage: this.currentPage,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
         searchKeyWord: this.searchKeyWord,
         searchKeyWord: this.searchKeyWord,
       })
       })
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
-          this.tranManagementList = response
+          this.dynamicsList = response
           this.deptCircularPage.currentPage = response.current
           this.deptCircularPage.currentPage = response.current
           this.deptCircularPage.pageSize = response.size
           this.deptCircularPage.pageSize = response.size
           this.deptBudgetTotal = response.total
           this.deptBudgetTotal = response.total
         })
         })
     },
     },
-    // fujian(row) {
-    //   if (
-    //     row.receiveAttachmentPath === null ||
-    //     row.receiveAttachmentPath === ''
-    //   ) {
-    //     EventBus.$emit(
-    //       'warning',
-    //       this.$t('system.noticeCircular.NoInformation')
-    //     )
-    //   } else {
-    //     this.accessoryTFs = true
-    //   }
-    //   this.appendixIdss = row.receiveAttachmentPath
-    // },
     // 关闭 dialog时 处理文件url 初始化upload组件
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleCloe() {
     handleCloe() {
       this.dialogViewSpareMoney = false
       this.dialogViewSpareMoney = false