Przeglądaj źródła

出运明细调整、托书调整

huxy 1 tydzień temu
rodzic
commit
0e84592a17

+ 20 - 0
src/views/book/book-list.vue

@@ -143,6 +143,26 @@
                 </a-form-model-item>
               </a-col>
 
+              <a-col :md="5" :sm="8">
+                <a-form-model-item label="提交状态">
+                  <a-select v-model="queryParam.theDocumentsState">
+                    <a-select-option value="">请选择</a-select-option>
+                    <a-select-option value="0">未提交</a-select-option>
+                    <a-select-option value="1">已提交</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+
+              <a-col :md="5" :sm="8">
+                <a-form-model-item label="推送状态">
+                  <a-select v-model="queryParam.syStuta">
+                    <a-select-option value="">请选择</a-select-option>
+                    <a-select-option value="0">未推送</a-select-option>
+                    <a-select-option value="1">已推送</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+
             </template>
             <a-col :md="4" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">

+ 83 - 71
src/views/shipment-details/shipmentList.vue

@@ -1082,85 +1082,96 @@ export default {
 
     //  提交
     submit() {
-      this.$nextTick(() => {
-        // for(var i =0;i<this.selectedRows.length;i++){
-        //   var selectRow = this.selectedRows[i]
-        //   if(selectRow.elementsId===''||!selectRow.elementsId){
-        //     this.$message.error('勾选的第'+(i+1)+'行数据报关要素未填写,不可提交!')
-        //     return
-        //   }
-        // }
-        var grouyIdList = []
-        this.loading = true
-        this.shipmentListData.map(item =>{
-          this.selectedRowKeys.map(e=>{
-            if(item.itemIds == e){
-              grouyIdList.push(item.groupId)
+      if(this.selectedRowKeys.length==0){
+        this.$message.error('请勾选数据');
+      }else{
+        this.$nextTick(() => { 
+          // for(var i =0;i<this.selectedRows.length;i++){
+          //   var selectRow = this.selectedRows[i]
+          //   if(selectRow.elementsId===''||!selectRow.elementsId){
+          //     this.$message.error('勾选的第'+(i+1)+'行数据报关要素未填写,不可提交!')
+          //     return
+          //   }
+          // }
+          var grouyIdList = []
+          this.loading = true
+          this.shipmentListData.map(item =>{
+            this.selectedRowKeys.map(e=>{
+              if(item.itemIds == e){
+                grouyIdList.push(item.groupId)
+              }
+            })
+          })
+          submitShipment({ submitListId: this.selectedRowKeys, type: '1' ,grouyIdList:grouyIdList}).then(res => {
+            this.loading = false
+            if (res.success) {
+              // this.shipmentListData.submitStatus = '1'
+              this.shipmentListData.map(item =>{
+                this.selectedRowKeys.map(e=>{
+                  if(item.itemIds == e){
+                    item.submitStatus = '1'
+                  }
+                })
+              })
+              this.selectedRowKeys =[]
+              this.checkboxOption.selectedRowKeys = []
+              // this.judageAdd()
+              // 渲染 发运明细列表
+              this.$message.success('提交成功')
+            }else {
+              this.judageAdd()
+              this.$message.error(res.message)
             }
+            this.searchQuery();
           })
         })
-        submitShipment({ submitListId: this.selectedRowKeys, type: '1' ,grouyIdList:grouyIdList}).then(res => {
-        this.loading = false
-          if (res.success) {
-            // this.shipmentListData.submitStatus = '1'
-            this.shipmentListData.map(item =>{
-              this.selectedRowKeys.map(e=>{
-                if(item.itemIds == e){
-                  item.submitStatus = '1'
-              }
-           })
-        })
-            this.selectedRowKeys =[]
-            this.checkboxOption.selectedRowKeys = []
-            //  this.judageAdd()
-             // 渲染 发运明细列表
-            this.$message.success('提交成功')
-          }else {
-            this.judageAdd()
-             this.$message.error(res.message)
-          }
-          this.searchQuery();
-        })
-      })
+      }
     },
     // 取消提交
     cancelSubmit(record) {
-      console.log('取消订单id:', record.id)
-      this.$nextTick(() => {
-        var grouyIdList = []
-        this.loading = true
-        this.shipmentListData.map(item =>{
-          this.selectedRowKeys.map(e=>{
-            if(item.itemIds == e){
-              grouyIdList.push(item.groupId)
-            }
-          })
-        })
-        cancelSubmitShipment({ submitListId: this.selectedRowKeys, type: '2',grouyIdList:grouyIdList }).then(res => {
-        this.loading = false
-          if (res.success) {
-            // this.shipmentListData.submitStatus = '0'
-            this.shipmentListData.map(item =>{
-              this.selectedRowKeys.map(e=>{
-                if(item.itemIds == e){
-                  item.submitStatus = '0'
+      if(this.selectedRowKeys.length==0){
+        this.$message.error('请勾选数据');
+      }else{
+        console.log('取消订单id:', record.id)
+        this.$nextTick(() => {
+          var grouyIdList = []
+          this.loading = true
+          this.shipmentListData.map(item =>{
+            this.selectedRowKeys.map(e=>{
+              if(item.itemIds == e){
+                grouyIdList.push(item.groupId)
               }
-           })
+            })
+          })
+          cancelSubmitShipment({ submitListId: this.selectedRowKeys, type: '2',grouyIdList:grouyIdList }).then(res => {
+          this.loading = false
+            if (res.success) {
+              // this.shipmentListData.submitStatus = '0'
+              this.shipmentListData.map(item =>{
+                this.selectedRowKeys.map(e=>{
+                  if(item.itemIds == e){
+                    item.submitStatus = '0'
+                }
+            })
+            })
+              this.selectedRowKeys = []
+              // this.judageAdd()
+              this.$message.success('取消提交成功')
+            }else {
+              this.$message.error(res.message)
+            }
+            this.searchQuery();
           })
-            this.selectedRowKeys = []
-            // this.judageAdd()
-            this.$message.success('取消提交成功')
-          }else {
-             this.$message.error(res.message)
-          }
-          this.searchQuery();
         })
-      })
+      }
     },
 
     //批量删除
     batchDelete(){
-      this.$nextTick(() => {
+      if(this.selectedRowKeys.length==0){
+        this.$message.error('请勾选数据');
+      }else{
+        this.$nextTick(() => {
         var itemId = [],
         ids = []
         this.loading = true
@@ -1173,21 +1184,22 @@ export default {
           })
         })
         deleteBatch({ ids: ids ,itemId:itemId}).then(res => {
-        this.loading = false
+          this.loading = false
           if (res.success) {
             // console.log('提交成功,单据状态改为【已提交】')
             // this.shipmentListData.submitStatus = '1'
             this.selectedRowKeys =[]
             this.checkboxOption.selectedRowKeys = []
-             this.judageAdd()
-             // 渲染 发运明细列表
+            this.judageAdd()
+            // 渲染 发运明细列表
             this.$message.success('批量成功')
           }else {
             this.judageAdd()
-             this.$message.error(res.message)
+            this.$message.error(res.message)
           }
+          })
         })
-      })
+      }
     },
     sortChange(params) {
       this.shipmentListData.sort((a, b) => {