gjy 2 年之前
父節點
當前提交
75f9ae5af0

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

@@ -38,4 +38,14 @@ export const API_POST_SETTLED_EXAMINE = '/settledCompanyInfo/api/examine'
 export const API_POST_DELETE_SETTLED = '/settledCompanyInfo/api/deleteSettledCompanyInfo'
 //客服留言列表
 export const API_GET_OPENSERVICE_LIST = '/openServiceInfo/selectOpenServiceList'
+// 交易信息列表
+export const API_GET_TRANSATION_LIST = '/transactionExchangeInfo/selectTransactionExchangeInfo'
+// 交易信息查看
+export const API_GET_TRANSATION = '/transactionExchangeInfo/selectExchangeInfo'
+// 交易信息删除
+export const API_DEL_TRANSATION = '/transactionExchangeInfo/deleteInfo'
+// 交易信息审核
+export const API_ADUIT_TRANSATION = '/transactionExchangeInfo/editInfo'
+// 交易信息用户状态
+export const API_EDIT_USER_TRANSATION = '/transactionExchangeInfo/editUser'
 

+ 15 - 0
src/model/platformaudit/index.js

@@ -21,6 +21,11 @@ import {
     API_POST_EDIT_SETTLEDCOMPANY,
     API_POST_SETTLED_EXAMINE,
     API_POST_DELETE_SETTLED,
+    API_GET_TRANSATION_LIST,
+    API_GET_TRANSATION,
+    API_DEL_TRANSATION,
+    API_ADUIT_TRANSATION,
+    API_EDIT_USER_TRANSATION
 } from '@/api/V2/platformaudit'
 // import { app } from 'electron'
 // 粮商审核
@@ -63,3 +68,13 @@ export const settledExamine = appRx.post(API_POST_SETTLED_EXAMINE, errorCatcher,
 export const deleteSettled = appRx.post(API_POST_DELETE_SETTLED, errorCatcher, errorHandle, filter)
 //客服留言列表
 export const openServiceList = appRx.get(API_GET_OPENSERVICE_LIST,errorCatcher, errorHandle, filter)
+// 交易信息列表
+export const gettransationList = appRx.get(API_GET_TRANSATION_LIST,errorCatcher, errorHandle, filter)
+// 交易信息查看
+export const gettransation = appRx.get(API_GET_TRANSATION,errorCatcher, errorHandle, filter)
+// 交易信息删除
+export const transationdelete = appRx.post(API_DEL_TRANSATION,errorCatcher, errorHandle, filter)
+// 交易信息审核
+export const transationaduit = appRx.post(API_ADUIT_TRANSATION,errorCatcher, errorHandle, filter)
+// 交易信息用户状态修改
+export const transationedituser = appRx.post(API_EDIT_USER_TRANSATION,errorCatcher, errorHandle, filter)

+ 14 - 14
src/views/platformAudit/component/routers/route.js

@@ -107,20 +107,20 @@ const platformauditRouter = {
             },
         },
         //交易信息审核
