Browse Source

Merge branch 'mergeBranch' into greenUrgent

qymljy 3 days ago
parent
commit
36cff44d7e

+ 24 - 0
src/HDrpManagement/dispatch/details/index.vue

@@ -8,6 +8,10 @@
         turnPageId="20221114135403"
         idname="sa_dispatchid"
         ownertable="sa_dispatch"
+        :isGoDetail="true"
+        :detailPath="detailPath"
+        nowDetailPath="/dispatchdetail"
+        :detailId="mainData.sa_orderid"
         tags=""
         :tabs="['发货明细','erp上传信息','基础信息']"
         @pageChange="pageChange"
@@ -82,6 +86,7 @@ import dialogTemplateNew from '@/components/dialogTemplate/index1'
             },
           ],
         },
+        detailPath:''
       }
     },
     components:{
@@ -104,7 +109,26 @@ import dialogTemplateNew from '@/components/dialogTemplate/index1'
         if (res.data) this.mainData = res.data
         console.log(this.mainData)
         this.changeDataStructure()
+        this.setDetailPath()
       },
+      /*设置调整详情页的地址*/
+      async setDetailPath(){
+        const usertype = JSON.parse(sessionStorage.getItem('active_account')).usertype
+        if (usertype == 0){
+          this.detailPath = '/orderdetail'
+        }else if (usertype == 21 || usertype == 22){
+          this.detailPath = '/agent_orderDetails'
+        }else if (usertype == 1) {
+          const hrid = JSON.parse(sessionStorage.getItem('active_account')).hrid
+          const res = await this.$store.dispatch('isSalesperson',hrid)
+          if (res.issalehr == 1){
+            this.detailPath = '/saler_orderDetails'
+          }else {
+            this.detailPath = '/orderdetail'
+          }
+        }
+      },
+
       changeDataStructure() {
         let that = this
         this.mainAreaData = [

+ 1 - 1
src/HDrpManagement/logistics/modules/add.vue

@@ -19,7 +19,7 @@
           <logisticcom ref="logis" :ID="true" @logisticRowClick="logisticRowClick"></logisticcom>
         </el-form-item>
         <el-form-item :label="$t(`物流单号`)">
-          <el-input v-model="form.billno" :placeholder="$t(`物流单号`)"></el-input>
+          <el-input v-model="form.logisticno" :placeholder="$t(`物流单号`)"></el-input>
         </el-form-item>
         <el-form-item :label="$t(`寄付方式`)">
           <el-select v-model="form.paytype" :placeholder="$t('请选择')" @change="selectChange" :disabled="isCorrelate > 0">

+ 5 - 0
src/HDrpManagement/logistics/modules/productlist.vue

@@ -12,6 +12,11 @@
         width="55"
         align="center">
       </el-table-column> -->
+      <el-table-column
+          prop="rowno"
+          width="55"
+          :label="$t('行号')">
+      </el-table-column>
       <el-table-column
         prop="itemname"
        :label="$t('产品名称')">

+ 19 - 1
src/components/normal-basic-layout/details/index.vue

@@ -62,6 +62,12 @@
               </span>
               <span v-else>--</span>
             </span>
+            <span v-else-if="item.label == '订单号' && isGoDetail">
+              <el-button v-if="item.value !== '--'" type="text" @click="onGoDetail" style="margin: 0;padding: 0">
+                  {{$t(item.value)}}
+                </el-button>
+                <span v-else>--</span>
+            </span>
             <span v-else :style="item.style?item.style():''">{{item.value !== ''?$t(item.value):'--'}}</span>
           </el-descriptions-item>
         </el-descriptions>
@@ -130,7 +136,8 @@ import taskTemp from './modules/task/index.vue'
 import reportCenter from '../reportCenter/index'
 import {mapGetters} from 'vuex'
 export default {
-  props:['titleText','mainAreaData','turnPageId','delApiId','idname','ownertable','formPath','oldFormPath','editData','tags','tabs','statusCheck','pageChange','justsaler','mainData','status','typeTask','isGroup','isBatch','modelName','isDelete','column','attachmentDisabled','disabled'],
+  props:['titleText','mainAreaData','turnPageId','delApiId','idname','ownertable','formPath','oldFormPath','editData','tags','tabs','statusCheck','pageChange','justsaler',
+    'mainData','status','typeTask','isGroup','isBatch','modelName','isDelete','column','attachmentDisabled','disabled','isGoDetail','detailPath','nowDetailPath','detailId'],
   data () {
     return {
       drawer:false,
@@ -498,6 +505,17 @@ export default {
         },500)
       })
     },
+    onGoDetail(){
+      let route = this.$route
+      if (route.path == this.nowDetailPath) {
+        this.oldRoute = {path:route.path,query:route.query}
+        this.$store.dispatch('setHistoryRouter',this.oldRoute)
+      }
+      this.$router.push({
+        path:this.detailPath,
+        query:{id:this.detailId,rowindex:this.editData.rowindex}
+      })
+    },
     logSuccess(){
       this.$emit('logSuccess')
     },

+ 18 - 0
src/store/index.js

@@ -344,6 +344,23 @@ export default new Vuex.Store({
       })
     },
 
+    /*判断是否业务员*/
+    async isSalesperson({
+        commit
+      },param) {
+      return new Promise(async (reslove,reject) =>{
+        let obj = {
+          "classname": "webmanage.hr.hr",
+          "method": "query_hrMain",
+          "content": {
+            "hrid":param
+          }
+        }
+        const res = await api.requested(obj)
+        reslove(res.data)
+      })
+    },
+
     // 设置权限状态
     pageOnlyRead({
       commit
@@ -456,6 +473,7 @@ export default new Vuex.Store({
       commit('saveListData', data)
     },
 
+
   },
   modules: {},
 });

+ 3 - 1
src/utils/tool.js

@@ -353,6 +353,8 @@ export default {
     let newQty
     qty?newQty = qty:qty == 0?newQty = '0':qty = '--'
     return newQty
-  }
+  },
+
+
 
 }