Просмотр исходного кода

修改货代bug 君海新加库存账统计 库存预警功能

Qukatie 5 месяцев назад
Родитель
Сommit
77fdd53118

+ 2 - 2
src/api/iosBasicData/inventoryAccount.js

@@ -2,7 +2,7 @@ import request from '@/router/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/api/blade-los/inventoryAccountStatistics/sum',
+    url: '/api/blade-los/inventoryAccountStatistics/list',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const boxNumberProfitStatisticsSum = (data) => {
   return request({
-    url: '/api/blade-los/inventoryAccountStatistics/list',
+    url: '/api/blade-los/inventoryAccountStatistics/sum',
     method: 'get',
     params: data
   })

+ 8 - 0
src/api/tradeAgency/oceanFreightImport.js

@@ -362,3 +362,11 @@ export const storagefeeitems= (data) => {
         params: data
     })
 }
+
+export const inventoryAlert= (data) => {
+    return request({
+        url: '/api/blade-los/inoutstorage/inventoryAlert',
+        method: 'post',
+        data: data
+    })
+}

+ 16 - 1
src/components/dicSelect/main.vue

@@ -7,7 +7,7 @@
                 :multiple="multiple" :filterable="filterable" :remote="remote" :remote-method="remoteMethod"
                 :loading="loading" :size="size" :disabled="disabled" :collapse-tags="collapseTags">
                 <el-option v-for="item in options" :key="item[key]" :label="item[label]"
