Browse Source

给事业部开放订单删除功能,和订单同步功能, 事业部能删除的订单只有订单待确认状态的订单

lxf 1 year ago
parent
commit
aceab4b22a

+ 9 - 2
src/views/shengde/group/synchronization/order/index.vue

@@ -3,7 +3,7 @@
     <el-card style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 35vw; height: 50vh">
       <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)">
         <el-tabs v-model="activeName">
-          <el-tab-pane label="重置时间" name="first">
+          <el-tab-pane label="重置时间" name="first" v-if="!userInfo.subsidiaryId">
             <div style="font-size: 24px; font-weight: 700; color: #e51717; text-align: center">最后一次同步时间: {{ synchroTime }}</div>
             <br />
             <el-form ref="ruleForm" :model="form" :rules="formRules" label-width="100px">
@@ -66,6 +66,7 @@
 <script>
 import * as API from '@/api/shengde/group/synchronization/order'
 import moment from 'moment'
+import { mapGetters } from 'vuex'
 
 export default {
   name: 'orderSynchronization',
@@ -95,15 +96,21 @@ export default {
           return time.getTime() < Date.now() - 8.64e7 - 8.64e7 - 8.64e7
         },
       },
-      activeName: 'first',
+      activeName: '',
     }
   },
   created() {
     this.time = moment().format('HH:mm:ss')
   },
   mounted() {
+    if (this.userInfo.subsidiaryId) {
+      this.activeName = 'second'
+    } else {
+      this.activeName = 'first'
+    }
     this.getTime()
   },
+  computed: mapGetters(['userInfo']),
   methods: {
     getTime() {
       API.synchroTimeDetails().then((res) => {

+ 1 - 8
src/views/shengde/subsidiary/order/management/index.vue

@@ -166,14 +166,7 @@
           <el-button type="text" @click="handleOpenUpload(scope.row.id)" v-if="scope.row.status === 10" v-db-click>上传设计稿</el-button>
           <el-button type="text" @click="handleChangeOrder(scope.row.id)" v-if="scope.row.status === 0" v-db-click>编辑</el-button>
           <el-button type="text" v-if="scope.row.status == '30'" @click="handleAfterSales(scope.row)" v-db-click>售后</el-button>
-          <el-button
-            type="text"
-            style="color: rgb(217, 0, 27)"
-            @click="handleRemove(scope.row.id)"
-            v-if="scope.row.status == 0 || scope.row.status == 10"
-            v-db-click
-            >删除</el-button
-          >
+          <el-button type="text" style="color: rgb(217, 0, 27)" @click="handleRemove(scope.row.id)" v-if="scope.row.status == 10" v-db-click>删除</el-button>
         </template>
       </el-table-column>
     </el-table>