Browse Source

工单资料删除

liuhairui 1 year ago
parent
commit
957a8c1dd5
2 changed files with 35 additions and 2 deletions
  1. 8 0
      src/api/yunyin/yunying.js
  2. 27 2
      src/view/yunyin/shengchanguanli/gongdanziliao.vue

+ 8 - 0
src/api/yunyin/yunying.js

@@ -952,3 +952,11 @@ export const WorkOrderData= (params) => {
         params
     })
 }
+//工单删除
+export const WorkOrderDel= (params) => {
+    return service({
+        url:'/mes_server/work_order/WorkOrderDel',
+        method: 'get',
+        params
+    })
+}

+ 27 - 2
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -23,6 +23,7 @@
               <el-button type="primary" icon="edit"   @click="addgd_onclick"   class="bt"   title="新增工单资料">新增工单资料</el-button>
               <el-button type="primary" icon="edit"   @click="addgdyj_onclick"   class="bt" title="新增印件资料">新增印件资料</el-button>
               <el-button type="primary" icon="edit"   @click="addgdgy_onclick"   class="bt" title="新增工艺资料" >新增工艺资料</el-button>
+              <el-button type="primary" icon="edit"   @click="delgdzl_onclick" :disabled="gdSelection === ''"   class="bt" title="新增工艺资料" >工单资料删除</el-button>
               <el-button type="primary" icon="edit"   @click="delgd_delclick"  :disabled="yjSelection === '' && gySelection === ''"  class="bt" title="选择批量删除(印件资料或工艺资料)"  >删除</el-button>
               <el-button type="primary" icon="edit"   @click="gdtb_onclick"   class="bt" title="工单资料同步" >工单同步</el-button>
             </el-form-item>
@@ -463,7 +464,7 @@
                         @row-dblclick="updateCompanyFunc"
                         @selection-change="handleSelectionChange"
                         :show-overflow-tooltip="true">
-<!--                <el-table-column align="center" type="selection" width="30"/>-->
+                <el-table-column align="center" type="selection" width="30"/>
                 <el-table-column align="left" label="获取状态"   prop="status"  width="81" />
                 <el-table-column align="left" sortable label="工单编号"   prop="工单编号"  width="110" />
                 <el-table-column align="left" sortable label="生产分类"   prop="生产分类" width="110" />
@@ -1328,7 +1329,7 @@ import {
   DataCorrection, U8Trial, ProcessFlow, AccountingParameter,setProductStatus,
   getProduct, getProductGy, ProductInformationEdit, workOrderListDetail, editProduct, getOrderProcessCount, StatusEdit,
   PrintDetailDel, ProcessDetailDel,WorkOrderDetailCope,
-  getGdAnnexTable,WorkOrderData,
+  getGdAnnexTable,WorkOrderData,WorkOrderDel,
   gdAnnexAdd,ProductCopeDetail,WorkOrderDetailListCope,
   gdAnnexDel,
 } from "@/api/yunyin/yunying";
@@ -3710,6 +3711,7 @@ const gdzlent =async (event,id1,id2,id3) => {
   }
 }
 
+const gdSelection = ref('')
 const yjSelection = ref('')
 const gySelection = ref('')
 // 印件资料多选、工艺资料多选
@@ -3724,6 +3726,29 @@ const selectionChange = (selection, type) => {
     gySelection.value = ids.join(',')
   }
 }
+const handleSelectionChange = (selection, type) => {
+  console.log(11)
+  console.log(selection)
+  const ids = selection.map(item => {
+    return item.Uniqid
+  })
+  console.log(ids.join(','))
+  gdSelection.value = ids.join(',')
+}
+
+// ===========删除工单资料 ===========
+const delgdzl_onclick = async () => {
+  if (gdSelection.value !== '') {
+    try {
+      console.log(gdSelection.value)
+      const res1 = await WorkOrderDel({UniqId: ydSelection.value})
+      res1.code === 0 && ElMessage.success('印件资料删除成功')
+    } catch(err) {
+      ElMessage.error(err)
+    }
+  }
+}
+
 
 // ===========删除印件资料、工艺资料 ===========
 const delgd_delclick = async () => {