-                    :value="item[keyValue ? keyValue : label]">
+                    :value="item[keyValue ? keyValue : label]" :disabled="item.disabled">
                     <span v-if="slotRight" style="float: left">{{ item[label] }}</span>
                     <span v-if="slotRight"
                         style="float: right; color: #8492a6; font-size: 13px; max-width: 200px; white-space: nowrap; overflow: hidden;text-overflow: ellipsis;">{{
@@ -271,6 +271,10 @@ export default {
             type: Boolean,
             default: false
         },
+        disabledLabel: {
+            type: String,
+            default: ''
+        }
     },
     model: {
         prop: "value",
@@ -328,8 +332,19 @@ export default {
                 this.loading = true
                 getDicinit(this.method, this.url, this.data).then(res => {
                     if (this.res) {
+                        res.data.data[this.res].forEach(e => {
+                            console.log(this.disabledLabel,this.disabledLabel.split(",").some(item => item[this.label]))
+                            if (this.disabledLabel.split(",").some(item => item==e[this.label])) {
+                                e.disabled = true
+                            }
+                        })
                         this.options = res.data.data[this.res]
                     } else {
+                        res.data.data.forEach(e => {
+                            if (this.disabledLabel.split(",").some(item => item==e[this.label])) {
+                                e.disabled = true
+                            }
+                        })
                         this.options = res.data.data
                     }
                 }).finally(() => {

+ 10 - 3
src/components/tradeAgency/fee-oceanFreight.vue

@@ -130,7 +130,7 @@
             <template slot="feeCnNameForm" slot-scope="{ row }">
                 <dic-select v-if="row.$cellEdit" v-model="row.feeCnName" placeholder="费用名称" key="id" label="cnName"
                     res="records" url="/blade-los/bfees/list" :filterable="true" :remote="true" dataName="cnName"
-                    @selectChange="rowDicChange('feeCnName', $event, row)"></dic-select>
+                    @selectChange="rowDicChange('feeCnName', $event, row)" disabledLabel="仓储费"></dic-select>
                 <span v-else>{{ row.feeCnName }}</span>
             </template>
             <template slot="unitNo" slot-scope="{ row }">
@@ -1260,7 +1260,7 @@ export default {
                 }
                 if (type == 'C') {
                     this.form.feeCenterListC.forEach(e => {
-                        if (e.accStatus == 0) {
+                        if (e.accStatus == 0&&e.feeCode !='CCF') {
                             this.$set(e, '$cellEdit', true)
                         }
                     })
@@ -1273,7 +1273,7 @@ export default {
                     if (this.selectionDList[index].accStatus == 1) return this.$message.error("第" + (Number(this.selectionDList[index].$index) + 1) + "行不允许删除");
                 }
                 for (let index in this.selectionCList) {
-                    if (this.selectionCList[index].accStatus == 1) return this.$message.error("第" + (Number(this.selectionCList[index].$index) + 1) + "行不允许删除");
+                    if (this.selectionCList[index].accStatus == 1||this.selectionCList[index].feeCode =='CCF') return this.$message.error("第" + (Number(this.selectionCList[index].$index) + 1) + "行不允许删除");
                 }
                 if (type == 'D') {
                     this.$confirm("确定将选择数据删除?", {
@@ -1310,6 +1310,7 @@ export default {
                     })
                 }
                 if (type == 'C') {
+
                     this.$confirm("确定将选择数据删除?", {
                         confirmButtonText: "确定",
                         cancelButtonText: "取消",
@@ -1387,6 +1388,9 @@ export default {
                         if (this.selectionCList[index].accStatus != 0) {
                             return this.$message.error("已生成账单");
                         }
+                        if (this.selectionCList[index].feeCode == 'CCF') {
+                            return this.$message.error("仓储费不允许生成账单");
+                        }
                     }
                     this.$confirm("确定将选择数据生成账单?", {
                         confirmButtonText: "确定",
@@ -1441,6 +1445,9 @@ export default {
                         if (this.selectionCList[index].accStatus != 1) {
                             return this.$message.error("未生成账单");
                         }
+                        if (this.selectionCList[index].feeCode == 'CCF') {
+                            return this.$message.error("仓储费不允许撤销账单");
+                        }
                     }
                     this.$confirm("确定将选择数据撤销账单?", {
                         confirmButtonText: "确定",

+ 22 - 24
src/views/approveDataH/configuration/mainList.json

@@ -110,11 +110,25 @@
       "index": 9
     },
     {
+      "label": "业务员",
+      "prop": "srcCnName",
+      "search": true,
+      "type": "select",
+      "props": {
+        "label": "name",
+        "value": "name"
+      },
+      "dicData":[],
+      "overHidden": true,
+      "width": 100,
+      "index": 10
+    },
+    {
       "label": "申请人",
       "prop": "sendUserId",
       "overHidden": true,
       "search": true,
-      "index": 10,
+      "index": 11,
       "width": 100,
       "type": "select",
       "props": {
@@ -132,7 +146,7 @@
       "searchRange": true,
       "search": true,
       "overHidden": true,
-      "index": 11,
+      "index": 12,
       "width": 150
     },
     {
@@ -140,14 +154,14 @@
       "prop": "orderRemark",
       "overHidden": true,
       "width": 100,
-      "index": 12
+      "index": 13
     },
     {
       "label": "已审",
       "prop": "level",
       "overHidden": true,
       "width": 100,
-      "index": 12.1
+      "index": 13.1
     },
     {
       "label": "业务日期",
@@ -158,7 +172,7 @@
       "unlinkPanels": true,
       "searchRange": true,
       "overHidden": true,
-      "index": 13,
+      "index": 14,
       "width": 150
     },
     {
@@ -172,7 +186,7 @@
       "searchRange": true,
       "search": true,
       "overHidden": true,
-      "index": 14,
+      "index": 15,
       "width": 150
     },
     {
@@ -180,36 +194,20 @@
       "prop": "receivableAmount",
       "overHidden": true,
       "width": 100,
-      "index": 15
+      "index": 16
     },
     {
       "label": "应付金额",
       "prop": "payAmount",
       "overHidden": true,
       "width": 100,
-      "index": 16
+      "index": 17
     },
     {
       "label": "利润",
       "prop": "grossProfit",
       "overHidden": true,
       "width": 100,
-      "index": 17
-    },
-    {
-      "label": "业务员",
-      "prop": "srcCnName",
-      "search": true,
-      "type": "select",
-      "hide": true,
-      "showColumn": false,
-      "props": {
-        "label": "name",
-        "value": "name"
-      },
-      "dicData":[],
-      "overHidden": true,
-      "width": 100,
       "index": 18
     }
   ]

+ 27 - 4
src/views/iosBasicData/AirtransportExport/bills/index.vue

@@ -4,7 +4,7 @@
             <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" id="out-table"
                 :header-cell-class-name="headerClassName" :permission="permissionList" :before-open="beforeOpen"
                 v-model="form" ref="crud" :search.sync="query" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
-                @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+                @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" :row-style="rowStyle"
                 @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
                 @expand-change="expandChange" @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.12)"
                 @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 309.12)">
@@ -352,7 +352,7 @@
                         {{ item.dictValue }}
                     </span>
                 </template>
-                <template slot="status" slot-scope="{ row }">
+                <!-- <template slot="status" slot-scope="{ row }">
                     <div>
                         <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
                             :style="{ 'background-color': item.colour }"
@@ -360,7 +360,7 @@
                             {{ item.dictValue }}
                         </span>
                     </div>
-                </template>
+                </template> -->
                 <template slot="corpCnName" slot-scope="scope">
                     <span
                         style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
@@ -549,7 +549,7 @@ export default {
                 highlightCurrentRow: true, // 单选
                 searchIcon: true,
                 searchIndex: 3,
-                stripe: true,
+                // stripe: true,
                 addBtn: false,
                 viewBtn: false,
                 delBtn: false,
@@ -1351,6 +1351,29 @@ export default {
         this.statusWorkDictsfun() // 业务审核类型
     },
     methods: {
+        rowStyle({ row, column, rowIndex, columnIndex }) {
+            if (row.status ==2) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#fbd26a',
+                    
+                }
+            }
+            if (row.status ==3) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#ced094',
+                    
+                }
+            }
+            if (row.status ==4) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#fbc4c4',
+                    
+                }
+            }
+        },
         // 展开和收起
         shiftCollapsiable() {
             this.fold = !this.fold

+ 27 - 3
src/views/iosBasicData/AirtransportImport/bills/index.vue

@@ -23,6 +23,7 @@
                      @refresh-change="refreshChange"
                      @on-load="onLoad"
                      @expand-change="expandChange"
+                     :row-style="rowStyle"
                      @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.13)"
                      @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 309.13)" >
               <!--#region-->
@@ -388,7 +389,7 @@
                       {{item.dictValue}}
                   </span>
               </template>
-              <template slot="status" slot-scope="{ row }">
+              <!-- <template slot="status" slot-scope="{ row }">
                     <div>
                         <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
                             :style="{ 'background-color': item.colour }"
@@ -396,7 +397,7 @@
                             {{ item.dictValue }}
                         </span>
                     </div>
-                </template>
+                </template> -->
               <template slot="corpCnName" slot-scope="scope">
                     <span
                         style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
@@ -605,7 +606,7 @@ import { getDeptTree } from "@/api/system/dept";
               highlightCurrentRow:true, // 单选
               searchIcon: true,
               searchIndex: 3,
-              stripe:true,
+            //   stripe:true,
               addBtn:false,
               viewBtn:false,
               delBtn:false,
@@ -1407,6 +1408,29 @@ import { getDeptTree } from "@/api/system/dept";
           this.statusWorkDictsfun() // 业务审核类型
       },
       methods: {
+        rowStyle({ row, column, rowIndex, columnIndex }) {
+            if (row.status ==2) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#fbd26a',
+                    
+                }
+            }
+            if (row.status ==3) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#ced094',
+                    
+                }
+            }
+            if (row.status ==4) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#fbc4c4',
+                    
+                }
+            }
+        },
         // 展开和收起
           shiftCollapsiable(){
               this.fold = !this.fold

+ 27 - 4
src/views/iosBasicData/OceanFreightImport/bills/index.vue

@@ -4,7 +4,7 @@
             <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" id="out-table"
                 :header-cell-class-name="headerClassName" :permission="permissionList" :before-open="beforeOpen"
                 v-model="form" ref="crud" :search.sync="query" @row-update="rowUpdate" @row-save="rowSave"
-                @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
+                @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" :row-style="rowStyle"
                 @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
                 @refresh-change="refreshChange" @on-load="onLoad" @expand-change="expandChange"
                 @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.11)"
@@ -372,7 +372,7 @@
                     </div>
 
                 </template>
-                <template slot="status" slot-scope="{ row }">
+                <!-- <template slot="status" slot-scope="{ row }">
                     <div>
                         <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
                             :style="{ 'background-color': item.colour }"
@@ -381,7 +381,7 @@
                         </span>
                     </div>
 
-                </template>
+                </template> -->
                 <template slot="corpCnName" slot-scope="scope">
                     <span
                         style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
@@ -567,7 +567,7 @@ export default {
                 highlightCurrentRow: true, // 单选
                 searchIcon: true,
                 searchIndex: 3,
-                stripe: true,
+                // stripe: true,
                 addBtn: false,
                 viewBtn: false,
                 delBtn: false,
@@ -1470,6 +1470,29 @@ export default {
         }
     },
     methods: {
+        rowStyle({ row, column, rowIndex, columnIndex }) {
+            if (row.status ==2) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#fbd26a',
+                    
+                }
+            }
+            if (row.status ==3) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#ced094',
+                    
+                }
+            }
+            if (row.status ==4) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#fbc4c4',
+                    
+                }
+            }
+        },
         //导出
         outExport() {
             this.$confirm('是否导出当前所有数据?', '提示', {

+ 32 - 9
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -6,7 +6,7 @@
                 v-model="form" ref="crud" :search.sync="query" @row-update="rowUpdate" @row-save="rowSave"
                 @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
                 @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
-                @refresh-change="refreshChange" @on-load="onLoad" @expand-change="expandChange"
+                @refresh-change="refreshChange" @on-load="onLoad" @expand-change="expandChange" :row-style="rowStyle"
                 @resetColumn="resetColumnTwo('crud', 309)" @saveColumn="saveColumnTwo('crud', optionBack, 309)">
                 <template slot-scope="{disabled,size}" slot="billSortSearch">
                     <el-radio-group v-model="query.billSort">
@@ -339,12 +339,12 @@
                     </el-dropdown>
                     <el-dropdown style="line-height: 0">
                         <el-button size="small" type="success" style="margin-right: 8px"
-                                   :disabled="selectionList.length == 0">
+                            :disabled="selectionList.length == 0">
                             发送 SI EDI<i class="el-icon-arrow-down el-icon--right"></i>
                         </el-button>
                         <el-dropdown-menu slot="dropdown">
                             <el-dropdown-item v-for="item in ediData_SI" :key="item.id"
-                                              @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
+                                @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
                             </el-dropdown-item>
                         </el-dropdown-menu>
                     </el-dropdown>
@@ -391,7 +391,7 @@
                         </span>
                     </div>
                 </template>
-                <template slot="status" slot-scope="{ row }">
+                <!-- <template slot="status" slot-scope="{ row }">
                     <div>
                         <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
                             :style="{ 'background-color': item.colour }"
@@ -399,7 +399,7 @@
                             {{ item.dictValue }}
                         </span>
                     </div>
-                </template>
+                </template> -->
                 <template slot="corpCnName" slot-scope="scope">
                     <span
                         style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
@@ -683,7 +683,7 @@ export default {
                 highlightCurrentRow: true, // 单选
                 searchIcon: true,
                 searchIndex: 3,
-                stripe: true,
+                // stripe: true,
                 addBtn: false,
                 viewBtn: false,
                 delBtn: false,
@@ -1619,6 +1619,29 @@ export default {
         }
     },
     methods: {
+        rowStyle({ row, column, rowIndex, columnIndex }) {
+            if (row.status ==2) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#fbd26a',
+                    
+                }
+            }
+            if (row.status ==3) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#ced094',
+                    
+                }
+            }
+            if (row.status ==4) {
+                return {
+                    // color: '#fff',
+                    backgroundColor: '#fbc4c4',
+                    
+                }
+            }
+        },
         //导出
         outExport() {
             this.$confirm('是否导出当前所有数据?', '提示', {
@@ -1656,8 +1679,8 @@ export default {
             editypesList(1, 1000, { type: 'HYCK' }).then(res => {
                 console.log('EDI', res.data.data.records)
                 this.ediData = res.data.data.records
-                this.ediData_SO = res.data.data.records.filter(r=>r.groupName=='SO')
-                this.ediData_SI = res.data.data.records.filter(r=>r.groupName=='SI')
+                this.ediData_SO = res.data.data.records.filter(r => r.groupName == 'SO')
+                this.ediData_SI = res.data.data.records.filter(r => r.groupName == 'SI')
                 console.log(this.ediData_SO, this.ediData_SI)
             })
         },
@@ -2208,7 +2231,7 @@ export default {
 
         // 更改表格颜色
         headerClassName(tab) {
-            //颜色间隔
+            // //颜色间隔
             let back = ""
             if (tab.columnIndex >= 0 && tab.column.level === 1) {
                 if (tab.columnIndex % 2 === 0) {

+ 32 - 7
src/views/iosBasicData/inventoryAccount/index.vue

@@ -19,11 +19,11 @@
                     {{ row.billNo }}
                 </span>
             </template>
-            <template slot="mblno" slot-scope="{row}">
+            <template slot="mblNo" slot-scope="{row}">
                 <span
                     style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
                     @click.stop="rowCell(row)">
-                    {{ row.mblno }}
+                    {{ row.mblNo }}
                 </span>
             </template>
             <template slot="srcNo" slot-scope="{row}">
@@ -33,6 +33,9 @@
                     {{ row.srcNo }}
                 </span>
             </template>
+            <template slot="inventorySearch">
+                <el-checkbox v-model="query.inventory" :true-label="1" ></el-checkbox>
+            </template>
         </avue-crud>
     </basic-container>
 </template>
@@ -70,7 +73,7 @@ export default {
                 column: [
                     {
                         label: "提单号",
-                        prop: "mblno",
+                        prop: "mblNo",
                         search: true,
                         overHidden: true,
                     },
@@ -94,7 +97,7 @@ export default {
                     },
                     {
                         label: "客户名称",
-                        prop: "corpName",
+                        prop: "corpId",
                         type: 'select',
                         search: true,
                         filterable: true,
@@ -106,6 +109,13 @@ export default {
                             res: 'data.records'
                         },
                         overHidden: true,
+                        hide:true,
+                        showColumn:false,
+                    },
+                    {
+                        label: "客户名称",
+                        prop: "corpName",
+                        overHidden: true,
                     },
                     {
                         label: "入库日期",
@@ -125,7 +135,6 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dataType: 'string',
                         dicUrl: '/api/blade-los/bcommodity/list?cnName={{key}}',
                         overHidden: true,
                         props: {
@@ -136,9 +145,25 @@ export default {
                     },
                     {
                         label: "仓库",
-                        prop: "warehouseName",
+                        prop: "warehouseId",
                         search: true,
                         overHidden: true,
+                        type: 'select',
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-los/storage/list?cname={{key}}",
+                        props: {
+                            label: 'cname',
+                            value: 'id',
+                            res: 'data.records'
+                        },
+                        hide:true,
+                        showColumn:false,
+                    },
+                    {
+                        label: "仓库",
+                        prop: "warehouseName",
+                        overHidden: true,
                     },
                     {
                         label: "入库件数",
@@ -421,7 +446,7 @@ export default {
         },
         Export() {
             const routeData = this.$router.resolve({
-                path: '/api/blade-los/financeStatistics/feeSettlementExport',//跳转目标窗口的地址
+                path: '/api/blade-los/inventoryAccountStatistics/export',//跳转目标窗口的地址
                 query: {
                     'Blade-Auth': getToken(),
                     ...this.query

+ 16 - 1
src/views/iosBasicData/storageFeeF/detailsPage.vue

@@ -81,6 +81,19 @@ export default {
                         disabled: false,
                     },
                     // {
+                    //     label: "计费规则",
+                    //     prop: "billingRules",
+                    //     type: "select",
+                    //     dicData: [{
+                    //         label: '净重',
+                    //         value: '0'
+                    //     }, {
+                    //         label: '毛重',
+                    //         value: '1'
+                    //     }],
+                    //     disabled: true,
+                    // },
+                    // {
                     //     label: "计费起始时间",
                     //     prop: "chargingStartDate",
                     //     type: "date",
@@ -250,8 +263,10 @@ export default {
             if (name == 'warehouseName') {
                 if (row) {
                     this.form.warehouseId = row.id
+                    // this.form.billingRules=row.billingRules
                 } else {
-                    this.form.warehouseId = null
+                    this.form.billingRules=null
+                    // this.form.warehouseId = null
                 }
             }
         },

+ 10 - 0
src/views/iosBasicData/storageFeeF/index.vue

@@ -104,6 +104,16 @@ export default {
                         overHidden: true
                     },
                     {
+                        label: "制单人",
+                        prop: "createUserName",
+                        overHidden: true
+                    },
+                    {
+                        label: "制单日期",
+                        prop: "createTime",
+                        overHidden: true
+                    },
+                    {
                         label: "备注",
                         prop: "remarks",
                         overHidden: true

+ 164 - 160
src/views/tirePartsMall/salesService/inStorage/detailsPage.vue

@@ -14,7 +14,8 @@
                     v-if="form.statusName != '已入库'" @click="editCustomer">保存数据
                 </el-button>
                 <el-button class="el-button--small-yh" type="success" size="small"
-                    v-if="form.statusName == '待入库' || form.statusName == '已撤销'" @click="complete" :disabled="isButton">入库完成
+                    v-if="form.statusName == '待入库' || form.statusName == '已撤销'" @click="complete"
+                    :disabled="isButton">入库完成
                 </el-button>
                 <el-button class="el-button--small-yh" type="success" size="small" v-if="form.statusName == '已入库'"
                     @click="revoke" :disabled="isButton">撤销入库
@@ -51,9 +52,10 @@
                             </template> -->
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button :size="size" :disabled="disabled || isEdit" :type="type"
-                                  :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">
-                                  {{row.$cellEdit?'保存':'编辑'}}
-                              </el-button>
+                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
+                                    @click="rowEdit(row, index)">
+                                    {{ row.$cellEdit ? '保存' : '编辑' }}
+                                </el-button>
                                 <el-button icon="el-icon-delete" :size="size"
                                     :disabled="disabled || form.statusName == '已入库' || isEdit || isEdits" :type="type"
                                     @click="rowDelBox(row, index)">删除
@@ -65,7 +67,7 @@
                               <el-button type="success" size="small" :disabled="isrowAdd" icon="el-icon-bottom" @click="excelBox = true">导入
                               </el-button> -->
                                 <el-button type="primary" icon="el-icon-printer" size="small"
-                                  @click="handlePrint">打印</el-button>
+                                    @click="handlePrint">打印</el-button>
                                 <el-button type="danger" plain size="small"
                                     :disabled="disabled || form.statusName == '已入库' || isEdit || isEdits"
                                     @click="batchDelete">一键删除</el-button>
@@ -73,7 +75,8 @@
                         </avue-crud>
                     </el-tab-pane>
                     <el-tab-pane label="入库信息" name="payment_details">
-                        <avue-crud :option="optionPaymentDetails" ref="payment_details" :data="form.shipVOList" :key="key"
+                        <avue-crud :option="optionPaymentDetails" ref="payment_details" :data="form.shipVOList"
+                            :key="key"
                             @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 349)"
                             @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 349)">
                         </avue-crud>
@@ -98,8 +101,8 @@
         </div>
         <el-dialog title="导入明细" append-to-body :visible.sync="excelBox" v-if="excelBox" width="555px"
             :close-on-click-modal="false" v-dialog-drag>
-            <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading" :upload-before="uploadBefore"
-                :upload-after="uploadAfter">
+            <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading"
+                :upload-before="uploadBefore" :upload-after="uploadAfter">
                 <template slot="excelTemplate">
                     <el-button type="primary" @click="derivation">
                         点击下载<i class="el-icon-download el-icon--right"></i>
@@ -352,162 +355,163 @@ export default {
                     }
                 ],
                 column: [
-                //     {
-                //     label: '商品名称',
-                //     prop: 'goodsId',
-                //     width: 200,
-                //     overHidden: true,
-                //     disabled: false,
-                //     filterable: true,
-                //     remote: true,
-                //     hide: true,
-                //     type: 'select',
-                //     props: {
-                //         label: 'cname',
-                //         value: 'id'
-                //     },
-                //     dicUrl: '/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1'
-                // }, 
-                {
-                    label: '商品名称',
-                    prop: 'goodsName',
-                    width: 200,
-                    overHidden: true,
-                    disabled: false,
-                    filterable: true,
-                },
-                // {
-                //     label: "价格",
-                //     prop: "price",
-                //     disabled: false,
-                //     ovrHidden: true,
-                //     rules: [{
-                //         required: true,
-                //         message: " ",
-                //         trigger: "blur"
-                //     }, {
-                //         validator: (rule, value, callback) => {
-                //             if (value < 0) {
-                //                 callback(new Error("单价不能小于0"));
-                //             } else {
-                //                 callback();
-                //             }
-                //         },
-                //         trigger: "blur"
-                //     }]
-                // },
-                {
-                    label: "销售数量",
-                    prop: "goodsNum",
-                    disabled: true,
-                    ovrHidden: true,
-                },
-                {
-                    label: '实际库存',
-                    prop: 'inventory',
-                    remote: true,
-                    overHidden: true,
-                },
-                {
-                    label: "退货数量",
-                    prop: "sendNum",
-                    width: 100,
-                    // cell: true,
-                    disabled: false,
-                    overHidden: true,
-                    rules: [{
-                        required: true,
-                        message: " ",
-                        trigger: "blur"
+                    {
+                        label: '商品名称',
+                        prop: 'goodsId',
+                        width: 200,
+                        overHidden: true,
+                        // disabled: false,
+                        // filterable: true,
+                        // remote: true,
+                        hide: true,
+                        showColumn: false,
+                        // type: 'select',
+                        // props: {
+                        //     label: 'cname',
+                        //     value: 'id'
+                        // },
+                        // dicUrl: '/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1'
                     },
                     {
-                        validator: (rule, value, callback) => {
-                            if (value < 0) {
-                                callback(new Error("实际数量不能小于0"));
-                            } else {
-                                callback();
-                            }
-                        },
-                        trigger: "blur"
-                    }]
-                }, {
-                    label: "批次号",
-                    cell: true,
-                    width: 120,
-                    prop: "dot",
-                    type: "select",
-                    disabled: false,
-                    // allowCreate: true,
-                    // filterable: true,
-                    dicData: [],
-                    props: {
-                        label: "dot",
-                        value: "dot"
+                        label: '商品名称',
+                        prop: 'goodsName',
+                        width: 200,
+                        overHidden: true,
+                        disabled: false,
+                        filterable: true,
                     },
-                    overHidden: true
-                }, {
-                    label: '商品编码',
-                    prop: 'goodsNo',
-                    overHidden: true,
-                    disabled: false,
-                    width: 140
-                    // }, {
-                    //     label: "品牌",
-                    //     prop: 'brandId',
-                    //     width: 100,
-                    //     overHidden: true,
+                    // {
+                    //     label: "价格",
+                    //     prop: "price",
                     //     disabled: false,
-                    //     type: 'select',
-                    //     props: {
-                    //         label: 'cname',
-                    //         value: 'id'
-                    //     },
-                    //     dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP'
-                    // }, {
-                }, {
-                    label: "品牌",
-                    prop: "brandName",
-                    disabled: false,
-                    overHidden: true
-                }, {
-                    label: "规格型号",
-                    prop: "propertyName",
-                    overHidden: true,
-                    disabled: false,
-                    // rules: [{
-                    //     required: true,
-                    //     message: " ",
-                    //     trigger: "blur"
-                    // }]
-                }, {
-                    label: "花纹",
-                    prop: "pattern",
-                    disabled: false,
-                    overHidden: true
-                }, {
-                    label: "商品描述",
-                    prop: "goodsDescription",
-                    disabled: false,
-                    overHidden: true
-                }, {
-                    label: "单位",
-                    prop: 'units',
-                    type: "select",
-                    disabled: false,
-                    props: {
-                        label: "dictValue",
-                        value: "dictValue"
+                    //     ovrHidden: true,
+                    //     rules: [{
+                    //         required: true,
+                    //         message: " ",
+                    //         trigger: "blur"
+                    //     }, {
+                    //         validator: (rule, value, callback) => {
+                    //             if (value < 0) {
+                    //                 callback(new Error("单价不能小于0"));
+                    //             } else {
+                    //                 callback();
+                    //             }
+                    //         },
+                    //         trigger: "blur"
+                    //     }]
+                    // },
+                    {
+                        label: "销售数量",
+                        prop: "goodsNum",
+                        disabled: true,
+                        ovrHidden: true,
                     },
-                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
-                }, {
-                    label: "备注",
-                    cell: true,
-                    prop: "remarks",
-                    width: 150,
-                    span: 16,
-                    disabled: false,
-                    overHidde: true
-                }]
+                    {
+                        label: '实际库存',
+                        prop: 'inventory',
+                        remote: true,
+                        overHidden: true,
+                    },
+                    {
+                        label: "退货数量",
+                        prop: "sendNum",
+                        width: 100,
+                        // cell: true,
+                        disabled: false,
+                        overHidden: true,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        },
+                        {
+                            validator: (rule, value, callback) => {
+                                if (value < 0) {
+                                    callback(new Error("实际数量不能小于0"));
+                                } else {
+                                    callback();
+                                }
+                            },
+                            trigger: "blur"
+                        }]
+                    }, {
+                        label: "批次号",
+                        cell: true,
+                        width: 120,
+                        prop: "dot",
+                        type: "select",
+                        disabled: false,
+                        // allowCreate: true,
+                        // filterable: true,
+                        dicData: [],
+                        props: {
+                            label: "dot",
+                            value: "dot"
+                        },
+                        overHidden: true
+                    }, {
+                        label: '商品编码',
+                        prop: 'goodsNo',
+                        overHidden: true,
+                        disabled: false,
+                        width: 140
+                        // }, {
+                        //     label: "品牌",
+                        //     prop: 'brandId',
+                        //     width: 100,
+                        //     overHidden: true,
+                        //     disabled: false,
+                        //     type: 'select',
+                        //     props: {
+                        //         label: 'cname',
+                        //         value: 'id'
+                        //     },
+                        //     dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP'
+                        // }, {
+                    }, {
+                        label: "品牌",
+                        prop: "brandName",
+                        disabled: false,
+                        overHidden: true
+                    }, {
+                        label: "规格型号",
+                        prop: "propertyName",
+                        overHidden: true,
+                        disabled: false,
+                        // rules: [{
+                        //     required: true,
+                        //     message: " ",
+                        //     trigger: "blur"
+                        // }]
+                    }, {
+                        label: "花纹",
+                        prop: "pattern",
+                        disabled: false,
+                        overHidden: true
+                    }, {
+                        label: "商品描述",
+                        prop: "goodsDescription",
+                        disabled: false,
+                        overHidden: true
+                    }, {
+                        label: "单位",
+                        prop: 'units',
+                        type: "select",
+                        disabled: false,
+                        props: {
+                            label: "dictValue",
+                            value: "dictValue"
+                        },
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
+                    }, {
+                        label: "备注",
+                        cell: true,
+                        prop: "remarks",
+                        width: 150,
+                        span: 16,
+                        disabled: false,
+                        overHidde: true
+                    }]
             },
             selectionMultilist: [], // 多选数据
             optionPaymentDetails: {},
@@ -706,7 +710,7 @@ export default {
         }
         this.$store.commit("DOMIO_IN_DETAIL");
         isProcurement({ "param": "number.decimal" }).then(res => {
-            this.numberDecimal = res.data.data?Number(res.data.data):0
+            this.numberDecimal = res.data.data ? Number(res.data.data) : 0
         })
     },
     components: {

+ 166 - 14
src/views/tradeAgency/oceanFreightImport/detailsPage.vue

@@ -215,19 +215,19 @@
                     </template>
                     <template slot="cntrTypeCodeHeader" slot-scope="{column}">
                         <span style="color: #1e9fff;cursor: pointer;" @click="inJump('箱型')">{{ (column || {}).label
-                        }}</span>
+                            }}</span>
                     </template>
                     <template slot="goodsNameHeader" slot-scope="{column}">
                         <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
-                        }}</span>
+                            }}</span>
                     </template>
                     <template slot="hsCodeHeader" slot-scope="{column}">
                         <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
-                        }}</span>
+                            }}</span>
                     </template>
                     <template slot="goodsTypeHeader" slot-scope="{column}">
                         <span style="color: #1e9fff;cursor: pointer;" @click="inJump('类型')">{{ (column || {}).label
-                        }}</span>
+                            }}</span>
                     </template>
                     <template slot="index" slot-scope="{row,index}">
                         <span>{{ index + 1 }}</span>
