qymljy 10 miesięcy temu
rodzic
commit
3c0f3dc17c

+ 114 - 0
src/HDrpManagement/contractManage/components/linkedOrder.vue

@@ -0,0 +1,114 @@
+<template>
+  <div>
+    <el-input  style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="clearSearchValue" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+    </el-input>
+    <table-detail style="margin-top: 10px" :layout="tablecols" :data="list" height="calc(100vh - 380px)" :custom="true">
+      <template v-slot:customcol="scope">
+        <div v-if="scope.column.columnname === 'sonum'">
+          <el-button type="text" @click="detailGo(scope.column.data)">
+            {{ $t(scope.column.data[scope.column.columnname]) }}
+          </el-button>
+        </div>
+        <div v-else-if="scope.column.columnname === 'amount'">
+          {{tool.formatAmount(scope.column.data[scope.column.columnname],2,' ¥')}}
+        </div>
+        <div :style="tool.getStatusColor(scope.column.data[scope.column.columnname])" v-else-if="scope.column.columnname === 'status'">
+          {{scope.column.data[scope.column.columnname]}}
+        </div>
+        <div v-else>{{scope.column.data[scope.column.columnname] || '--'}}</div>
+      </template>
+    </table-detail>
+    <div class="container normal-panel" style="text-align:right">
+      <el-pagination
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[20, 50, 100, 200]"
+          :page-size="100"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "linkedOrder", //关联订单
+  data() {
+    return {
+      list:[],
+      tablecols:[],
+      currentPage:0,
+      total:0,
+      listqueryid:'',
+      pageTotal:0,
+      param:{
+        "id": 2025022115343002,
+        "content": {
+          "sa_contractid": this.$route.query.id,
+          "where": {
+            "condition": ""
+          },
+          "pageSize": 20,
+          "pageNumber": 1
+        },
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      this.pageTotal = res.pageTotal
+      this.listqueryid = res.listqueryid
+    },
+    clearSearchValue () {
+      this.$store.dispatch('clearSearchValue')
+      this.listData(this.param.content.pageNumber = 1)
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    detailGo(row){
+      let route = this.$route
+      if (route.path !== '/saler_orderDetails') {
+        this.oldRoute = {path:route.path,query:route.query}
+        this.$store.dispatch('setHistoryRouter',this.oldRoute)
+      }
+      sessionStorage.setItem('listqueryid',this.listqueryid)
+      sessionStorage.setItem('isGo','1')
+      this.$router.push({
+        path:'/saler_orderDetails',
+        query:{
+          id:row.sa_orderid,
+          rowindex:row.rowindex,
+          listqueryid:this.listqueryid,
+          fieldname:'sa_order'
+        }
+      })
+      this.$store.dispatch('saveListData',{listData:this.list,param:this.param,pageTotal:this.pageTotal})
+    }
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).linkedOrderTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 69 - 15
src/HDrpManagement/contractManage/modules/detail.vue

@@ -258,6 +258,9 @@
           <BaseInfo  :detailInfo="detailInfo"/>
         </div>
       </div>
+      <div slot="slot5">
+        <linkedOrder></linkedOrder>
+      </div>
     </basicDetails>
   </div>
 </template>
@@ -288,6 +291,7 @@ import importFile from '../components/importFile'
 import copyTo from '../components/copyTo'
 import priceDifference from '../components/priceDifference/index'
 import contactList from '../components/contactList/index'
+import linkedOrder from "../components/linkedOrder";
 import { Loading } from 'element-ui';
 export default {
   name: "detail",
@@ -334,7 +338,8 @@ export default {
     importFile,
     copyTo,
     priceDifference,
-    contactList
+    contactList,
+    linkedOrder
   },
   provide () {
     return {
@@ -387,21 +392,70 @@ export default {
   },
   methods:{
     tabsSet(){
-      switch (this.mainData.type) {
-        case '项目':
-          this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','备用金','详细信息']:['产品明细折扣','产品类别折扣','详细信息']:['产品明细折扣','产品类别折扣','详细信息']
-              break
-        case '框架':
-          this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','业绩目标','备用金','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']
-              break
-        case '居间':
-          this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'contact')?['详细信息','联系人']:['详细信息']:this.tool.checkAuth(this.$route.name,'contact')?['产品明细折扣','产品类别折扣','详细信息','联系人']:['产品明细折扣','产品类别折扣','详细信息']
-              break
-        case '直销':
-          this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','业绩目标','备用金','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']
-              break
-        default:
+      if (this.mainData.type == '项目'){
+        if (this.siteid == 'HY'){
+          if (this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet') && !this.tool.checkAuth(this.$route.name,'linkedOrder')){
+            this.tabs = ['产品明细折扣','产品类别折扣','备用金','详细信息']
+          }else if (this.tool.checkAuth(this.$route.name,'linkedOrder') && !this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')){
+            this.tabs = ['产品明细折扣','产品类别折扣','详细信息','关联订单']
+          }else if (this.tool.checkAuth(this.$route.name,'linkedOrder') && this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')){
+            this.tabs = ['产品明细折扣','产品类别折扣','备用金','详细信息','关联订单']
+          }else {
+            this.tabs = ['产品明细折扣','产品类别折扣','详细信息']
+          }
+        }else {
+          if (this.tool.checkAuth(this.$route.name,'linkedOrder')){
+            this.tabs = ['产品明细折扣','产品类别折扣','详细信息','关联订单']
+          }else {
+            this.tabs = ['产品明细折扣','产品类别折扣','详细信息']
+          }
+        }
+      }else if (this.mainData.type == '框架' || this.mainData.type == '直销' ){
+        if (this.siteid == 'HY'){
+          if (this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet') && !this.tool.checkAuth(this.$route.name,'linkedOrder')){
+            this.tabs = ['产品明细折扣','产品类别折扣','业绩目标','备用金','详细信息']
+          }else if (this.tool.checkAuth(this.$route.name,'linkedOrder') && !this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')){
+            this.tabs = ['产品明细折扣','产品类别折扣','业绩目标','详细信息','关联订单']
+          }else if (this.tool.checkAuth(this.$route.name,'linkedOrder') && this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')){
+            this.tabs = ['产品明细折扣','产品类别折扣','业绩目标','备用金','详细信息','关联订单']
+          }else {
+            this.tabs = ['产品明细折扣','产品类别折扣','业绩目标','详细信息']
+          }
+        }else {
+          if (this.tool.checkAuth(this.$route.name,'linkedOrder')){
+            this.tabs = ['产品明细折扣','产品类别折扣','业绩目标','详细信息','关联订单']
+          }else {
+            this.tabs = ['产品明细折扣','产品类别折扣','业绩目标','详细信息']
+          }
+        }
+      }else if (this.mainData.type == '居间'){
+        if (this.siteid == 'HY'){
+          if (this.tool.checkAuth(this.$route.name,'contact') && !this.tool.checkAuth(this.$route.name,'linkedOrder')){
+            this.tabs = ['详细信息','联系人']
+          }else if (this.tool.checkAuth(this.$route.name,'linkedOrder') && !this.tool.checkAuth(this.$route.name,'contact')){
+            this.tabs = ['详细信息','关联订单']
+          }else if (this.tool.checkAuth(this.$route.name,'linkedOrder') && this.tool.checkAuth(this.$route.name,'contact')){
+            this.tabs = ['详细信息','联系人','关联订单']
+          }else {
+            this.tabs = ['详细信息']
+          }
+        }else {
+          if (this.tool.checkAuth(this.$route.name,'contact') && !this.tool.checkAuth(this.$route.name,'linkedOrder')){
+            this.tabs = ['产品明细折扣','产品类别折扣','详细信息','联系人']
+          }else if (this.tool.checkAuth(this.$route.name,'linkedOrder') && !this.tool.checkAuth(this.$route.name,'contact')){
+            this.tabs = ['产品明细折扣','产品类别折扣','详细信息','关联订单']
+          }else if (this.tool.checkAuth(this.$route.name,'linkedOrder') && this.tool.checkAuth(this.$route.name,'contact')){
+            this.tabs = ['产品明细折扣','产品类别折扣','详细信息','联系人','关联订单']
+          }else {
+            this.tabs = ['产品明细折扣','产品类别折扣','详细信息']
+          }
+        }
+      }else {
+        if (this.tool.checkAuth(this.$route.name,'linkedOrder')){
+          this.tabs = ['工具清单','详细信息','关联订单']
+        }else {
           this.tabs = ['工具清单','详细信息']
+        }
       }
     },
     editSuccess(){