ソースを参照

Merge tag 'Hotfix-mo-100' into develop

Finish Hotfix-mo-100
莫绍宝 3 年 前
コミット
7896ccedf0
2 ファイル変更30 行追加6 行削除
  1. 9 0
      src/api/supply/pickup.js
  2. 21 6
      src/views/supply/pickup/pickup_list.vue

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

@@ -133,4 +133,13 @@ export function checkPassword(params) {
     method: 'post',
     params
   })
+}
+
+// 增加打印次数
+export function cancelData(params) {
+  return request({
+    url: '/pick/delete',
+    method: 'post',
+    params
+  })
 }

+ 21 - 6
src/views/supply/pickup/pickup_list.vue

@@ -61,8 +61,8 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="打单日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="180" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="发货申请单号" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货申请单号" prop="invoiceId" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.pickTime | dateToDayFilter }}
@@ -73,7 +73,7 @@
                 {{ scope.row.pickStatus == '1' ? '上午':'下午' }}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="提货仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="提货仓库" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
@@ -85,8 +85,8 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程编号" prop="enginOrderNo" min-width="180" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程编号" prop="enginOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
@@ -96,6 +96,13 @@
             <el-table-column align="center" label="操作" width="100" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles)">编辑</el-button>
+                <el-popconfirm 
+                  style="margin-left: 10px;" 
+                  :title="'确定' + (scope.row.printNum ? '作废' : '取消') +'吗?'" 
+                  @onConfirm="handleCancel(scope.row.id)" 
+                  v-if="$checkBtnRole('del', $route.meta.roles)" >
+                  <el-button slot="reference" type="text">{{scope.row.printNum ? '作废' : '取消'}}</el-button>
+                </el-popconfirm>
               </template>
             </el-table-column>
           </el-table>
@@ -122,7 +129,7 @@
 </template>
 
 <script>
-import { getPickupList } from "@/api/supply/pickup";
+import { getPickupList, cancelData } from "@/api/supply/pickup";
 import PickupForm from "@/views/supply/pickup/components/pickup_form";
 
 export default {
@@ -231,6 +238,14 @@ export default {
       this.queryItem = {};
       this.isShowForm = false;
     },
+
+    // 取消/作废
+    handleCancel(id) {
+      cancelData({id}).then(res => {
+        this.$successMsg();
+        this.getList();
+      })
+    },
   }
 }
 </script>