@@ -365,7 +365,7 @@
                     @saveColumn="saveColumn('crud3', 'option3', 'optionBack3', 390)">
                     <template slot="storageUnitHeader" slot-scope="{column}">
                         <span style="color: #1e9fff;cursor: pointer;" @click="inJump('入库单位')">{{ (column || {}).label
-                        }}</span>
+                            }}</span>
                     </template>
                     <template slot="warehouseName" slot-scope="{ row }">
                         <dic-select v-if="row.$cellEdit" v-model="row.warehouseName" placeholder="入库" key="id"
@@ -493,13 +493,27 @@
                 <el-button type="primary" @click="ckSubmit(ckForm)">确 定</el-button>
             </span>
         </el-dialog>
+        <el-dialog append-to-body title="库存预警" :visible.sync="yjVisible" width="60%" :close-on-click-modal="false"
+            v-dialog-drag>
+            <span>
+                <span style="font-size: 16px;color:#F56C6C">{{ yjForm.content }}</span> <br>
+                <span> <el-button type="warning" size="small" @click="outExport">导 出
+                    </el-button></span>
+
+                <avue-crud :option="yhOption" :data="yjForm.feeCenterList"></avue-crud>
+            </span>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="yjVisible = false">取 消</el-button>
+                <el-button type="primary" @click="yjSubmit(rowForm)">确 定</el-button>
+            </span>
+        </el-dialog>
         <dictbiz-dialog ref="dictbiz" :title="dicTitle" :code="dicCode" :parentId="parentId" @closed="getAllWorkDicts">
         </dictbiz-dialog>
     </div>
 </template>
 
 <script>
