damon227 9 месяцев назад
Родитель
Сommit
f88d6ed3bb

+ 2 - 2
src/views/modules/common/approve-component-batch.vue

@@ -50,13 +50,13 @@
       dataFormSubmit (val) {
         this.$refs['dataForm'].validate((valid) => {
           if (valid) {
-            if (val !== '1') {
+            if (val !== 1) {
               if (!this.dataForm.remark) {
                 this.$message.error('请填写审批意见')
                 return
               }
             } else {
-              this.dataForm.remark = this.dataForm.remark || '审批通过'
+              this.dataForm.remark = this.dataForm.remark || '同意'
             }
             this.loading = true
             // 添加附件

+ 5 - 0
src/views/modules/cus/communicate.vue

@@ -137,6 +137,7 @@
             <el-button v-if="isAuth('cus:communication:update') && scope.row.state === '0'" type="text" size="small" @click="addOrUpdateHandle(scope.row.coId, false)">编辑</el-button>
             <el-button v-if="isAuth('cus:communication:revoke') && (scope.row.state === '1')" type="text" size="small" @click="cancelHandle(scope.row)">撤回</el-button>
             <el-button v-if="isAuth('cus:communication:delete') && scope.row.state === '0'" style="color: red" type="text" size="small" @click="deleteHandle(scope.row.coId)">删除</el-button>
+            <el-button type="text" size="small" @click="exportHandle(scope.row.coId)">导出</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -159,6 +160,7 @@
 </template>
 
 <script>
+  import Vue from 'vue'
   import AddOrUpdate from './communicate-add-or-update'
   import Detail from './communicate-detail'
   import { getDictList } from '@/api/dict'
@@ -338,6 +340,9 @@ export default {
             }
           })
         }).catch(() => {})
+      },
+      exportHandle (val) {
+        location.href = this.$http.adornUrl(`/biz-service/cusCommunication/exportExcel/${val}?_token=${Vue.cookie.get('token')}`)
       }
     }
   }

+ 5 - 0
src/views/modules/order/order.vue

@@ -178,6 +178,7 @@
             <el-button v-if="isAuth('order:ctl:editor') && (Number(scope.row.state) === 0 || Number(scope.row.state) === 2)" type="text" size="small" @click="addOrUpdateHandle(scope.row.orderId,false)">编辑</el-button>
             <el-button v-if="isAuth('order:clt:revoke') && Number(scope.row.state) === 1 && scope.row.creatorId === userId.toString()" type="text" size="small" @click="cancelOrder(scope.row)">撤回</el-button>
             <el-button v-if="isAuth('order:ctl:determine') && Number(scope.row.state) === 3 && Number(scope.row.orderState) === 6" type="text" size="small" @click="techConfirm(scope.row)">技术确定</el-button>
+            <el-button type="text" size="small" @click="exportHandle(scope.row.orderId)">导出</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -203,6 +204,7 @@
 </template>
 
 <script>
+  import Vue from 'vue'
   import AddOrUpdate from './order-add-or-update'
   import Detail from './order-detail'
   import { getOrderList, deliverOrder, revokeOrder } from '@/api/sale'
@@ -427,6 +429,9 @@ export default {
         this.$nextTick(() => {
           this.$refs.attachDetail.init(row.attachList)
         })
+      },
+      exportHandle (val) {
+        location.href = this.$http.adornUrl(`/biz-service/order/exportExcel/${val}?_token=${Vue.cookie.get('token')}`)
       }
     }
   }

+ 28 - 22
src/views/modules/sale/outsource.vue

@@ -258,6 +258,8 @@
             <el-button v-if="isAuth('pur:commDetail:updatePurCommissionDetail') && (Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 1)" type="text" size="small" @click="outsourceHandle(scope.row)">委外</el-button>
             <el-button v-if="isAuth('pur:commDetail:infoPutIn') && (Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 2||(Number(scope.row.purchaseState) === 5))" type="text" size="small" @click="inBound(scope.row)">入库</el-button>
             <el-button v-if="isAuth('pur:commDetail:infoPutInAgain') && (Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 5)" type="text" size="small" @click="inBound(scope.row)">再次入库</el-button>
