yusheng 1 год назад
Родитель
Сommit
c71545d4a3

BIN
public/importTemplate/销售订单导入模板.xlsx


+ 1 - 0
src/components/addDoc/file-edit.vue

@@ -185,6 +185,7 @@
         await this.$nextTick(() => {
           nodeData = this.$refs.cascaderRef.getCheckedNodes();
         });
+        console.log(nodeData,'nodeData')
         this.nodeDataCode = nodeData[0]?.data?.code;
       },
       async initFileCode() {

+ 7 - 2
src/layout/components/header-tools.vue

@@ -90,6 +90,8 @@ import { logout } from '@/utils/page-tab-util';
 import { userLogout } from '@/api/system/user';
 import { SYSTEM_NAME } from '@/config/setting';
 import router from '@/router/index';
+import { getCurrentUser,setCurrentUser } from '@/utils/token-util';
+
 export default {
   components: { HeaderNotice, PasswordModal, SettingDrawer, I18nIcon },
   props: {
@@ -111,7 +113,7 @@ export default {
     };
   },
   created() {
-    this.currentUser = JSON.parse(sessionStorage['currentUser']);
+    this.currentUser = getCurrentUser()
     this.groupId =  this.currentUser.currentGroupId;
     this.roleId =  this.currentUser.currentRoleId;
   },
@@ -139,7 +141,10 @@ export default {
       this.roleId = val;
       this.currentUser.currentGroupId = this.groupId;
       this.currentUser.currentRoleId = val;
-      sessionStorage['currentUser']=JSON.stringify(this.currentUser)
+      // return
+      setCurrentUser(this.currentUser)
+      
+      // sessionStorage['currentUser']=JSON.stringify()
       this.$store
         .dispatch('user/fetchUserInfo')
         .then(({ menus, homePath, authoritiesRouter }) => {

+ 4 - 4
src/router/index.js

@@ -6,7 +6,7 @@ import NProgress from 'nprogress';
 import VueRouter from 'vue-router';
 import { WHITE_LIST, REDIRECT_PATH, LAYOUT_PATH } from '@/config/setting';
 import store from '@/store';
-import { getToken, setToken } from '@/utils/token-util';
+import { getToken, setToken, getCurrentUser  } from '@/utils/token-util';
 
 import { routes, getMenuRoutes } from './routes';
 import { SYSTEM_NAME } from '@/config/setting';
@@ -93,9 +93,9 @@ router.afterEach((to) => {
   }
 });
 router.roleChange = async ({ menus, homePath, authoritiesRouter }) => {
-  const currentUser = JSON.parse(sessionStorage['currentUser']);
-
-  if (menus && menus.length > 0) {
+  // const currentUser = JSON.parse(sessionStorage['currentUser']);
+  const currentUser = getCurrentUser()
+    if (menus && menus.length > 0) {
     router.addRoute(
       getMenuRoutes([...menus, ...authoritiesRouter], homePath)
     );

+ 8 - 1
src/store/modules/user.js

@@ -7,6 +7,8 @@ import { getResourcesTree } from '@/api/layout';
 import { SYSTEM_NAME } from '@/config/setting';
 import Vue from 'vue';
 import { getCurrentUserAuthorityDeptAPI } from '@/api/login';
+import { getCurrentUser,setCurrentUser } from '@/utils/token-util';
+
 
 const formatRouter = (list) => {
   let menuList = []; // menuType
@@ -123,12 +125,17 @@ export default {
     // },
     //动态路由
     async fetchUserInfo({ commit, state }) {
-      let currentUser = JSON.parse(sessionStorage['currentUser']);
+  
+
+      let currentUser = getCurrentUser()
+
       const result = await getResourcesTree({
         groupId: currentUser.currentGroupId,
         roleId: currentUser.currentRoleId
       }).catch(() => {});
       const list = result.filter((i) => i.path === `/page-${SYSTEM_NAME}`);
+      console.log(list,'list')
+      
       if (!list?.length) {
         return {};
       }

+ 2 - 1
src/utils/page-tab-util.js

@@ -4,7 +4,7 @@
 import store from '@/store';
 import router from '@/router';
 import { Message } from 'element-ui';
-import { removeToken } from '@/utils/token-util';
+import { removeToken,removeCurrentUser } from '@/utils/token-util';
 import { setDocumentTitle } from '@/utils/document-title-util';
 import { SYSTEM_NAME } from '@/config/setting';
 import {
@@ -242,6 +242,7 @@ export function goHomeRoute(from) {
  */
 export function logout(route, from) {
   removeToken();
+  removeCurrentUser();
   if (route) {
     router.push({
       path: '/login',

+ 33 - 0
src/utils/token-util.js

@@ -30,6 +30,32 @@ export function setToken(token, remember) {
   }
 }
 
+/**
+ * 获取缓存的 当前登陆角色
+ */
+export function getCurrentUser() {
+  let currentUser = sessionStorage.getItem('currentUser');
+  if (!currentUser) {
+    currentUser = localStorage.getItem('currentUser');
+  }
+  return JSON.parse(currentUser);
+}
+
+/**
+ * 缓存 当前登陆角色
+ * @param token token
+ * @param remember 是否永久存储
+ */
+export function setCurrentUser(currentUser, remember) {
+  removeCurrentUser()
+  if (currentUser) {
+    if (remember) {
+      localStorage.setItem('currentUser', JSON.stringify(currentUser));
+    } else {
+      sessionStorage.setItem('currentUser', JSON.stringify(currentUser));
+    }
+  }
+}
 /**
  * 移除 token
  */
@@ -37,3 +63,10 @@ export function removeToken() {
   localStorage.removeItem(TOKEN_STORE_NAME);
   sessionStorage.removeItem(TOKEN_STORE_NAME);
 }
+/**
+ * 移除 currentUser
+ */
+export function removeCurrentUser() {
+  localStorage.removeItem('currentUser');
+  sessionStorage.removeItem('currentUser');
+}

+ 1 - 2
src/views/home/index.vue

@@ -131,7 +131,6 @@
                 }
               }
             ],
-            '(条)'
           );
           this.barOption1 = barOption(
             res.payableAndReceivableGroup.monthName,
@@ -151,7 +150,7 @@
                 yAxisIndex: 0 // 使用第一个Y轴
               }
             ],
-            '(元)'
+            '(元)'
           );
           setTimeout(() => {
             this.$refs.barRef.resize();

+ 226 - 221
src/views/login/index.vue

@@ -107,261 +107,266 @@
 </template>
 
 <script>
-import I18nIcon from '@/layout/components/i18n-icon.vue';
-import { getToken } from '@/utils/token-util';
-import { login, getCaptcha, sub } from '@/api/login';
-import { SYSTEM_NAME } from '@/config/setting';
-export default {
-  // eslint-disable-next-line vue/multi-word-component-names
-  name: 'Login',
-  components: { I18nIcon },
-  data() {
-    return {
-      // 登录框方向, 0居中, 1居右, 2居左
-      direction: 0,
-      // 加载状态
-      loading: false,
-      // 表单数据
-      form: {
-        loginName: 'mes111',
-        loginPwd: '123456',
-        remember: true
-      },
-      // 验证码base64数据
-      captcha: '',
-      // 验证码内容, 实际项目去掉
-      text: ''
-    };
-  },
-  computed: {
-    // 表单验证规则
-    rules() {
+  import I18nIcon from '@/layout/components/i18n-icon.vue';
+  import { getToken } from '@/utils/token-util';
+  import { login, getCaptcha, sub } from '@/api/login';
+  import { SYSTEM_NAME } from '@/config/setting';
+  import { setCurrentUser } from '@/utils/token-util';
+
+  export default {
+    // eslint-disable-next-line vue/multi-word-component-names
+    name: 'Login',
+    components: { I18nIcon },
+    data() {
       return {
-        loginName: [
-          {
-            required: true,
-            message: this.$t('login.loginName'),
-            type: 'string',
-            trigger: 'blur'
-          }
-        ],
-        loginPwd: [
-          {
-            required: true,
-            message: this.$t('login.loginPwd'),
-            type: 'string',
-            trigger: 'blur'
-          }
-        ]
+        // 登录框方向, 0居中, 1居右, 2居左
+        direction: 0,
+        // 加载状态
+        loading: false,
+        // 表单数据
+        form: {
+          loginName: 'mes111',
+          loginPwd: '123456',
+          remember: true
+        },
+        // 验证码base64数据
+        captcha: '',
+        // 验证码内容, 实际项目去掉
+        text: ''
       };
-    }
-  },
-  created() {
-    if (getToken()) {
-      this.goHome();
-    } else {
-      // 重置菜单权限
-      this.$store.commit('user/setMenus', null);
-    }
-  },
-  methods: {
-    /* 提交 */
-    submit() {
-      this.$refs.form.validate((valid) => {
-        if (!valid) {
-          return false;
-        }
-        this.loading = true;
-        login(this.form)
-          .then((res) => {
-            localStorage.setItem(`userId-${SYSTEM_NAME}`, res.data.userId);
-            // 当前登录信息
-            if (res.data?.loginChangeGroupVOList.length > 0) {
-              sessionStorage['currentUser'] = JSON.stringify({
-                currentGroupId: res.data.loginChangeGroupVOList[0].groupId,
-                currentRoleId:
-                  res.data.loginChangeGroupVOList[0].loginChangeRoleVOList[0]
-                    .roleId
-              });
+    },
+    computed: {
+      // 表单验证规则
+      rules() {
+        return {
+          loginName: [
+            {
+              required: true,
+              message: this.$t('login.loginName'),
+              type: 'string',
+              trigger: 'blur'
+            }
+          ],
+          loginPwd: [
+            {
+              required: true,
+              message: this.$t('login.loginPwd'),
+              type: 'string',
+              trigger: 'blur'
             }
-            this.$store.commit('user/setUserInfo', res.data);
-            this.loading = false;
-            this.$message.success(res.message);
+          ]
+        };
+      }
+    },
+    created() {
+      if (getToken()) {
+        this.goHome();
+      } else {
+        // 重置菜单权限
+        this.$store.commit('user/setMenus', null);
+      }
+    },
+    methods: {
+      /* 提交 */
+      submit() {
+        this.$refs.form.validate((valid) => {
+          if (!valid) {
+            return false;
+          }
+          this.loading = true;
+          login(this.form)
+            .then((res) => {
+              localStorage.setItem(`userId-${SYSTEM_NAME}`, res.data.userId);
+              // 当前登录信息
+              if (res.data?.loginChangeGroupVOList.length > 0) {
+                setCurrentUser(
+                  {
+                    currentGroupId: res.data.loginChangeGroupVOList[0].groupId,
+                    currentRoleId:
+                      res.data.loginChangeGroupVOList[0]
+                        .loginChangeRoleVOList[0].roleId
+                  },
+                  this.form.remember
+                );
+              }
+              this.$store.commit('user/setUserInfo', res.data);
+              this.loading = false;
+              this.$message.success(res.message);
 
-            this.$store.dispatch('user/getCurrentUserAuthorityDept');
-            this.$store.dispatch('paramsSetData/setParamsDataInfo');
-            this.goHome();
+              this.$store.dispatch('user/getCurrentUserAuthorityDept');
+              this.$store.dispatch('paramsSetData/setParamsDataInfo');
+              this.goHome();
+            })
+            .catch((e) => {
+              this.loading = false;
+              // this.$message.error(e.message);
+            });
+        });
+      },
+      /* 跳转到首页 */
+      goHome() {
+        this.$router
+          .push(this.$route?.query?.from ?? '/home/index')
+          .catch(() => {});
+      },
+      /* 更换图形验证码 */
+      changeCaptcha() {
+        // 这里演示的验证码是后端返回base64格式的形式, 如果后端地址直接是图片请参考忘记密码页面
+        getCaptcha()
+          .then((data) => {
+            this.captcha = data.base64;
+            // 实际项目后端一般会返回验证码的key而不是直接返回验证码的内容, 登录用key去验证, 可以根据自己后端接口修改
+            this.text = data.text;
+            // 自动回填验证码, 实际项目去掉这个
+            this.form.code = this.text;
+            this.$refs?.form?.clearValidate();
           })
           .catch((e) => {
-            this.loading = false;
             // this.$message.error(e.message);
           });
-      });
-    },
-    /* 跳转到首页 */
-    goHome() {
-      this.$router
-        .push(this.$route?.query?.from ?? '/home/index')
-        .catch(() => {});
-    },
-    /* 更换图形验证码 */
-    changeCaptcha() {
-      // 这里演示的验证码是后端返回base64格式的形式, 如果后端地址直接是图片请参考忘记密码页面
-      getCaptcha()
-        .then((data) => {
-          this.captcha = data.base64;
-          // 实际项目后端一般会返回验证码的key而不是直接返回验证码的内容, 登录用key去验证, 可以根据自己后端接口修改
-          this.text = data.text;
-          // 自动回填验证码, 实际项目去掉这个
-          this.form.code = this.text;
-          this.$refs?.form?.clearValidate();
-        })
-        .catch((e) => {
-          // this.$message.error(e.message);
-        });
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-/* 背景 */
-.login-wrapper {
-  padding: 50px 20px;
-  position: relative;
-  box-sizing: border-box;
-  background-image: url('@/assets/bg-login.jpg');
-  background-repeat: no-repeat;
-  background-size: cover;
-  min-height: 100vh;
+  /* 背景 */
+  .login-wrapper {
+    padding: 50px 20px;
+    position: relative;
+    box-sizing: border-box;
+    background-image: url('@/assets/bg-login.jpg');
+    background-repeat: no-repeat;
+    background-size: cover;
+    min-height: 100vh;
 
-  &:before {
-    content: '';
-    background-color: rgba(0, 0, 0, 0.2);
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
+    &:before {
+      content: '';
+      background-color: rgba(0, 0, 0, 0.2);
+      position: absolute;
+      top: 0;
+      left: 0;
+      right: 0;
+      bottom: 0;
+    }
   }
-}
 
-/* 卡片 */
-.login-form {
-  margin: 0 auto;
-  width: 360px;
-  max-width: 100%;
-  padding: 25px 30px;
-  position: relative;
-  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
-  box-sizing: border-box;
-  border-radius: 4px;
-  z-index: 2;
+  /* 卡片 */
+  .login-form {
+    margin: 0 auto;
+    width: 360px;
+    max-width: 100%;
+    padding: 25px 30px;
+    position: relative;
+    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
+    box-sizing: border-box;
+    border-radius: 4px;
+    z-index: 2;
 
-  h4 {
-    text-align: center;
-    margin: 0 0 25px 0;
-  }
+    h4 {
+      text-align: center;
+      margin: 0 0 25px 0;
+    }
 
-  & > .el-form-item {
-    margin-bottom: 25px;
+    & > .el-form-item {
+      margin-bottom: 25px;
+    }
   }
-}
 
-.login-form-right .login-form {
-  margin: 0 15% 0 auto;
-}
-
-.login-form-left .login-form {
-  margin: 0 auto 0 15%;
-}
-
-/* 验证码 */
-.login-input-group {
-  display: flex;
-  align-items: center;
-
-  :deep(.el-input) {
-    flex: 1;
+  .login-form-right .login-form {
+    margin: 0 15% 0 auto;
   }
-}
 
-.login-captcha {
-  height: 38px;
-  width: 102px;
-  margin-left: 10px;
-  border-radius: 4px;
-  border: 1px solid #dcdfe6;
-  text-align: center;
-  cursor: pointer;
-
-  &:hover {
-    opacity: 0.75;
+  .login-form-left .login-form {
+    margin: 0 auto 0 15%;
   }
-}
 
-.login-btn {
-  display: block;
-  width: 100%;
-}
+  /* 验证码 */
+  .login-input-group {
+    display: flex;
+    align-items: center;
 
-/* 第三方登录图标 */
-.login-oauth-icon {
-  color: #fff;
-  padding: 5px;
-  margin: 0 10px;
-  font-size: 18px;
-  border-radius: 50%;
-  cursor: pointer;
-}
+    :deep(.el-input) {
+      flex: 1;
+    }
+  }
 
-/* 底部版权 */
-.login-copyright {
-  color: #eee;
-  padding-top: 20px;
-  text-align: center;
-  position: relative;
-  z-index: 1;
-}
+  .login-captcha {
+    height: 38px;
+    width: 102px;
+    margin-left: 10px;
+    border-radius: 4px;
+    border: 1px solid #dcdfe6;
+    text-align: center;
+    cursor: pointer;
 
-/* 响应式 */
-@media screen and (min-height: 550px) {
-  .login-form {
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    transform: translateX(-50%);
-    margin-top: -220px;
+    &:hover {
+      opacity: 0.75;
+    }
   }
 
-  .login-form-right .login-form,
-  .login-form-left .login-form {
-    left: auto;
-    right: 15%;
-    transform: translateX(0);
-    margin: -220px auto auto auto;
+  .login-btn {
+    display: block;
+    width: 100%;
   }
 
-  .login-form-left .login-form {
-    right: auto;
-    left: 15%;
+  /* 第三方登录图标 */
+  .login-oauth-icon {
+    color: #fff;
+    padding: 5px;
+    margin: 0 10px;
+    font-size: 18px;
+    border-radius: 50%;
+    cursor: pointer;
   }
 
+  /* 底部版权 */
   .login-copyright {
-    position: absolute;
-    bottom: 20px;
-    right: 0;
-    left: 0;
+    color: #eee;
+    padding-top: 20px;
+    text-align: center;
+    position: relative;
+    z-index: 1;
   }
-}
 
-@media screen and (max-width: 768px) {
-  .login-form-right .login-form,
-  .login-form-left .login-form {
-    left: 50%;
-    right: auto;
-    transform: translateX(-50%);
-    margin-right: auto;
+  /* 响应式 */
+  @media screen and (min-height: 550px) {
+    .login-form {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translateX(-50%);
+      margin-top: -220px;
+    }
+
+    .login-form-right .login-form,
+    .login-form-left .login-form {
+      left: auto;
+      right: 15%;
+      transform: translateX(0);
+      margin: -220px auto auto auto;
+    }
+
+    .login-form-left .login-form {
+      right: auto;
+      left: 15%;
+    }
+
+    .login-copyright {
+      position: absolute;
+      bottom: 20px;
+      right: 0;
+      left: 0;
+    }
+  }
+
+  @media screen and (max-width: 768px) {
+    .login-form-right .login-form,
+    .login-form-left .login-form {
+      left: 50%;
+      right: auto;
+      transform: translateX(-50%);
+      margin-right: auto;
+    }
   }
-}
 </style>

+ 27 - 25
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -54,17 +54,20 @@
             />
           </el-form-item>
           <el-form-item label="订单类型" prop="needProduce">
-            <el-radio v-model="form.needProduce" :label="1"
-              >{{clientEnvironmentId == 5?"有客户生产性订单":'生产性订单'}}</el-radio
-            >
+            <el-radio v-model="form.needProduce" :label="1">{{
+              clientEnvironmentId == 5 ? '有客户生产性订单' : '生产性订单'
+            }}</el-radio>
             <el-radio v-model="form.needProduce" :label="0"
               >库存式订单</el-radio
             >
             <el-radio v-model="form.needProduce" :label="2"
               >无客户生产性订单</el-radio
             >
-            <el-radio v-model="form.needProduce" :label="4" @change="needProduceChange"
-            v-if="clientEnvironmentId != 5"
+            <el-radio
+              v-model="form.needProduce"
+              :label="4"
+              @change="needProduceChange"
+              v-if="clientEnvironmentId != 5"
               >不定向订单</el-radio
             >
           </el-form-item>
@@ -87,7 +90,7 @@
           <el-form-item label="合同编号" prop="contractNumber">
             <el-input disabled v-model="form.contractNumber" />
           </el-form-item>
-         
+
           <el-form-item label="结算方式" prop="settlementMode">
             <DictSelection
               dictName="结算方式"
@@ -113,7 +116,6 @@
               </template>
             </el-input>
           </el-form-item>
-       
         </el-col>
       </el-row>
       <headerTitle title="基本信息" v-if="form.needProduce != 2"></headerTitle>
@@ -185,7 +187,6 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="售出方名称" prop="partbName">
-
             <el-input
               v-if="enterprisePage.length <= 1"
               clearable
@@ -260,7 +261,7 @@
       <inventoryTable
         v-if="form.needProduce != 4"
         :customerMark="customerMark"
-        :isCustomerMark="clientEnvironmentId != 4&&form.needProduce!=2"
+        :isCustomerMark="clientEnvironmentId != 4 && form.needProduce != 2"
         :isProduceDeliveryDeadline="form.needProduce != 0"
         ref="inventoryTable"
         @setCountAmount="setCountAmount"
@@ -515,7 +516,6 @@
         groupTreeData: [],
         groupData: [],
         rules: {
-
           settlementMode: [
             { required: true, message: '请选择结算方式', trigger: 'change' }
           ],
@@ -585,7 +585,7 @@
         this.form.payAmount = allPrice;
       },
       setTotalPlanNum(totalPlanNum) {
-        this.$set(this.form,'totalPlanNum',totalPlanNum)
+        this.$set(this.form, 'totalPlanNum', totalPlanNum);
       },
       discountInput() {
         this.$refs.inventoryTable.discountInputByOrder(this.form.payAmount);
@@ -687,9 +687,8 @@
         const data = await getSaleOrderDetail(id);
         this.loading = false;
         this.form = data;
-        if(data.partaId){
+        if (data.partaId) {
           await this.changeParent({ id: data.partaId }, true);
-
         }
 
         if (data) {
@@ -697,9 +696,9 @@
           this.$nextTick(() => {
             this.$refs.inventoryTable &&
               this.$refs.inventoryTable.putTableValue(data);
-              this.$refs.typeListRef &&
+            this.$refs.typeListRef &&
               this.$refs.typeListRef.putTableValue(data.typedetailList);
-              
+
             this.getLinkInfo(data.partaId);
             this.$store.commit('order/setContractId', data.partaId);
           });
@@ -918,13 +917,11 @@
           this.getSaleOrderDetail(row.id);
         }
       },
-      needProduceChange(needProduce){
-        this.$nextTick(()=>{
+      needProduceChange(needProduce) {
+        this.$nextTick(() => {
           this.form.totalAmount = 0;
-        this.form.payAmount = 0;
-
-        })
-        
+          this.form.payAmount = 0;
+        });
       },
 
       //从合同页面新增订单
@@ -1047,7 +1044,6 @@
               updateContractStatus([this.form.contractId]);
             }
             if (type === 'sub') {
-             
               this.saleOrderSubmit(res, commitData);
               return;
             } else {
@@ -1063,6 +1059,14 @@
       async saleOrderSubmit(res, commitData) {
         const data = await getSaleOrderDetail(this.businessId || res);
         this.processSubmitDialogFlag = true;
+        let businessType =
+          data.needProduce == 1
+            ? '生产性订单'
+            : data.needProduce == 2
+            ? '无客户生产性订单'
+            : data.needProduce == 4
+            ? '不定向订单'
+            : '库存式订单';
         this.$nextTick(() => {
           let params = {
             businessId: data.id,
@@ -1071,13 +1075,11 @@
             variables: {
               businessCode: data.orderNo,
               businessName: data.partaName,
-              businessType: data.saleTypeName
+              businessType: this.clientEnvironmentId==5&&businessType=='生产性订单'?'有客户生产性订单':businessType
             }
-       
           };
           this.$refs.processSubmitDialogRef.init(params);
         });
-      
       },
       reload() {
         this.cancel();

+ 60 - 36
src/views/saleManage/saleOrder/index.vue

@@ -153,7 +153,7 @@
                   :underline="false"
                   icon="el-icon-plus"
                   @click="handleCommand('invoice', row)"
-                  v-if="[2].includes(row.orderStatus)"
+                  v-if="[2].includes(row.orderStatus) && row.needProduce != 2"
                 >
                   创建发货单
                 </el-link>
@@ -346,7 +346,37 @@
         processSubmitDialogFlag: false, // 加载状态
         addOrEditDialogFlag1: false,
         params: {},
-        columns: [
+
+        cacheKeyUrl: 'eos-c2e9664a-saleManage-saleOrder'
+      };
+    },
+
+    created() {
+      this.requestDict('客户状态');
+      // if (!('Notification' in window)) {
+      //   console.log('此浏览器不支持桌面通知');
+      // } else if (Notification.permission === 'granted') {
+      //   // 如果用户已经授权,直接创建通知
+      //   var notification = new Notification('标题', {
+      //     body: '这是通知的内容。'
+      //   });
+      // } else if (Notification.permission !== 'denied') {
+      //   // 请求权限
+      //   Notification.requestPermission().then(function (permission) {
+      //     if (permission === 'granted') {
+      //       var notification = new Notification('标题', {
+      //         body: '消息提醒1'
+      //       });
+      //     }
+      //   });
+      // }
+    },
+    computed: {
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      },
+      columns() {
+        return [
           {
             width: 45,
             type: 'selection',
@@ -380,13 +410,19 @@
             minWidth: 150,
 
             formatter: (_row, _column, cellValue) => {
-              return cellValue == 1
-                ? '生产性订单'
-                : cellValue == 2
-                ? '无客户生产性订单'
-                : cellValue == 4
-                ? '不定向订单'
-                : '库存式订单';
+              let businessType =
+                cellValue == 1
+                  ? '生产性订单'
+                  : cellValue == 2
+                  ? '无客户生产性订单'
+                  : cellValue == 4
+                  ? '不定向订单'
+                  : '库存式订单';
+
+              return this.clientEnvironmentId == 5 &&
+                businessType == '生产性订单'
+                ? '有客户生产性订单'
+                : businessType;
             }
           },
           {
@@ -554,31 +590,8 @@
             showOverflowTooltip: true,
             fixed: 'right'
           }
-        ],
-        cacheKeyUrl: 'eos-c2e9664a-saleManage-saleOrder'
-      };
-    },
-
-    computed: {},
-    created() {
-      this.requestDict('客户状态');
-      // if (!('Notification' in window)) {
-      //   console.log('此浏览器不支持桌面通知');
-      // } else if (Notification.permission === 'granted') {
-      //   // 如果用户已经授权,直接创建通知
-      //   var notification = new Notification('标题', {
-      //     body: '这是通知的内容。'
-      //   });
-      // } else if (Notification.permission !== 'denied') {
-      //   // 请求权限
-      //   Notification.requestPermission().then(function (permission) {
-      //     if (permission === 'granted') {
-      //       var notification = new Notification('标题', {
-      //         body: '消息提醒1'
-      //       });
-      //     }
-      //   });
-      // }
+        ];
+      }
     },
     methods: {
       //更多菜单
@@ -668,15 +681,26 @@
         this.$refs.addDialogRef && this.$refs.addDialogRef.cancel();
         const data = await getSaleOrderDetail(id);
         this.processSubmitDialogFlag = true;
+        let businessType =
+          data.needProduce == 1
+            ? '生产性订单'
+            : data.needProduce == 2
+            ? '无客户生产性订单'
+            : data.needProduce == 4
+            ? '不定向订单'
+            : '库存式订单';
         this.$nextTick(() => {
           let params = {
-            businessId: id,
+            businessId: data.id,
             businessKey: 'sales_order_approve',
             formCreateUserId: data.createUserId,
             variables: {
               businessCode: data.orderNo,
               businessName: data.partaName,
-              businessType: data.saleTypeName
+              businessType:
+                this.clientEnvironmentId == 5 && businessType == '生产性订单'
+                  ? '有客户生产性订单'
+                  : businessType
             }
           };
           this.$refs.processSubmitDialogRef.init(params);