Browse Source

Merge branch 'feature/Feature-supply' into develop

莫绍宝 3 years ago
parent
commit
664aed6412

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

@@ -239,6 +239,15 @@ export function withdrawHome(params) {
   })
 }
 
+// 家用工程订单 - 弃审
+export function abandonHome(params) {
+  return request({
+    url: '/engin-order/home-abandon',
+    method: 'post',
+    params
+  })
+}
+
 // 家用工程订单 - 删除
 export function deleteHome(params) {
   return request({
@@ -351,6 +360,15 @@ export function withdrawCom(params) {
   })
 }
 
+// 商用工程订单 - 弃审
+export function abandonCom(params) {
+  return request({
+    url: '/engin-order/trade-abandon',
+    method: 'post',
+    params
+  })
+}
+
 // 商用工程订单 - 删除
 export function deleteCom(params) {
   return request({

+ 12 - 1
src/views/supply/engin/commerce_list.vue

@@ -139,6 +139,9 @@
                 </el-popconfirm>
                 <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
+                <el-popconfirm style="margin-left: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.parentId)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
+                  <el-button slot="reference" type="text">弃审</el-button>
+                </el-popconfirm>
                 <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles)">退订</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
                 <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.parentId)" v-if="$checkBtnRole('del', $route.meta.roles)">
@@ -175,7 +178,7 @@
 </template>
 
 <script>
-import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom } from "@/api/supply/engin";
+import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom, abandonCom } from "@/api/supply/engin";
 import CommerceDetail from "@/views/supply/engin/components/commerce_detail";
 import CommerceForm from "@/views/supply/engin/components/commerce_form";
 import CommerceExamine from "@/views/supply/engin/components/commerce_examine";
@@ -382,6 +385,14 @@ export default {
       })
     },
 
+    // 弃审
+    handleAbandon(id) {
+      abandonCom({id}).then(res => {
+        this.$successMsg();
+        this.getList();
+      })
+    },
+
     // 删除
     handleDelete(id) {
       deleteCom({ids: id}).then(res => {

+ 6 - 2
src/views/supply/engin/components/home_form.vue

@@ -158,11 +158,15 @@
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.price" size="small" type="number"></el-input>
+          </template>
+        </el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.qty" size="small"></el-input>
+            <el-input v-model="scope.row.qty" size="small" type="number"></el-input>
           </template>
         </el-table-column>
         <el-table-column align="center" label="订单金额" min-width="100" show-overflow-tooltip>

+ 12 - 1
src/views/supply/engin/home_list.vue

@@ -139,6 +139,9 @@
                 </el-popconfirm>
                 <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL')">编辑</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
+                <el-popconfirm style="margin-left: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.parentId)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
+                  <el-button slot="reference" type="text">弃审</el-button>
+                </el-popconfirm>
                 <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus !== 'FAIL'">退订</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
                 <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.parentId)" v-if="$checkBtnRole('del', $route.meta.roles)">
@@ -175,7 +178,7 @@
 </template>
 
 <script>
-import { getOrderList, applyHome, withdrawHome, deleteHome, editDateHome } from "@/api/supply/engin";
+import { getOrderList, applyHome, withdrawHome, deleteHome, editDateHome, abandonHome } from "@/api/supply/engin";
 import HomeDetail from "@/views/supply/engin/components/home_detail";
 import HomeForm from "@/views/supply/engin/components/home_form";
 import HomeExamine from "@/views/supply/engin/components/home_examine";
@@ -376,6 +379,14 @@ export default {
       })
     },
 
+    // 弃审
+    handleAbandon(id) {
+      abandonHome({id}).then(res => {
+        this.$successMsg();
+        this.getList();
+      })
+    },
+
     // 删除
     handleDelete(id) {
       deleteHome({ids: id}).then(res => {