+          <el-button type="text" size="small" @click="exportHandle(scope.row.purchaseId)">导出</el-button>
+
           </template>
         </el-table-column>
       </el-table>
@@ -286,6 +288,7 @@
 </template>
 
 <script>
+import Vue from 'vue'
 import AddOrUpdate from './outsource-add-or-update'
 import Detail from './outsource-detail'
 import { getOutsourceList } from '@/api/sale'
@@ -340,7 +343,7 @@ export default {
       ],
       // 审批状态
       optionsState: [],
-      selectedRows:[],
+      selectedRows: [],
       batchBtnDisabled: false,
       batchIncomeBtnDisabled: false
     }
@@ -562,34 +565,34 @@ export default {
         this.$refs.amountMaskSetting.init()
       })
     },
-    //监听批量选择的行
-    handleSelectionChange(rows){
+    // 监听批量选择的行
+    handleSelectionChange (rows) {
       this.selectedRows = rows
       this.batchBtnDisabled = false
       this.batchIncomeBtnDisabled = false
-      //(Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 1)
-      //控制批量操作按钮
-       
-      for(let index=0;index<this.selectedRows.length;index++){
+      // (Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 1)
+      // 控制批量操作按钮
+
+      for (let index = 0; index < this.selectedRows.length; index++) {
         let item = this.selectedRows[index]
-        if(Number(item.approvalState) === 3  && Number(item.purchaseState) === 1){
-        
+        if (Number(item.approvalState) === 3 && Number(item.purchaseState) === 1) {
+
         } else {
           this.batchBtnDisabled = true
         }
 
-        if(Number(item.approvalState) === 3  && (Number(item.purchaseState) === 2 || Number(item.purchaseState) === 5)){
-        
+        if (Number(item.approvalState) === 3 && (Number(item.purchaseState) === 2 || Number(item.purchaseState) === 5)) {
+
         } else {
           this.batchIncomeBtnDisabled = true
         }
       }
     },
-    //批量委外
-    batchHandle(){
-      if(this.selectedRows.length == 0){
-           this.$message.error("请先勾选数据")
-           return
+    // 批量委外
+    batchHandle () {
+      if (this.selectedRows.length == 0) {
+        this.$message.error('请先勾选数据')
+        return
       }
 
       this.outsourceVisible = true
@@ -597,15 +600,15 @@ export default {
         this.$refs.refOutsource.init(this.selectedRows)
       })
     },
-    //批量入库
-    batchIncomeHandle(){
-      if(this.selectedRows.length == 0){
-           this.$message.error("请先勾选数据")
-           return
+    // 批量入库
+    batchIncomeHandle () {
+      if (this.selectedRows.length == 0) {
+        this.$message.error('请先勾选数据')
+        return
       }
 
       let list = []
-      for(let index=0;index<this.selectedRows.length;index++){
+      for (let index = 0; index < this.selectedRows.length; index++) {
         let item = this.selectedRows[index]
         let dataForm = {
           ...item,
@@ -622,6 +625,9 @@ export default {
       this.$nextTick(() => {
         this.$refs.inbound.init(0, false, list)
       })
+    },
+    exportHandle (val) {
+      location.href = this.$http.adornUrl(`/biz-service/purCommDetail/exportExcel/${val}?_token=${Vue.cookie.get('token')}`)
     }
   }
 }

+ 1 - 2
src/views/modules/sale/purchase.vue

@@ -467,8 +467,7 @@
         if (!procurementId) {
           this.$message.error('参数不正确!')
         }
-        let url = this.$http.adornUrl('/biz-service/purchaseDetail/exportExcel/' + procurementId)
-        window.open(url + '?_token=' + Vue.cookie.get('token'), '_blank')
+        location.href = this.$http.adornUrl(`/biz-service/purchaseDetail/exportExcel2/${procurementId}?_token=${Vue.cookie.get('token')}`)
       },
       // 监听批量选择的行
       handleSelectionChange (rows) {