-import { storagefeeitems, submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2, revokePrecontainers, revokeDispatchVehicles, revokeWarehouseEntry, revokeInoutstorage, revokeOutbound, confirmInspection, revokeInspection, confirmReturnBox, revokeReturnBox } from "@/api/tradeAgency/oceanFreightImport";
+import { storagefeeitems, submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2, revokePrecontainers, revokeDispatchVehicles, revokeWarehouseEntry, revokeInoutstorage, revokeOutbound, confirmInspection, revokeInspection, confirmReturnBox, revokeReturnBox, inventoryAlert } from "@/api/tradeAgency/oceanFreightImport";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import feeInfo from "@/components/tradeAgency/fee-oceanFreight";
 import reports from "@/components/tradeAgency/reportsJK.vue";
@@ -507,11 +521,86 @@ import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
 import businessReports from "@/components/tradeAgency/businessReportsJK.vue";
 import { precontainersRemove } from "@/api/iosBasicData/ReceivingOrders/precontainers";
+import { getToken } from "@/util/auth";
 import _ from "lodash";
 export default {
     name: "detailsPage",
     data() {
         return {
+            rowForm: {},
+            yjForm: {
+                feeCenterList: []
+            },
+            yjVisible: false,
+            yhOption: {
+                menu: false,
+                header: false,
+                align: 'center',
+                column: [
+                    {
+                        label: "业务类型",
+                        prop: "businessType",
+                        width: "100",
+                        overHidden: true,
+                        dicData: [{
+                            label: '海运进口',
+                            value: 'SI',
+                        }, {
+                            label: '海运出口',
+                            value: 'SE',
+                        }]
+                    },
+                    {
+                        label: "合同号",
+                        prop: "bookingNo",
+                        width: "100",
+                        overHidden: true,
+                    },
+                    {
+                        label: "提单号",
+                        prop: "mblno",
+                        width: "100",
+                        overHidden: true,
+                    },
+                    {
+                        label: "往来单位",
+                        prop: "corpCnName",
+                        width: "100",
+                        overHidden: true,
+                    },
+                    {
+                        label: "费用名称",
+                        prop: "feeCnName",
+                        width: "100",
+                        overHidden: true,
+                    },
+                    {
+                        label: "未收金额",
+                        prop: "unsettledAmount",
+                        width: "100",
+                        overHidden: true,
+                    },
+                    {
+                        label: "业务时间",
+                        prop: "billDate",
+                        width: "100",
+                        overHidden: true,
+                    },
+                    {
+                        label: "账单",
+                        prop: "accStatus",
+                        width: '80',
+                        overHidden: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }]
+                    }
+                ]
+            },
             ckForm: {
                 // id: null,
                 // returnDate: null,
@@ -1858,6 +1947,17 @@ export default {
                 }
             })
         },
