Selaa lähdekoodia

搬运工对账单刷新和编辑

jbb 2 vuotta sitten
vanhempi
commit
bd7dd6cd62
1 muutettua tiedostoa jossa 6 lisäystä ja 18 poistoa
  1. 6 18
      src/views/oa/SyCarryList.vue

+ 6 - 18
src/views/oa/SyCarryList.vue

@@ -97,8 +97,8 @@
     <!-- table区域-end -->
 
     <!-- 表单区域 -->
-    <syCarry-modal ref="modalForm" @ok="modalFormOk" @close='getList'/>
-    <sy-carry-detail-modal ref="syCarryDetailModal" @close='getList'></sy-carry-detail-modal>
+    <syCarry-modal ref="modalForm" @ok="modalFormOk" @close='loadData'/>
+    <sy-carry-detail-modal ref="syCarryDetailModal" @close='loadData'></sy-carry-detail-modal>
 
   </a-card>
 </template>
@@ -184,23 +184,14 @@
 
 
     methods: {
-      getList(){
-        getAction(this.url.list, this.queryParam).then((res) => {
-          if(res.success){
-            this.dataSource=res.result.records
-          }else{
-            this.$message.warning(res.message)
-          }
-        })
-      },
       searchQuery(){
-        this.getList()
+        this.loadData()
       },
       // 计划员提交
       plannerSubmit(record,state){
          getAction('/oa/syCarry/commitBatch', {ids:record.id,state:state}).then((res) => {
           if(res.success){
-            this.getList()
+            this.loadData()
           }else{
             this.$message.warning(res.message)
           }
@@ -208,12 +199,13 @@
       },
       searchReset(){
        this.queryParam={}
-       this.getList()
+       this.loadData()
       },
        handleEdit(record,data){
          if(data == '0'){
            this.$refs.modalForm.visible = true
             this.$refs.modalForm.getHeaderList(record.id)
+            this.$refs.modalForm.defultMethods = 'edit'
          }else{
            this.$refs.syCarryDetailModal.visible = true
            this.$refs.syCarryDetailModal.getHeaderList(record.id)
@@ -223,10 +215,6 @@
 
       initDictConfig() {
       },
-    //   handleTableChange(pagination, filters, sorter) {
-    //   this.queryParam.pageNo = pagination.current
-    //   this.getList()
-    // },
 
     }
   }