Przeglądaj źródła

火车发运明细修改

shxiaoc 1 rok temu
rodzic
commit
aac8d675e9

+ 75 - 5
src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue

@@ -68,6 +68,19 @@
             clearable
           ></el-input>
         </el-form-item>
+
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >计量单号:</label
+          >
+          <el-input
+            style="width:200px"
+            v-model="weightNoParam"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+
         <el-form-item>
           <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
@@ -84,6 +97,10 @@
             >批量保存</el-button
           >
         </el-form-item>
+
+        <el-form-item>
+          <el-checkbox v-model="isNullwagonNo" label="显示未填车号" @change="onclick" border></el-checkbox>
+        </el-form-item>
       </el-form>
     </div>
     <div class="main">
@@ -515,7 +532,9 @@ export default {
       filterToStationList: [],
       filterUnloadPlaceList: [],
       tableRowIndex: '',
-      isRowClick: 0
+      isRowClick: 0,
+      weightNoParam: null,
+      isNullwagonNo: false
     }
   },
   created() {
@@ -555,6 +574,12 @@ export default {
       }
     },
     batchOperate() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在保存',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
       if (getCookie('orgCode') == 'shouhuokehu') {
         return
       }
@@ -594,10 +619,17 @@ export default {
         .then(res => {
           if (res.data.code == '200') {
             this.$message.success('批量保存成功')
-            this.getRequestUrl()
+            //this.getRequestUrl()
+            this.onclick();
           }
+          loading.close();
+        })
+        .catch(e => {
+          this.$message.error(e)
+          loading.close();
         })
       console.log(this.$refs.tableRef.data)
+
     },
     handleSelectWarehouse(row, index, item) {
       console.log(item)
@@ -653,6 +685,12 @@ export default {
       }
     },
     operate(row) {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在保存',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
       if (getCookie('orgCode') == 'shouhuokehu') {
         return
       }
@@ -679,19 +717,31 @@ export default {
         .then(res => {
           if (res.data.code == '200') {
             this.$message.success('保存成功')
-            this.getRequestUrl()
+            //this.getRequestUrl()
+            this.onclick();
           } else {
             this.$message.error(res.data.data)
-            this.getRequestUrl()
+            //this.getRequestUrl()
+            this.onclick();
           }
+          loading.close();
         })
         .catch(e => {
           this.$message.error(e)
-          this.getRequestUrl()
+          //this.getRequestUrl()
+          this.onclick();
+          loading.close();
         })
+
     },
     //查询事件
     onclick() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在获取数据',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
       if (getCookie('orgCode') == 'shouhuokehu') {
         let consigneeLoginName =
           JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
@@ -747,6 +797,10 @@ export default {
             toTheStation +
             '&sendStation=' +
             sendStation +
+            '&weightNoParam=' +
+            this.weightNoParam +
+            '&isNullwagonNo=' +
+            this.isNullwagonNo +
             '&i=' +
             new Date(),
           this.filterMap
@@ -755,10 +809,21 @@ export default {
           this.tableData = res.data.data
           this.showSummariesPosition()
           this.getSpanArr(this.tableData)
+          loading.close();
+        })
+        .catch(e => {
+          this.$message.error(e)
+          loading.close();
         })
     },
     //获取后台数据
     getRequestUrl() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在获取数据',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
       let map = {}
       if (getCookie('orgCode') == 'shouhuokehu') {
         let consigneeLoginName =
@@ -776,6 +841,11 @@ export default {
           this.tableData = res.data.data
           this.getSpanArr(this.tableData)
           this.showSummariesPosition()
+          loading.close();
+        })
+        .catch(e => {
+          this.$message.error(e)
+          loading.close();
         })
     },
     //刷新