瀏覽代碼

提交陆运和仓储

caojunjie 3 年之前
父節點
當前提交
80e3939a76

+ 7 - 0
src/api/wel.js

@@ -104,3 +104,10 @@ export const frequency = (query) => {
     params: query
   })
 }
+export const businessStatisticsFrequency = (query) => {
+  return request({
+    url: '/api/blade-system/dict-biz/dictionary?code=business_statistics',
+    method: 'get',
+    params: query
+  })
+}

+ 11 - 9
src/views/landTransportation/dispatchingCars/index.vue

@@ -118,7 +118,7 @@
 <script>
 import detailPage from './detailPage'
 import {removeDelegationList, selectInvoiceList, totalList} from "@/api/landTransportation";
-
+import {businessStatisticsFrequency} from "@/api/wel";
 export default {
   name: "index",
   components: {
@@ -322,14 +322,16 @@ export default {
     }
   },
   mounted() {
-    let this_ = this;
-    this_.dispatchTimer = setInterval(function () {
-      if (JSON.parse(localStorage.getItem("saber-token")).content) {
-        totalList(2).then(res => {
-          this_.totalData = res.data.data
-        })
-      }
-    }, 10000)
+    businessStatisticsFrequency().then(res=>{
+      let this_ = this;
+      this_.dispatchTimer = setInterval(function () {
+        if (JSON.parse(localStorage.getItem("saber-token")).content) {
+          totalList(2).then(res => {
+            this_.totalData = res.data.data
+          })
+        }
+      },  Number(res.data.data[0].dictKey)*1000)
+    })
   },
   beforeDestroy() {
     clearInterval(this.dispatchTimer); //关闭

+ 9 - 6
src/views/landTransportation/driver/index.vue

@@ -178,6 +178,7 @@ import {
   confirmCompletion,
   fleetList, motorcadeDriver, fleetDriverSave, getAttachment, saveAttached, arrival,borrow
 } from "@/api/landTransportation";
+import {businessStatisticsFrequency} from "@/api/wel";
 
 export default {
   name: "index",
@@ -574,12 +575,14 @@ export default {
       this.goodsOptionCrud.searchMenuSpan = num * 8;
       this.goodsOptionCrud.searchMenuPosition = "right";
     }
-    let this_ = this
-    this_.driverTimer = setInterval(function(){
-      motorcadeDriver(4).then(res=>{
-        this_.totalData = res.data.data
-      })
-    },5000)
+    businessStatisticsFrequency().then(res=> {
+      let this_ = this
+      this_.driverTimer = setInterval(function () {
+        motorcadeDriver(4).then(res => {
+          this_.totalData = res.data.data
+        })
+      }, Number(res.data.data[0].dictKey) * 1000)
+    })
   },
   beforeDestroy() {
     clearInterval(this.driverTimer); //关闭

+ 9 - 6
src/views/landTransportation/motorcadeDriver/index.vue

@@ -219,6 +219,7 @@ import {
   fleetDriverSave, telephone, getAttachment, saveAttached, recordingDetails, changeVehicle
 } from "@/api/landTransportation";
 import {location} from "@/api/gaude";
+import {businessStatisticsFrequency} from "@/api/wel";
 
 export default {
   name: "index",
@@ -765,12 +766,14 @@ export default {
       this.entrustOptionTwoT.searchMenuSpan = num * 8;
       this.entrustOptionTwoT.searchMenuPosition = "right";
     }
-    let this_ = this
-    this_.dispatchACarTimer = setInterval(function(){
-      motorcadeDriver(3).then(res=>{
-        this_.totalData = res.data.data
-      })
-    },5000)
+    businessStatisticsFrequency().then(res=>{
+      let this_ = this
+      this_.dispatchACarTimer = setInterval(function(){
+        motorcadeDriver(3).then(res=>{
+          this_.totalData = res.data.data
+        })
+      },  Number(res.data.data[0].dictKey)*1000)
+    })
   },
   beforeDestroy() {
     this.map && this.map.destroy();

+ 41 - 34
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -36,40 +36,34 @@
         </el-button>
       </div>
       <div>
-        <el-button
-            class="el-button--small-yh add-customer-btn"
-            type="warning"
-            size="small"
-            v-if="goodsForm.status > 0"
-            :disabled="
+        <div class="el-button&#45;&#45;small-yh add-customer-btn">
+          <el-button
+              type="warning"
+              size="small"
+              v-if="goodsForm.status > 0"
+              :disabled="
             (this.roleName.indexOf('平台') !== -1
             ||this.roleName.indexOf('经理') !== -1
             ||this.roleName.indexOf('部门经理') !== -1
             ||this.roleName.indexOf('总经理') !== -1) && !(this.roleName.indexOf('admin') !== -1)"
-            :style="{marginRight: goodsForm.status == 2?'80px':'180px'}"
-            @click="confirmChange"
-        >变更
-        </el-button>
-        <el-button
-            class="el-button--small-yh add-customer-btn"
-            type="success"
-            v-if="goodsForm.status === 0 && typeTwo === false"
-            size="small"
-            style="margin-right: 80px;"
-            :disabled="type"
-            @click="submit(true)"
-        >提交
-        </el-button>
-        <el-button
-            class="el-button--small-yh add-customer-btn"
-            type="success"
-            v-if="goodsForm.status === 1"
-            size="small"
-            style="margin-right: 80px;"
-            @click="submit(false)"
-        >取消提交
-        </el-button>
-        <div class="el-button&#45;&#45;small-yh add-customer-btn">
+              @click="confirmChange"
+          >变更
+          </el-button>
+          <el-button
+              type="success"
+              v-if="goodsForm.status === 0 && typeTwo === false"
+              size="small"
+              :loading="type"
+              @click="submit(true)"
+          >提交
+          </el-button>
+          <el-button
+              type="success"
+              v-if="goodsForm.status === 1"
+              size="small"
+              @click="submit(false)"
+          >取消提交
+          </el-button>
           <el-button
               type="primary"
               :disabled="goodsForm.status >= 1"
@@ -1533,6 +1527,11 @@ export default {
           this.orderFilesList.forEach(item => item.id = '')
           //查询业务员
           this.salesmanQuery()
+          if (this.goodsForm.status == 2) {
+            if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('总调度') !== -1) {
+              this.goodsForm.status = 2
+            }
+          }
         })
       } else if (this.id.slice(0, 2) === '首页' || this.id.slice(0, 2) === '台账') {
         if (this.id.slice(0, 2) === '首页') {
@@ -1565,8 +1564,10 @@ export default {
           // })
           //查询业务员
           this.salesmanQuery()
-          if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('总调度') !== -1) {
-            this.goodsForm.status = 2
+          if (this.goodsForm.status == 2) {
+            if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('总调度') !== -1) {
+              this.goodsForm.status = 2
+            }
           }
         })
       } else {
@@ -1595,8 +1596,10 @@ export default {
           // })
           //查询业务员
           this.salesmanQuery()
-          if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1) {
-            this.goodsForm.status = 2
+          if (this.goodsForm.status == 2){
+            if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1) {
+              this.goodsForm.status = 2
+            }
           }
         })
       }
