002390 1 жил өмнө
parent
commit
b6e719966e

+ 17 - 20
src/views/purchase/purchase-order/index.vue

@@ -143,26 +143,42 @@ export default {
     },
     // 编辑、修订
     async handleOpenEditDrawer(row) {
+
       const { id } = row;
+
       const { setVisible, fetchItem } = this.$refs.editDrawerRef;
+      
       await setVisible(true);
+
       await fetchItem(id);
+      
     },
     // 获取子表信息
      handleDetailsData(row) {
-      window.clearTimeout(this.timeOut)
+
+      window.clearTimeout(this.timeOut);
+
       this.timeOut = setTimeout(async () =>{
 
         try {
+
           this.tabLoading = true;
+
           this.primaryResource = row;
+
           this.checkedTabList = [];
+
           const { code, msg, data } = await orderApi.details(row.id);
+
           if (code === 200) {
+
             // 物料信息:puOrderItemList   执行结果:puOrderExecuteList
             for (const key in this.tabTableDatas) {
+
               this.tabTableDatas[key] = data[key];
+
             }
+
           }
         } catch (err) {}
         finally{
@@ -221,8 +237,6 @@ export default {
 
       let inconformity = this.checkedList.filter(row => !(row.status == '0' || row.status == '3'));
 
-      console.log(inconformity,'inconformity--------');
-
       if(!inconformity.length && this.checkedList.length){
 
         let puOrderIds = this.checkedList.map( item => Number(item.id));
@@ -245,22 +259,6 @@ export default {
 
       this.fetchSubmit(puOrderIds);
 
-      // try {
-
-      //  this.handleConfirmTips(async()=>{
-
-      //    let { code } = await orderApi.submit({ puOrderId: row.id });
- 
-      //    if (code == 200) {
- 
-      //     this.handleRefreshList();
- 
-      //    }
-
-      //  })
-      // } catch (error) {
-      // } finally {
-      // }
     },
     fetchSubmit(puOrderIds){
 
@@ -636,7 +634,6 @@ export default {
       </el-table-column>
       <el-table-column fixed="right" label="操作" width="120">
         <template slot-scope="scope">
-          <!-- <el-button @click.stop="handleOpenSeeDrawer(scope.row)" type="text" size="small">查看</el-button> -->
           <el-button 
             v-if="scope.row.status == '2'"
             type="text"