Browse Source

【新增】商用工程信息单-直调完结

莫绍宝 3 years ago
parent
commit
ded9eda272

+ 9 - 0
src/api/supply/engin.js

@@ -126,6 +126,15 @@ export function deleteEngin(params) {
   })
   })
 }
 }
 
 
+// 工程信息单 - 直调完结
+export function overEngin(params) {
+  return request({
+    url: '/engin-info-order/end-status-upd',
+    method: 'post',
+    params
+  })
+}
+
 // 工程订单 - 获取列表
 // 工程订单 - 获取列表
 export function getOrderList(params) {
 export function getOrderList(params) {
   return request({
   return request({

+ 1 - 0
src/views/supply/engin/components/commerce_form.vue

@@ -352,6 +352,7 @@
 <script>
 <script>
 import { getOrderDetail, getComLoginList, getComLoginDetail, getWarehouseList, addCom, editCom, submitCom, checkStock, getWalletList } from "@/api/supply/engin";
 import { getOrderDetail, getComLoginList, getComLoginDetail, getWarehouseList, addCom, editCom, submitCom, checkStock, getWalletList } from "@/api/supply/engin";
 import { getDictList, getTypeList, getSalesmanList } from '@/api/common'
 import { getDictList, getTypeList, getSalesmanList } from '@/api/common'
+import { findElem } from '@/utils/util'
 
 
 let that
 let that
 export default {
 export default {

+ 19 - 1
src/views/supply/engin/components/engin_detail.vue

@@ -131,6 +131,7 @@
 
 
     <div class="page-footer">
     <div class="page-footer">
       <div class="footer">
       <div class="footer">
+        <el-button type="primary" @click="overData" v-if="!isDealer" :disabled="detailData.examineStatus !== 'OK'">直调完结</el-button>
         <el-button @click="goBack">关 闭</el-button>
         <el-button @click="goBack">关 闭</el-button>
       </div>
       </div>
     </div>
     </div>
@@ -139,7 +140,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { getEnginDetail } from "@/api/supply/engin";
+import { getEnginDetail, overEngin } from "@/api/supply/engin";
 
 
 export default {
 export default {
   name: 'EnginDetail',
   name: 'EnginDetail',
@@ -168,6 +169,9 @@ export default {
     isExamine() {
     isExamine() {
       return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
       return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
     },
     },
+    isDealer() {
+      return JSON.parse(localStorage.getItem("supply_user")).isCustomer
+    },
   },
   },
 
 
   created() {
   created() {
@@ -187,6 +191,20 @@ export default {
       })
       })
     },
     },
 
 
+    // 直调完结
+    overData() {
+      this.$confirm('此操作将直调完结订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        overEngin({id: this.listItem.enginInfoId}).then(res => {
+          this.$successMsg();
+          this.getDetail();
+        })
+      }).catch(() => {});
+    },
+
   }
   }
 }
 }
 </script>
 </script>

+ 1 - 1
src/views/supply/engin/engin_list.vue

@@ -135,7 +135,7 @@
                 <el-button 
                 <el-button 
                   type="text" 
                   type="text" 
                   @click="toForm(scope.row)" 
                   @click="toForm(scope.row)" 
-                  v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">
+                  v-if="$checkBtnRole('edit', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'OK')">
                   编辑
                   编辑
                 </el-button>
                 </el-button>
                 <el-button 
                 <el-button