-        // {
-        //     path: 'tradeInformation',
-        //     component: () =>
-        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/tradeInformation'),
-        //     name: 'tradeInformation',
-        //     meta: {
-        //         title: 'tradeInformation',
-        //         shortcutEntrance: 'tradeInformation',
-        //         module: 'audit.grainMerchant.grainMerchantInfo.review',
-        //         permissicon: [],
-        //         keepAlive: true,
-        //         _title: '交易信息审核'
-        //     },
-        // },
+        {
+            path: 'tradeInformation',
+            component: () =>
+                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/tradeInformation'),
+            name: 'tradeInformation',
+            meta: {
+                title: 'tradeInformation',
+                shortcutEntrance: 'tradeInformation',
+                module: 'audit.grainMerchant.grainMerchantInfo.review',
+                permissicon: [],
+                keepAlive: true,
+                _title: '交易信息审核'
+            },
+        },
         // 客服留言
         {
             path: 'customerService',

+ 600 - 0
src/views/platformAudit/tradeInformation.vue

@@ -0,0 +1,600 @@
+<!--交易信息审核-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="15">
+      <template slot="right">
+        <ws-select v-model="statustext" placeholder="" class="typeselect" @change="selectExamineType">
+          <ws-option v-for="item in searchTypeList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <ws-input class='findinput' v-model="searchKeyWord" placeholder="可按账号、发布者昵称查找" clearable maxlength="500"
+          @keyup.enter.native="lookUp()" type="input"></ws-input>
+        <ws-button class="find" type="primary" @click="lookUp()"><img width="16" height="16" style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+        <!-- </div> -->
+      </template>
+    </BaseHeaderLayout>
+      <el-table class="wenzi" :data="dynamicsList.records" style="width: 100%" height="calc(100% - 110px)">
+        <el-table-column type="index" label="序号" width="50">
+          <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="publisher" label="昵称">
+        </el-table-column>
+        <el-table-column prop="phone" label="账号">
+          <template scope="scope">
+            {{scope.row.commonUser?scope.row.commonUser.phone:''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="placeDelivery" label="交货地/货源地"> </el-table-column>
+        <el-table-column prop="tranType" label="类型"> </el-table-column>
+        <el-table-column prop="title" label="用户状态">
+          <template slot-scope="scope">
+            <el-select  v-model="scope.row.flag" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'>
+            <el-option label="自动通过" value="自动通过"
+              style="color: #8890b1" />
+              <el-option label="需审核" value="需审核"
+              style="color: #8890b1" />
+              <el-option label="禁止发布" value="禁止发布"
+              style="color: #8890b1" />
+          </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column prop="updateDate" label="更新时间" width="140">
+        </el-table-column>
+        <el-table-column prop="" label="操作" width="180">
+          <template slot-scope="scope">
+            <div class="recordafter" @click="nocomplete(scope.row)"
+             >
+              查看
+            </div>
+            <div class="record" @click="deleteclick(scope.row)"
+              >
+              删除
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="address" label="审核">
+          <!-- class="record"
+           class="record" -->
+          <template slot-scope="scope">
+            <div class="recordafter" v-if="scope.row.status == '待审核'" @click="rejectList(scope.row)">
+              驳回
+            </div>
+            <div class="record" v-if="scope.row.status == '待审核'" @click="adoptList(scope.row)"
+              v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`">
+              通过
+            </div>
+            <template v-else v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`" slot-scope="scope">
+              {{ scope.row.status }}
+            </template>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+    <!--动态信息-->
+    <el-dialog width="40%" title="查看交易信息" :visible.sync="dialogFormVisible" :append-to-body="true">
+      <el-form class="customer" :model="form">
+        <el-form-item label="发布人" :label-width="formLabelWidth">
+          {{ SettledCompanyDynamicsList.publisher }}({{ SettledCompanyDynamicsList.tranType }})
+        </el-form-item>
+        <el-form-item label="交货地/货源地" :label-width="formLabelWidth">
+          {{ SettledCompanyDynamicsList.placeDelivery }}
+        </el-form-item>
+        <el-form-item label="发布内容" :label-width="formLabelWidth">
+          {{ SettledCompanyDynamicsList.publishingContent }}
+        </el-form-item>
+
+        <el-form-item label="附件" :label-width="formLabelWidth">
+          <div v-if="SettledCompanyDynamicsList.address">
+           <div :key="index" v-for="(item, index) in SettledCompanyDynamicsList.address">
+            <img style="float:left" v-if="item" :src="item" class="avatar">
+          </div> 
+          </div>
+          <div v-else>暂无附件</div>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <span v-if="SettledCompanyDynamicsList.status == '待审核'">
+          <el-button @click="reject(id)">驳回</el-button>
+          <el-button @click="adopt(id)">通过</el-button>
+        </span>
+        <span v-else>
+          <el-button @click="dialogFormVisible = fase">关闭</el-button>
+        </span>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+  import {
+    gettransation,
+    gettransationList,
+    transationdelete,
+    transationaduit,
+    transationedituser
+  } from '@/model/platformaudit/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogFormVisible: false,
+        dialogViewSpareMoney: false,
+        // 表格显示数据
+        tableDate: [],
+        wrapstatus: false,
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        currentPage: 1,
+        pageSize: 10,
+        status:'',
+        statustext:'全部',
+        deptBudgetTotal: 0,
+        searchTypeText: '待审核',
+        searchKeyWord: '',
+        imgUrl: '',
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        searchType: 1,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        dynamicsList: [],
+        pcFlag: 1,
+        formLabelWidth: '120px',
+        form: {},
+        SettledCompanyDynamicsList: {
+          compName: '',
+          title: '',
+          content: '',
+          address: '',
+          city: '',
+        },
+        deptBudgetList: {},
+        searchTypeList: [{
+            value: '待审核',
+            type: 1
+          },
+          {
+            value: '已通过',
+            type: 2
+          },
+          {
+            value: '已驳回',
+            type: 2
+          },
+          {
+            value: '全部',
+            type: ''
+          },
+        ],
+        settledCompanyDynamicsInfo: {
+          id: '',
+          flag: '',
+        },
+        accessoryTFs: false,
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      selectstatuschange(e,row){
+        transationedituser(row)
+              .toPromise()
+              .then((response) => {
+                this.getList()
+              })
+      },
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+      deleteclick(row) {
+        this.$confirm(`确定删除交易信息?`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationdelete({
+                id: row.id,
+              })
+              .toPromise()
+              .then((response) => {
+                this.getList()
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      selectExamineType(e) {
+        for (var i = 0; i < this.searchTypeList.length; i++) {
+          if (this.searchTypeList[i].value == e) {
+            if(e=='全部'){
+              this.status =''
+            }else{
+              this.status = this.searchTypeList[i].value
+            }
+            
+          }
+        }
+
+        this.currentPage = 1
+        this.getList()
+      },
+      nocomplete(row) {
+        gettransation({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.SettledCompanyDynamicsList = response
+            if (response.urlImg != null) {
+              this.SettledCompanyDynamicsList.address = response.urlImg.split(',')
+            }
+            this.id = response.id
+          })
+        this.dialogFormVisible = true
+      },
+      //审核通过
+      adopt(id) {
+        this.settledCompanyDynamicsInfo.flag = 1
+        this.settledCompanyDynamicsInfo.id = id
+        this.$confirm(`确定通过交易信息?`, '提示', {
+            confirmButtonText: '通过',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationaduit(this.settledCompanyDynamicsInfo)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '通过成功',
+                })
+                this.dialogFormVisible = false
+                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(`确定通过交易信息?`, '提示', {
+            confirmButtonText: '通过',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationaduit(this.settledCompanyDynamicsInfo)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '通过成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                EventBus.$emit('error', response.message)
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      //审核驳回
+      reject(id) {
+        this.settledCompanyDynamicsInfo.flag = 2
+        this.settledCompanyDynamicsInfo.id = id
+        this.$confirm(`确定驳回交易信息?`, '提示', {
+            confirmButtonText: '驳回',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationaduit(this.settledCompanyDynamicsInfo)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '驳回成功',
+                })
+                this.dialogFormVisible = false
+                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(`确定驳回交易信息?`, '提示', {
+            confirmButtonText: '驳回',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationaduit(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
+          })
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      //粮脉动态列表
+      getList() {
+        gettransationList({
+            status:this.status,
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchKeyWord: this.searchKeyWord
+          })
+          .toPromise()
+          .then((response) => {
+            if(response.records.length>0){
+              for (let i = 0; i < response.records.length; i++) {
+                if(!response.records[i].commonUser.transactionStatus){
+                  response.records[i].flag='需审核'
+                }else{
+                  response.records[i].flag=response.records[i].commonUser.transactionStatus
+                }
+                
+              }
+            }
+            
+            this.dynamicsList = response
+            this.deptCircularPage.currentPage = response.current
+            this.deptCircularPage.pageSize = response.size
+            this.deptBudgetTotal = response.total
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    width: 100%;
+    margin: 0 auto;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-button--default {
+    color: #8890b1;
+    border-color: #e8eaf1;
+  }
+
+  /deep/.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    margin-left: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+
+  /deep/.findValue .el-input__inner {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+
+  //操作按钮
+  .record,
+  .recordafter,
+  .adjustment {
+    display: inline-block;
+    color: #5878e8;
+    padding: 0 4px !important;
+    position: relative;
+    font-size: 14px;
+  }
+
+  .recordafter:after {
+    position: absolute;
+    content: '';
+    display: block;
+    top: 5px;
+    right: -2px;
+    width: 1px;
+    height: 12px;
+    background: #e9ecf7;
+  }
+
+  //状态样式
+  .executory,
+  .inExecution,
+  .done {
+    width: 6px;
+    height: 6px;
+    display: inline-block;
+    border-radius: 50%;
+    position: relative;
+    top: -1px;
+    font-size: 14px;
+  }
+
+  .executory {
+    background: #ff9f24;
+  }
+
+  .inExecution {
+    background: #5878e8;
+  }
+
+  .done {
+    background: #50cad4;
+  }
+
+  .putstorage.el-button--default,
+  .deliverystorage.el-button--default {
+    border-color: #8890b1;
+    background-color: #fff;
+    color: #8890b1;
+  }
+
+  /deep/.el-table td,
+  /deep/.el-table th.is-leaf {
+    border-right: 1px solid #e9ecf7;
+    text-align: center;
+  }
+
+  /deep/.el-table tr td:first-child,
+  /deep/.el-table tr th.is-leaf:first-child {
+    border-left: 1px solid #e9ecf7;
+  }
+
+  .el-row {
+    height: 60px;
+  }
+
+  .base_header_layout .grid-content {
+    margin-top: 80px;
+  }
+
+  .el-input--small .el-input__inner {
+    margin-left: 20px;
+  }
+
+  .el-range-editor--small.el-input__inner {
+    height: 32px;
+    margin: 0 10px;
+  }
+
+  /deep/.el-pagination {
+    text-align: center;
+    white-space: nowrap;
+    padding: 2px 5px;
+    color: #303133;
+    font-weight: 700;
+    margin-bottom: 20px;
+  }
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+
+  .el-tag+.el-tag {
+    margin-left: 10px;
+  }
+
+  .button-new-tag {
+    margin-left: 10px;
+    height: 32px;
+    line-height: 30px;
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+
+  .input-new-tag {
+    width: 90px;
+    margin-left: 10px;
+    vertical-align: bottom;
+  }
+
+  .customer .el-form-item {
+    border-bottom: 1px solid #ccc;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+
+  .shade {
+    background: rgba(0, 0, 0, 0.1);
+  }
+
+  /deep/.base_header_layout .find.el-button--primary {
+    width: 30px;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+
+  /deep/.base_header_layout .findinput input {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+</style>