+        yjSubmit(row) {
+            storagefeeitems({ pid: row.warehouseId, goodsType: row.goodsType }).then(res => {
+                this.ckForm = {
+                    ...row,
+                    storageFeePriceD: res.data.data.price,
+                    storageFeePriceC: res.data.data.priceC
+                }
+                this.yjVisible = false
+                this.ckVisible = true
+            })
+        },
         ckSubmit(row) {
             if (row.storageFeePriceD == 0 || row.storageFeePriceD == null || row.storageFeePriceC == 0 || row.storageFeePriceC == null) return this.$message.success("仓储费单价收和仓储费单价付不能为空或0");
             const loading = this.$loading({
@@ -2041,7 +2141,7 @@ export default {
         rowCell(name, row, index) {
             if (name == '箱编辑') {
                 if (row.$cellEdit == true) {
-                    if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight| !row.grossWeight || !row.amount) {
+                    if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight | !row.grossWeight || !row.amount) {
                         return this.$message.error((!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.grossWeight ? "毛重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
                     }
                     this.$set(row, "$cellEdit", false);
@@ -2108,6 +2208,9 @@ export default {
             }
             if (name == '出库编辑') {
                 if (row.$cellEdit == true) {
+                    if (this.compareDates(row.outStorageDate, row.storageDate)) {
+                        return this.$message.error("出库日期不能早于入库日期");
+                    }
                     const loading = this.$loading({
                         lock: true,
                         text: '加载中',
@@ -2408,6 +2511,13 @@ export default {
                 if (!row.outStorageDate || !row.outQuantity || !row.outWeight) {
                     return this.$message.error((!row.outStorageDate ? "出库时间," : '') + (!row.outQuantity ? "出库件数," : '') + (!row.outWeight ? "出库重量" : '') + "不能为空");
                 }
+                if (this.compareDates(row.outStorageDate, row.storageDate)) {
+                    return this.$message.error("出库日期不能早于入库日期");
+                }
+                this.rowForm = {}
+                this.yjForm = {
+                    feeCenterList: []
+                }
                 if (row.confirmDispatchVehicles == 1) {
                     const loading = this.$loading({
                         lock: true,
@@ -2422,14 +2532,23 @@ export default {
                         loading.close()
                     })
                 } else {
-                    storagefeeitems({ pid: row.warehouseId, goodsType: row.goodsType }).then(res => {
-                        this.ckForm = {
-                            ...row,
-                            storageFeePriceD: res.data.data.price,
-                            storageFeePriceC: res.data.data.priceC
+                    inventoryAlert(row).then(res => {
+                        if (res.data.data.status == true) {
+                            this.rowForm = row
+                            this.yjForm = res.data.data
+                            this.yjVisible = true
+                        } else {
+                            storagefeeitems({ pid: row.warehouseId, goodsType: row.goodsType }).then(res => {
+                                this.ckForm = {
+                                    ...row,
+                                    storageFeePriceD: res.data.data.price,
+                                    storageFeePriceC: res.data.data.priceC
+                                }
+                                this.ckVisible = true
+                            })
                         }
-                        this.ckVisible = true
                     })
+
                     // const loading = this.$loading({
                     //     lock: true,
                     //     text: '加载中',
@@ -2463,6 +2582,39 @@ export default {
                 })
             }
         },
+        compareDates(date1, date2) {
+            const d1 = new Date(date1);
+            const d2 = new Date(date2);
+            if (d1 >= d2) {
+                return false;
+            } else if (d1 < d2) {
+                return true;
+            }
+        },
+        outExport() {
+            let config = { params: { ...this.query } }
+            if (config.params) {
+                for (const propName of Object.keys(config.params)) {
+                    const value = config.params[propName];
+                    if (value !== null && typeof (value) !== "undefined") {
+                        if (value instanceof Array) {
+                            for (const key of Object.keys(value)) {
+                                let params = propName + '[' + key + ']';
+                                config.params[params] = value[key]
+                            }
+                            delete config.params[propName]
+                        }
+                    }
+                }
+            }
+            const routeData = this.$router.resolve({
+                path: '/api/blade-los/inoutstorage/inventoryAlertExport',      //跳转目标窗口的地址
+                query: {
+                    id: this.rowForm.id,
+                }
+            })
+            window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+        },
         getDetails(id) {
             const loading = this.$loading({
                 lock: true,
@@ -2513,7 +2665,7 @@ export default {
                 if (valid) {
                     for (let row of this.form.preContainersList) {
                         if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.grossWeight || !row.amount) {
-                            return this.$message.error("箱信息:" + (!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '')+ (!row.grossWeight ? "毛重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
+                            return this.$message.error("箱信息:" + (!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.grossWeight ? "毛重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
                         }
                     }
                     if (this.$refs.feeInfo.submitValidate()) {