@@ -2034,6 +2037,7 @@ export default {
                     item.arrivalTime = this.goodsForm.arrivalTime
                   }
                 })
+                this.type = true
                 saveSaveList({
                   ...this.goodsForm,
                   kind: '1',
@@ -2045,8 +2049,11 @@ export default {
                   saveDelegationList({
                     id: res.data.data
                   }).then(() => {
+                    this.type = false
                     this.$message.success('提交成功');
                     this.refreshData(res.data.data)
+                  }).finally(()=>{
+                    this.type = false
                   })
                 })
               } else {

+ 11 - 8
src/views/landTransportation/placeAnOrder/index.vue

@@ -182,6 +182,7 @@
 import detailPage from './detailPage'
 import {removeDelegationList, selectInvoiceList, totalList} from "@/api/landTransportation";
 import {getQueryString} from "@/util/util";
+import {businessStatisticsFrequency} from "@/api/wel";
 
 export default {
   name: "index",
@@ -412,14 +413,16 @@ export default {
     }
   },
   mounted() {
-    let this_ = this
-    this_.entrustTimer = setInterval(function () {
-      if (JSON.parse(localStorage.getItem("saber-token")).content) {
-        totalList(1).then(res => {
-          this_.totalData = res.data.data
-        })
-      }
-    }, 10000)
+    businessStatisticsFrequency().then(res=>{
+      let this_ = this
+      this_.entrustTimer = setInterval(function () {
+        if (JSON.parse(localStorage.getItem("saber-token")).content) {
+          totalList(1).then(res => {
+            this_.totalData = res.data.data
+          })
+        }
+      },  Number(res.data.data[0].dictKey)*1000)
+    })
   },
   beforeDestroy() {
     clearInterval(this.entrustTimer); //关闭

+ 255 - 30
src/views/warehousing/cargoClearance/index.vue

@@ -1,6 +1,52 @@
 <template>
   <div class="app-container">
-    <div v-show="pageShow">
+    <basic-container v-show="pageShow">
+      <avue-crud
+          ref="crud"
+          :option="option"
+          :search.sync="queryParams"
+          :data="warehousebillsList"
+          @resetColumn="resetColumn('crud','option','optionList',169)"
+          @saveColumn="saveColumn('crud','option','optionList',169)">
+        <template slot="menuLeft">
+          <el-button
+              type="primary"
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              v-hasPermi="['warehouseBusiness:stockTransfer:add']"
+          >新增
+          </el-button>
+          <el-button
+              type="success"
+              icon="el-icon-edit"
+              size="mini"
+              :disabled="single"
+              @click="handleUpdate"
+              v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
+          >修改
+          </el-button>
+          <el-button
+              type="warning"
+              icon="el-icon-download"
+              size="mini"
+              @click="handleExport"
+              v-hasPermi="['warehouseBusiness:stockTransfer:export']"
+          >导出
+          </el-button>
+          <el-button
+              type="info"
+              icon="el-icon-download"
+              size="mini"
+              :disabled="single"
+              @click="copyUpdate"
+              v-hasPermi="['agreement:agreementStorage:export']"
+          >复制新增
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <div v-show="pageShow" v-if="false">
       <el-form
         :model="queryParams"
         ref="queryForm"
@@ -374,16 +420,14 @@
         show-summary
         :summary-method="getSum"
         ref="table"
-        :height="tableHeight"
-      >
+        :height="tableHeight">
         <el-table-column type="selection" width="60" fixed align="center" />
         <el-table-column
           type="index"
           label="行号"
           width="50"
           align="center"
-          fixed
-        />
+          fixed/>
         <el-table-column
           v-for="(item, index) in getRowList"
           :key="index"
@@ -393,15 +437,14 @@
           align="center"
           :fixed="item.fixed"
           :show-overflow-tooltip="true"
-          sortable
-        >
+          sortable>
           <template slot-scope="scope">
             <span v-if="item.label == 'fMblno'">
-              <el-link :underline="false" type="primary"
-                ><div @click="handleUpdate(scope.row)">
+              <el-link :underline="false" type="primary">
+                <div @click="handleUpdate(scope.row)">
                   {{ scope.row.fMblno }}
-                </div></el-link
-              >
+                </div>
+              </el-link>
             </span>
             <span v-else>{{ scope.row[item.label] }}</span>
           </template>
@@ -411,16 +454,15 @@
           align="center"
           class-name="small-padding fixed-width"
           min-width="200"
-          fixed="right"
-        >
+          fixed="right">
           <template slot-scope="scope">
             <el-button
               size="mini"
               type="text"
               icon="el-icon-edit"
               @click="handleUpdate(scope.row, true)"
-              v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
-              >查看
+              v-hasPermi="['warehouseBusiness:stockTransfer:edit']">
+              查看
             </el-button>
             <el-button
               size="mini"
@@ -429,11 +471,10 @@
               v-if="
                 scope.row.fBillstatus == '录入' ||
                 scope.row.fBillstatus == '暂存' ||
-                scope.row.fBillstatus == '驳回'
-              "
+                scope.row.fBillstatus == '驳回'"
               @click="handleUpdate(scope.row, false)"
-              v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
-              >修改
+              v-hasPermi="['warehouseBusiness:stockTransfer:edit']">
+              修改
             </el-button>
             <el-button
               size="mini"
@@ -441,19 +482,16 @@
               icon="el-icon-delete"
               v-if="(scope.row.fItemsStatus == '待通关' || scope.row.fItemsStatus == '计划') && scope.row.isCreate == 1 || (scope.row.fItemsStatus == '待通关' || scope.row.fItemsStatus == '计划') && scope.row.isCreate == 0"
               @click="handleDelete(scope.row)"
-              v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
-              >删除
+              v-hasPermi="['warehouseBusiness:stockTransfer:remove']">
+              删除
             </el-button>
             <el-button
               size="mini"
               type="text"
               icon="el-icon-delete"
-              v-if="
-                scope.row.fBillstatus == '请核' ||
-                scope.row.fBillstatus == '审核中'
-              "
-              @click="handleUpdate(scope.row, true)"
-              >审核进度
+              v-if=" scope.row.fBillstatus == '请核' || scope.row.fBillstatus == '审核中'"
+              @click="handleUpdate(scope.row, true)">
+              审核进度
             </el-button>
           </template>
         </el-table-column>
@@ -463,8 +501,7 @@
         :total="total"
         :page.sync="queryParams.pageNum"
         :limit.sync="queryParams.pageSize"
-        @pagination="getList"
-      />
+        @pagination="getList"/>
     </div>
     <add-or-update
       v-show="pageShow2"
@@ -508,6 +545,170 @@ export default {
   name: "plans",
   data() {
     return {
+      option:{},
+      optionList:{
+        border: true,
+        align: 'center',
+        stripe: true,
+        index: true,
+        menu: false,
+        addBtn: false,
+        editBtn: false,
+        delBtn: false,
+        height: "auto",
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        column:[
+          {
+            index: "0",
+            prop: "fMblno",
+            label: "提单号",
+            width: 200,
+            search: true,
+          },
+          {
+            index: "1",
+            prop: "createBy",
+            label: "制单人",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "2",
+            prop: "fStorekeeper",
+            label: "仓管员",
+            width: 100,
+          },
+          {
+            index: "3",
+            prop: "fItemsStatus",
+            label: "通关状态",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "4",
+            prop: "fCorpid",
+            label: "客户",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "6",
+            prop: "fProductName",
+            label: "品名",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "7",
+            prop: "fMarks",
+            label: "品牌",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "8",
+            prop: "fBsdate",
+            searchProp:"timeInterval",
+            label: "通关日期",
+            width: 100,
+            type:'datetime',
+            searchRange:true,
+            search:true,
+            unlinkPanels:true,
+            defaultTime: ['00:00:00', '23:59:59'],
+            format:'yyyy-MM-dd HH:mm:ss',
+            valueFormat:'yyyy-MM-dd HH:mm:ss',
+          },
+          {
+            index: "9",
+            prop: "fWarehouseid",
+            label: "调入仓库",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "10",
+            prop: "fInwarehouseid",
+            label: "调出仓库",
+            width: 100,
+          },
+          {
+            index: "11",
+            prop: "fPlanqty",
+            label: "计划通关件数",
+            width: 180,
+          },
+          {
+            index: "12",
+            prop: "fQty",
+            label: "通关件数",
+            width: 100,
+          },
+          {
+            index: "13",
+            prop: "fGrossweight",
+            label: "通关毛重(KG)",
+            width: 180,
+          },
+          {
+            index: "14",
+            prop: "fNetweight",
+            label: "通关净重(kg)",
+            width: 180,
+          },
+          {
+            index: "15",
+            prop: "fBusinessType",
+            label: "业务类别",
+            width: 100,
+          },
+          {
+            index: "16",
+            prop: "fFeeStatus",
+            label: "费用状态",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "17",
+            prop: "fBillno",
+            label: "系统编号",
+            width: 100,
+            search: true,
+          },
+          {
+            index: "18",
+            prop: "fSbu",
+            label: "经营单位",
+            width: 100,
+            search: true,
+            type:'select',
+            showColumn: false,
+            hide:true
+          },
+          {
+            index: "19",
+            prop: "fTrademodeid",
+            label: "贸易方式",
+            width: 100,
+            search: true,
+            type:'select',
+            showColumn: false,
+            hide:true
+          }
+        ]
+      },
       tableHeight:'600',
       timer: "",
       pageShow: true,
@@ -704,7 +905,8 @@ export default {
   },
   // 使用子组件
   components: { draggable, AddOrUpdate },
-  created() {
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(169), this.optionList);
     let date = new Date();
     let lYear = parseInt(date.getFullYear())
     let lMonth = parseInt(date.getMonth())
@@ -766,6 +968,29 @@ export default {
     })
   },
   methods: {
+    //自定义列保存
+    async saveColumn(ref,option,optionBack,code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumn(ref,option,optionBack,code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
     // 获取当前月的第一天和最后一天
     // getMonth() {
     //   let date = new Date();