Browse Source

搬运工对账单

jbb 2 years ago
parent
commit
2e38947449
1 changed files with 32 additions and 1 deletions
  1. 32 1
      src/views/oa/modules/SyCarryDetailModal.vue

+ 32 - 1
src/views/oa/modules/SyCarryDetailModal.vue

@@ -142,6 +142,7 @@
         activeKey: 'syCarryB',
         jhyNameOption:[],
         dateFormat: 'YYYY-MM-DD',
+        zhuId:'',
         // 搬运装卸费用-搬运工对账单-子表
         syCarryBTable: {
           loading: false,
@@ -246,10 +247,38 @@
     created(){
     },
     methods: {
+      // 获取表头信息
+      getHeaderList(id){
+        this.zhuId = id
+        getAction('/oa/syCarry/queryById', {id:id}).then((res) => {
+          if(res.success){
+            var zhuId = '' //主表id
+             this.formState=res.result //详情
+             zhuId = res.result.id
+             this.getTable(zhuId)
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      getTable(id){
+        getAction('/oa/syCarry/querySyCarryBByMainId', {id:id}).then((res) => {
+          if(res.success){
+              res.result.map(item =>{
+              if(item.orderDate !==''&& item.orderDate){
+                item.orderDate = moment(item.orderDate)
+              }
+            })
+            this.syCarryBTable.dataSource = res.result
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
       handelAutograph(record){
          getAction('/oa/syCarry/signPlan', {id:record.id}).then((res) => {
           if(res.success){
-            debugger
+            this.getHeaderList(this.zhuId)
           }else{
             this.$message.warning(res.message)
           }
@@ -266,6 +295,8 @@
         this.syCarryBTable.dataSource=[]
         this.formState = {}
         this.visible = false
+        this.zhuId = ''
+        this.$emit('close')
       },
     }
   }