qymljy 2 veckor sedan
förälder
incheckning
02142a12b5

+ 21 - 1
src/HDrpManagement/dispatch/details/index.vue

@@ -9,7 +9,7 @@
         idname="sa_dispatchid"
         ownertable="sa_dispatch"
         :isGoDetail="true"
-        detailPath="/saler_orderDetails"
+        :detailPath="detailPath"
         nowDetailPath="/dispatchdetail"
         :detailId="mainData.sa_orderid"
         tags=""
@@ -86,6 +86,7 @@ import dialogTemplateNew from '@/components/dialogTemplate/index1'
             },
           ],
         },
+        detailPath:''
       }
     },
     components:{
@@ -108,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">

+ 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
-  }
+  },
+
+
 
 }