Browse Source

新加费用模板 优化页面

Qukatie 11 months ago
parent
commit
bbfcab20fd

+ 8 - 0
src/api/iosBasicData/costcenter/airlineProfit.js

@@ -10,4 +10,12 @@ export const getList = (current, size, params) => {
             size
         }
     })
+}
+//贸易代理删除
+export const remove = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/removeItemList',
+        method: 'post',
+        params: data
+    })
 }

+ 97 - 0
src/api/iosBasicData/costcenter/coc.js

@@ -0,0 +1,97 @@
+import request from '@/router/axios';
+//贸易代理列表
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-los/routecost/list',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size
+        }
+    })
+}
+//贸易代理明细
+export const getDetail = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/detail',
+        method: 'get',
+        params: data
+    })
+}
+
+//贸易代理保存
+export const submit = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/submit',
+        method: 'post',
+        data: data
+    })
+}
+
+//申请付款
+export const generatePayment = (data) => {
+    return request({
+        url: '/api/blade-los/agent/generatePayment',
+        method: 'post',
+        data: data
+    })
+}
+//撤销申请付款
+export const revokeApplyForPayment = (data) => {
+    return request({
+        url: '/api/blade-los/agent/revokeApplyForPayment',
+        method: 'post',
+        data: data
+    })
+}
+//贸易代理删除
+export const remove = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/remove',
+        method: 'post',
+        params: data
+    })
+}
+
+//贸易代理删除
+export const removeItem = (data) => {
+    return request({
+        url: '/api/blade-los/routecostitem/remove',
+        method: 'post',
+        params: data
+    })
+}
+//单据请核
+export const checkAgent = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/checkRouteCost',
+        method: 'post',
+        data: data
+    })
+}
+//撤销单据请核
+export const revokeCheckAgent = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/revokeCheckRouteCost',
+        method: 'post',
+        data: data
+    })
+}
+//单据复制
+export const copyAgent = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/copy',
+        method: 'get',
+        params: data
+    })
+}
+
+//贸易代理费用明细删除
+export const feeRemove = (data) => {
+    return request({
+        url: '/api/blade-los/routecostfee/remove',
+        method: 'post',
+        params: data
+    })
+}

+ 18 - 2
src/api/iosBasicData/costcenter/soc.js

@@ -28,6 +28,22 @@ export const submit = (data) => {
         data: data
     })
 }
+//贸易代理保存
+export const submitItemList = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/submitItemList',
+        method: 'post',
+        data: data
+    })
+}
+//贸易代理保存
+export const submitFeeList = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/submitFeeList',
+        method: 'post',
+        data: data
+    })
+}
 
 //申请付款
 export const generatePayment = (data) => {
@@ -57,7 +73,7 @@ export const remove = (data) => {
 //贸易代理删除
 export const removeItem = (data) => {
     return request({
-        url: '/api/blade-los/routecostitem/remove',
+        url: '/api/blade-los/routecost/removeItemList',
         method: 'post',
         params: data
     })
@@ -90,7 +106,7 @@ export const copyAgent = (data) => {
 //贸易代理费用明细删除
 export const feeRemove = (data) => {
     return request({
-        url: '/api/blade-los/routecostfee/remove',
+        url: '/api/blade-los/routecost/removeFeeList',
         method: 'post',
         params: data
     })

+ 42 - 10
src/views/iosBasicData/costcenter/airlineProfit/index.vue

@@ -20,6 +20,10 @@
                             <el-button type="warning" size="small" @click="outExport">导 出
                             </el-button>
                         </template>
+                        <template slot="menu" slot-scope="{ row, index }">
+                            <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+                                :disabled="row.status != '录入'">删 除</el-button>
+                        </template>
                     </avue-crud>
                 </el-tab-pane>
                 <el-tab-pane label="自有箱" name="second">
@@ -60,8 +64,7 @@ export default {
                 viewBtn: false,
                 editBtn: false,
                 delBtn: false,
-                menu: false,
-                columnBtn:false,
+                columnBtn: false,
                 align: 'center',
                 column: [
                     {
@@ -115,7 +118,7 @@ export default {
                 editBtn: false,
                 delBtn: false,
                 menu: false,
-                columnBtn:false,
+                columnBtn: false,
                 align: 'center',
                 column: [
                     {
@@ -182,7 +185,7 @@ export default {
                 editBtn: false,
                 delBtn: false,
                 menu: false,
-                columnBtn:false,
+                columnBtn: false,
                 align: 'center',
                 column: [
                     {
@@ -240,7 +243,7 @@ export default {
             optionBack: {
                 height: 'auto',
                 calcHeight: 30,
-                menuWidth: 140,
+                menuWidth: 80,
                 tip: false,
                 searchShow: true,
                 searchMenuSpan: 12,
@@ -254,6 +257,35 @@ export default {
                 searchIcon: true,
                 align: 'center',
                 searchIndex: 3,
+                summaryText: "合计",
+                showSummary: true,
+                sumColumnList: [
+                    {
+                        name: 'ownBoxStock',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'reachPod',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'boxTotal',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'boxNumberOwnBox',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'profit',
+                        type: 'sum',
+                        decimals: 2
+                    }
+                ],
                 column: [
                     {
                         label: "箱型",
@@ -271,7 +303,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bports/list",
+                        dicUrl: "/api/blade-los/bports/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -306,7 +338,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bports/list",
+                        dicUrl: "/api/blade-los/bports/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -357,7 +389,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/blines/list",
+                        dicUrl: "/api/blade-los/blines/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -374,7 +406,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bcorps/list?corpTypeName=船公司",
+                        dicUrl: "/api/blade-los/bcorps/list?corpTypeName=船公司&cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -391,7 +423,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bvessels/list",
+                        dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',

File diff suppressed because it is too large
+ 1182 - 32
src/views/iosBasicData/costcenter/coc/detailsPage.vue


+ 118 - 279
src/views/iosBasicData/costcenter/coc/index.vue

@@ -7,14 +7,18 @@
                 @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
                 @resetColumn="resetColumn('crud', 'option', 'optionBack', 446)"
                 @saveColumn="saveColumn('crud', 'option', 'optionBack', 446)" @on-load="onLoad">
-                <tempalte slot="operatorNameSearch">
-                    <dic-select v-model="query.operatorName" placeholder="操作员" key="id" label="realName"
-                    res="records" url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"></dic-select>
-                </tempalte>
+                <template slot="sortSearch">
+                    <el-radio-group v-model="query.sort">
+                        <el-radio :label="0">按箱利润</el-radio>
+                        <el-radio :label="1">按起运港</el-radio>
+                        <el-radio :label="2">按目的港</el-radio>
+                    </el-radio-group>
+                </template>
                 <template slot="menuLeft">
                     <el-button type="primary" size="small" icon="el-icon-plus" @click="addButton">新 增
                     </el-button>
-                    <el-button type="success" size="small" :disabled="selectionList.length != 1" @click="copyButton">复制订单
+                    <el-button type="success" size="small" :disabled="selectionList.length != 1"
+                        @click="copyButton">复制订单
                     </el-button>
                     <el-button type="warning" size="small" @click="outExport">导 出
                     </el-button>
@@ -22,19 +26,19 @@
                 <template slot="menu" slot-scope="{ row, index }">
                     <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
                     <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
-                        :disabled="row.orderStatus != '录入'">删 除</el-button>
+                        :disabled="row.status != '录入'">删 除</el-button>
                 </template>
-                <template slot="contractNo" slot-scope="{ row }">
-                    <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.contractNo }}</span>
+                <template slot="businessNo" slot-scope="{ row }">
+                    <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.businessNo }}</span>
                 </template>
             </avue-crud>
         </basic-container>
         <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
     </div>
 </template>
-  
+
 <script>
-import { getList, remove } from "@/api/tradeAgency/tradeAgency";
+import { getList, remove } from "@/api/iosBasicData/costcenter/coc";
 import { getWorkDicts } from "@/api/system/dictbiz";
 import detailsPage from "./detailsPage";
 import { getToken } from "@/util/auth";
@@ -45,8 +49,8 @@ export default {
             isShow: true,
             form: {},
             query: {
-                checkbox: [],
-                businessType: 'MYDL',
+                businessType: 'COC',
+                sort:0,
             },
             loading: false,
             page: {
@@ -62,7 +66,7 @@ export default {
                 menuWidth: 140,
                 tip: false,
                 searchShow: true,
-                searchMenuSpan: 6,
+                searchMenuSpan: 12,
                 border: true,
                 index: true,
                 addBtn: false,
@@ -75,376 +79,209 @@ export default {
                 searchIndex: 3,
                 column: [
                     {
-                        label: "客户名称",
-                        prop: "corpId",
+                        label: "系统号",
+                        prop: "businessNo",
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
+                        label: "起运港",
+                        prop: "podCname",
+                        width: "100",
                         overHidden: true,
                         search: true,
+                        searchOrder: 1,
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
+                        dicUrl: "/api/blade-los/bports/list",
                         props: {
                             label: 'cnName',
-                            value: 'id',
+                            value: 'cnName',
                             res: 'data.records'
                         },
-                        hide: true,
-                        showColumn: false,
-                        searchOrder: 1,
-                    },
-                    {
-                        label: "客户名称",
-                        prop: "corpName",
-                        width: "120",
-                        overHidden: true,
                     },
                     {
-                        label: "合同号",
-                        prop: "contractNo",
-                        width: "140",
-                        overHidden: true,
-                        search: true,
-                        searchOrder: 2,
-                    },
-                    {
-                        label: "提单号",
-                        prop: "billNo",
+                        label: "目的港",
+                        prop: "destinationCname",
                         width: "100",
                         overHidden: true,
                         search: true,
-                        searchOrder: 3,
-                    },
-                    {
-                        label: "放单方式",
-                        prop: "orderReleaseMethod",
-                        width: "120",
-                        overHidden: true,
-                    },
-                    {
-                        label: "订单号",
-                        prop: "orderNo",
-                        width: "80",
-                        overHidden: true,
-                        search: true,
-                        searchOrder: 9,
-                    },
-                    {
-                        label: "箱号",
-                        prop: "boxNo",
-                        width: "80",
-                        overHidden: true,
-                        search: true,
-                        searchOrder: 4,
-                    },
-                    {
-                        label: "订单状态",
-                        prop: "orderStatus",
-                        width: "150",
-                        overHidden: true,
-                        search: true,
-                        searchOrder: 14,
-                        type: "select",
-                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_Status",
+                        searchOrder: 2,
+                        type: 'select',
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-los/bports/list",
                         props: {
-                            label: "dictValue",
-                            value: "dictValue"
-                        }
-                    },
-                    {
-                        label: "审核状态",
-                        prop: "businessStatus",
-                        width: "100",
-                        overHidden: true,
+                            label: 'cnName',
+                            value: 'cnName',
+                            res: 'data.records'
+                        },
                     },
-                    // {
-                    //     label: "收货款",
-                    //     prop: "whetherReceivedDownPayments",
-                    //     width: "120",
-                    //     overHidden: true,
-                    // },
-                    // {
-                    //     label: "付汇",
-                    //     prop: "whetherReceivedBalancePayment",
-                    //     width: "120",
-                    //     overHidden: true,
-                    // },
                     {
-                        label: "审单状态",
-                        prop: "reviewStatus",
-                        width: "100",
+                        label: "航线",
+                        prop: "airlineCname",
+                        width: "80",
                         overHidden: true,
                         search: true,
-                        searchOrder: 15,
-                        type: "select",
-                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=audit_status",
+                        searchOrder: 3,
+                        type: 'select',
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-los/blines/list",
                         props: {
-                            label: "dictValue",
-                            value: "dictValue"
+                            label: 'cnName',
+                            value: 'cnName',
+                            res: 'data.records'
                         },
-                        hide: true,
-                        showColumn: false,
-                    },
-                    {
-                        label: '操作员',
-                        prop: 'operatorName',
-                        search: true,
-                        searchOrder: 16,
-                        overHidden: true
-                    },
-                    {
-                        label: "合同日期",
-                        prop: "contractDate",
-                        width: "120",
-                        search: true,
-                        searchOrder: 5,
-                        searchProp: "contractDateList",
-                        type: "date",
-                        unlinkPanels: true,
-                        searchRange: true,
-                        format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd HH:mm:ss",
-                        searchDefaultTime: ["00:00:00", "23:59:59"],
-                    },
-                    {
-                        label: "国家",
-                        prop: "country",
-                        width: "80",
-                        overHidden: true
                     },
                     {
-                        label: "通关进度",
-                        prop: "clearanceSpeedOfProgress",
-                        width: "120",
+                        label: "船公司",
+                        prop: "shippingCompanyCname",
+                        width: "100",
                         overHidden: true,
                         search: true,
-                        searchOrder: 11,
-                    },
-                    {
-                        label: '国外发货人',
-                        prop: "abroadConsignorId",
-                        width: "120",
-                        search: true,
+                        searchOrder: 4,
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        searchOrder: 12,
-                        dicUrl: "/api/blade-los/bcorps/listByType?corpTypeName=国外工厂&cnName={{key}}",
+                        dicUrl: "/api/blade-los/bcorps/list?corpTypeName=船公司",
                         props: {
                             label: 'cnName',
-                            value: 'id',
+                            value: 'cnName',
                             res: 'data.records'
                         },
-                        hide: true,
-                        showColumn: false,
                     },
                     {
-                        label: "国外发货人",
-                        prop: "abroadConsignorCname",
-                        width: "120",
+                        label: "船名",
+                        prop: "shipCname",
+                        width: "80",
                         overHidden: true,
-                    },
-                    {
-                        label: '国内收货人',
-                        prop: "domesticConsigneeId",
-                        width: "120",
                         search: true,
+                        searchOrder: 5,
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        searchOrder: 13,
-                        dicUrl: "/api/blade-los/bcorps/listByType?corpTypeName=国内贸易商&cnName={{key}}",
+                        dicUrl: "/api/blade-los/bvessels/list",
                         props: {
                             label: 'cnName',
-                            value: 'id',
+                            value: 'cnName',
                             res: 'data.records'
                         },
-                        hide: true,
-                        showColumn: false,
                     },
                     {
-                        label: "国内收货人",
-                        prop: "domesticConsigneeCname",
-                        width: "120",
+                        label: "航次",
+                        prop: "voyage",
+                        width: "80",
                         overHidden: true,
+                        search: true,
+                        searchOrder: 6,
                     },
                     {
-                        label: '资金方',
-                        prop: "fundingParty",
+                        label: "航线天数",
+                        prop: "navigateDay",
                         width: "100",
                         overHidden: true,
                     },
                     {
-                        label: "付汇记录",
-                        prop: "paymentRecord",
-                        width: "120",
-                        overHidden: true
-                    },
-                    {
-                        label: "运输方式",
-                        prop: "typeOfShipping",
-                        width: "120",
-                        overHidden: true
-                    },
-                    {
-                        label: "起运港",
-                        prop: "polCnName",
-                        width: "80",
-                        overHidden: true
-                    },
-                    {
-                        label: "目的港",
-                        prop: "podCnName",
+                        label: "班次",
+                        prop: "classes",
                         width: "80",
-                        overHidden: true
-                    },
-                    {
-                        label: "开船日期",
-                        prop: "etd",
-                        width: "120",
                         overHidden: true,
-                        search: true,
-                        searchOrder: 6,
-                        searchProp: "etdList",
-                        type: "date",
-                        unlinkPanels: true,
-                        searchRange: true,
-                        format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd HH:mm:ss",
-                        searchDefaultTime: ["00:00:00", "23:59:59"],
                     },
                     {
-                        label: "预计到港",
-                        prop: "estimateReachHarbor",
+                        label: "有效期启",
+                        prop: "effectiveStartDate",
                         width: "120",
                         overHidden: true,
                         search: true,
                         searchOrder: 7,
-                        searchProp: "estimateReachHarborList",
                         type: "date",
-                        unlinkPanels: true,
-                        searchRange: true,
                         format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd HH:mm:ss",
-                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                        valueFormat: "yyyy-MM-dd 00:00:00",
                     },
                     {
-                        label: "实际到港",
-                        prop: "actualReachHarbor",
+                        label: "有效期止",
+                        prop: "effectiveEndDate",
                         width: "120",
                         overHidden: true,
                         search: true,
                         searchOrder: 8,
-                        searchProp: "actualReachHarborList",
                         type: "date",
-                        unlinkPanels: true,
-                        searchRange: true,
                         format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd HH:mm:ss",
-                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                        valueFormat: "yyyy-MM-dd 23:59:59",
                     },
                     {
-                        label: "PI发票号",
-                        prop: "InvoiceNo",
-                        width: "120",
+                        label: "20利润",
+                        prop: "profit20",
+                        width: "100",
                         overHidden: true,
-                        search: true,
-                        searchOrder: 10,
-                        hide: true,
-                        showColumn: false,
-                    },
-                    {
-                        label: "币别",
-                        prop: "currency",
-                        width: "80",
-                        overHidden: true
                     },
                     {
-                        label: "付款方式",
-                        prop: "advanceRatio",
-                        width: "120",
-                        overHidden: true
-                    },
-                    {
-                        label: "预付金额(USD)",
-                        prop: "prepaidAmount",
-                        width: "120",
-                        overHidden: true
-                    },
-                    {
-                        label: "总金额(USD)",
-                        prop: "goodsValue",
+                        label: "40利润",
+                        prop: "profit40",
                         width: "100",
-                        overHidden: true
+                        overHidden: true,
                     },
                     {
-                        label: "利润",
-                        prop: "profit",
+                        label: "40HC利润",
+                        prop: "profitHc",
                         width: "100",
-                        overHidden: true
-                    },
-                    {
-                        label: "首款实收(USD)",
-                        prop: "firstPaidInPayment",
-                        width: "120",
-                        overHidden: true
-                    },
-                    {
-                        label: "尾款实收(USD)",
-                        prop: "finalPaymentReceived",
-                        width: "120",
-                        overHidden: true
+                        overHidden: true,
                     },
                     {
-                        label: '贸易方式',
-                        prop: "tradeMode",
+                        label: "其他利润",
+                        prop: "otherProfit",
                         width: "100",
-                        overHidden: true
+                        overHidden: true,
                     },
                     {
-                        label: '成交方式',
-                        prop: "transactionMethod",
+                        label: "状态",
+                        prop: "status",
                         width: "100",
                         overHidden: true
                     },
                     {
-                        label: "创建人",
+                        label: "制单人",
                         prop: "createUserName",
-                        width: "80",
-                        overHidden: true
+                        width: "100",
+                        overHidden: true,
                     },
                     {
-                        label: "创建日期",
+                        label: "制单日期",
                         prop: "createTime",
-                        width: "100",
-                        overHidden: true
+                        width: "120",
+                        overHidden: true,
                     },
                     {
                         label: "修改人",
                         prop: "updateUserName",
-                        width: "80",
+                        width: "100",
                         overHidden: true
                     },
                     {
                         label: "修改日期",
                         prop: "updateTime",
-                        width: "100",
-                        overHidden: true
+                        width: "120",
+                        overHidden: true,
                     },
                     {
                         label: "备注",
                         prop: "remarks",
-                        width: "80",
+                        width: "100",
                         overHidden: true
                     },
                     {
-                        label: "多选",
-                        prop: "checkbox",
+                        label: "排序方式",
+                        prop: "sort",
+                        width: "100",
                         overHidden: true,
-                        search: true,
-                        searchSpan: 18,
-                        searchOrder: 16,
                         hide: true,
                         showColumn: false,
+                        search: true,
+                        searchOrder: 9,
+                        searchSpan:12,
+                        searchValue:0,
                     }
                 ]
             },
@@ -479,6 +316,9 @@ export default {
         },
         // 删除
         rowDel(row, index) {
+            if (row.item == 1) {
+                return this.$message.error("存在明细不允许删除");
+            }
             this.$confirm("确定将选择数据删除?", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
@@ -560,7 +400,7 @@ export default {
                 }
             }
             const routeData = this.$router.resolve({
-                path: '/api/blade-los/agentview/export',      //跳转目标窗口的地址
+                path: '/api/blade-los/routecost/exportRouteCost',      //跳转目标窗口的地址
                 query: {
                     ...config.params,    //括号内是要传递给新窗口的参数
                     identification: this.url
@@ -611,14 +451,14 @@ export default {
 }
 
 </script>
-  
-<style scoped>
-::v-deep#out-table .back-one {
+
+<style lang="scss" scoped>
+::v-deep #out-table .back-one {
     background: #ecf5ff !important;
     text-align: center;
 }
 
-::v-deep#out-table .back-two {
+::v-deep #out-table .back-two {
     background: #ecf5ff !important;
     text-align: center;
 }
@@ -631,5 +471,4 @@ export default {
 ::v-deep .el-col-md-8 {
     width: 24.33333%;
 }
-</style>
-  
+</style>

+ 347 - 11
src/views/iosBasicData/costcenter/soc/detailsPage.vue

@@ -7,12 +7,12 @@
                 </el-button>
             </div>
             <div class="add-customer-btn">
-                <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
+                <!-- <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
                     @click="$refs.print.openDialog()">预 览
                 </el-button>
                 <el-button v-if="roleName.indexOf('admin') != -1" size="small" style="margin-right: 8px"
                     :disabled="!form.id" @click="$refs.report.openDialog()">报表设计
-                </el-button>
+                </el-button> -->
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
                     v-if="editButton"
                     :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
@@ -146,7 +146,8 @@
                             @click="allClick('一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
+                        <el-button type="danger" plain size="small"
+                            :disabled="editDisabled || selectionList.length == 0"
                             @click="allClick('批量删除')">批量删除</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="{row,index}">
@@ -206,11 +207,14 @@
                     @saveColumn="saveColumn('crud2', 'polOption', 'polOptionBack', 448)">
                     <template slot="menuLeft">
                         <el-button type="info" plain size="small" :disabled="editDisabled"
-                            @click="allClick('一键保存')">一键保存</el-button>
+                            @click="allClick('POL一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('POL一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionPolList.length == 0"
+                        <el-button type="danger" plain size="small"
+                            :disabled="editDisabled || selectionPolList.length == 0"
                             @click="allClick('POL批量删除')">批量删除</el-button>
+                        <el-button type="success" plain size="small" :disabled="editDisabled"
+                            @click="allClick('POL费用模板')">费用模板</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="{row,index}">
                         <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
@@ -287,11 +291,14 @@
                     @saveColumn="saveColumn('crud3', 'podOption', 'podOptionBack', 449)">
                     <template slot="menuLeft">
                         <el-button type="info" plain size="small" :disabled="editDisabled"
-                            @click="allClick('一键保存')">一键保存</el-button>
+                            @click="allClick('POD一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('POD一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionPodList.length == 0"
+                        <el-button type="danger" plain size="small"
+                            :disabled="editDisabled || selectionPodList.length == 0"
                             @click="allClick('POD批量删除')">批量删除</el-button>
+                        <el-button type="success" plain size="small" :disabled="editDisabled"
+                            @click="allClick('POD费用模板')">费用模板</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="{row,index}">
                         <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
@@ -368,11 +375,14 @@
                     @saveColumn="saveColumn('crud4', 'potOption', 'potOptionBack', 450)">
                     <template slot="menuLeft">
                         <el-button type="info" plain size="small" :disabled="editDisabled"
-                            @click="allClick('一键保存')">一键保存</el-button>
+                            @click="allClick('POT一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('POT一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionPotList.length == 0"
+                        <el-button type="danger" plain size="small"
+                            :disabled="editDisabled || selectionPotList.length == 0"
                             @click="allClick('POT批量删除')">批量删除</el-button>
+                        <el-button type="success" plain size="small" :disabled="editDisabled"
+                            @click="allClick('POT费用模板')">费用模板</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="{row,index}">
                         <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
@@ -452,11 +462,35 @@
             :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
             <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
         </el-dialog>
+        <el-dialog append-to-body title="费用模板" :visible.sync="templateDialog" width="60%" :before-close="handleClose">
+            <span>
+                <el-row>
+                    <el-col :span="5">
+                        <el-scrollbar>
+                            <basic-container>
+                                <avue-tree :option="treeOption" :data="templateData" @node-click="nodeClick">
+                                </avue-tree>
+                            </basic-container>
+                        </el-scrollbar>
+                    </el-col>
+                    <el-col :span="19">
+                        <avue-crud :data="templateList" :option="templateOption"
+                            @selection-change="templateChange"></avue-crud>
+                    </el-col>
+                </el-row>
+            </span>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="templateDialog = false" size="mini">取 消</el-button>
+                <el-button type="primary" @click="importTemplate" size="mini">导 入</el-button>
+            </span>
+        </el-dialog>
     </div>
 </template>
 
 <script>
-import { submit, getDetail, removeItem, feeRemove, checkAgent, revokeCheckAgent, copyAgent } from "@/api/iosBasicData/costcenter/soc";
+import { submit, submitItemList, submitFeeList, getDetail, removeItem, feeRemove, checkAgent, revokeCheckAgent, copyAgent } from "@/api/iosBasicData/costcenter/soc";
+import { losbfeestemplateGetListTemplate } from "@/api/iosBasicData/bills";
+import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
 import businessReports from "@/components/tradeAgency/businessReports.vue";
@@ -465,10 +499,62 @@ import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
 import { getDicinit } from "@/api/dicSelect/index";
 import { dateFormat } from "@/util/date";
 import _ from "lodash";
+import { Header } from "element-ui";
 export default {
     name: "detailsPage",
     data() {
         return {
+            selectionTemplateList: [],
+            feeType: null,
+            treeOption: {
+                nodeKey: "id",
+                // lazy: true,
+                addBtn: false,
+                menu: false,
+                size: "small",
+                props: {
+                    labelText: "标题",
+                    label: "cnName",
+                    value: "value",
+                    children: "children"
+                }
+            },
+            templateData: [],
+            templateList: [],
+            templateOption: {
+                height: 500,
+                menu: false,
+                addBtn: false,
+                editBtn: false,
+                delBtn: false,
+                viewBtn: false,
+                header: false,
+                index: true,
+                selection: true,
+                column: [
+                    {
+                        label: '费用',
+                        prop: 'feeCnName',
+                        overHidden: true,
+                    },
+                    {
+                        label: '成本价',
+                        prop: 'price',
+                        overHidden: true,
+                    },
+                    {
+                        label: '币别',
+                        prop: 'curCode',
+                        overHidden: true,
+                    },
+                    {
+                        label: '汇率',
+                        prop: 'curCode',
+                        overHidden: true,
+                    }
+                ]
+            },
+            templateDialog: false,
             selectionList: [],
             selectionPolList: [],
             selectionPodList: [],
@@ -1798,6 +1884,7 @@ export default {
                 return this.$message.error("请保存数据");
             }
             this.form.costItemList.push({
+                pid: this.form.id,
                 salesPrice: 0,
                 costPrice: 0,
                 totalProfit: 0,
@@ -1812,22 +1899,28 @@ export default {
         },
         polAddRow() {
             this.polFeeList.push({
+                pid: this.form.id,
                 busType: 'POL',
                 $cellEdit: true
             })
         },
         podAddRow() {
             this.podFeeList.push({
+                pid: this.form.id,
                 busType: 'POD',
                 $cellEdit: true
             })
         },
         potAddRow() {
             this.potFeeList.push({
+                pid: this.form.id,
                 busType: 'POT',
                 $cellEdit: true
             })
         },
+        templateChange(list) {
+            this.selectionTemplateList = list;
+        },
         selectionChange(list) {
             this.selectionList = list;
         },
@@ -1960,7 +2053,27 @@ export default {
         },
         allClick(name) {
             if (name == '一键保存') {
-                this.submit()
+                if (!this.form.costItemList.length) {
+                    return this.$message.error("请添加数据");
+                }
+                for (let row of this.form.costItemList) {
+                    if (!row.boxType || !row.curCode || !row.salesPrice) {
+                        this.$refs.crud.rowCell(row, row.$index)
+                        return this.$message.error("请完善明细信息");
+                    }
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                submitItemList(this.form.costItemList).then(res => {
+                    this.$message.success("保存成功");
+                    this.form.costItemList = res.data.data
+                }).finally(() => {
+                    loading.close();
+                })
             }
             if (name == '一键编辑') {
                 for (let row of this.form.costItemList) {
@@ -2003,6 +2116,29 @@ export default {
                     }
                 })
             }
+            if (name == 'POL一键保存') {
+                if (!this.polFeeList.length) {
+                    return this.$message.error("请添加数据");
+                }
+                for (let row of this.polFeeList) {
+                    if (!row.type || !row.boxType || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        this.$refs.crud2.rowCell(row, row.$index)
+                        return this.$message.error("请完善POL杂费明细");
+                    }
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                submitFeeList(this.polFeeList).then(res => {
+                    this.$message.success("保存成功");
+                    this.polFeeList = res.data.data
+                }).finally(() => {
+                    loading.close();
+                })
+            }
             if (name == 'POL一键编辑') {
                 for (let row of this.polFeeList) {
                     this.$set(row, "$cellEdit", true);
@@ -2044,6 +2180,29 @@ export default {
                     }
                 })
             }
+            if (name == 'POD一键保存') {
+                if (!this.podFeeList.length) {
+                    return this.$message.error("请添加数据");
+                }
+                for (let row of this.podFeeList) {
+                    if (!row.type || !row.boxType || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        this.$refs.crud3.rowCell(row, row.$index)
+                        return this.$message.error("请完善POL杂费明细");
+                    }
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                submitFeeList(this.podFeeList).then(res => {
+                    this.$message.success("保存成功");
+                    this.podFeeList = res.data.data
+                }).finally(() => {
+                    loading.close();
+                })
+            }
             if (name == 'POD一键编辑') {
                 for (let row of this.podFeeList) {
                     this.$set(row, "$cellEdit", true);
@@ -2085,6 +2244,29 @@ export default {
                     }
                 })
             }
+            if (name == 'POT一键保存') {
+                if (!this.potFeeList.length) {
+                    return this.$message.error("请添加数据");
+                }
+                for (let row of this.potFeeList) {
+                    if (!row.type || !row.boxType || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        this.$refs.crud4.rowCell(row, row.$index)
+                        return this.$message.error("请完善POL杂费明细");
+                    }
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                submitFeeList(this.potFeeList).then(res => {
+                    this.$message.success("保存成功");
+                    this.potFeeList = res.data.data
+                }).finally(() => {
+                    loading.close();
+                })
+            }
             if (name == 'POT一键编辑') {
                 for (let row of this.potFeeList) {
                     this.$set(row, "$cellEdit", true);
@@ -2126,6 +2308,160 @@ export default {
                     }
                 })
             }
+            if (name == 'POL费用模板') {
+                this.templateData=[]
+                this.templateList=[]
+                this.feeType = 'POL'
+                this.templateDialog = true
+                let obj = {
+                    status: 0,
+                    type: 'SOC',
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                losbfeestemplateGetListTemplate(1, 50, obj).then(res => {
+                    this.templateData = res.data.data.records
+                    if (res.data.data.records.length) {
+                        losbfeestemplateDetail(res.data.data.records[0].id).then(res => {
+                            this.templateList = res.data.data.feesTemplateItemsList
+                        })
+                    }
+
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+            if (name == 'POD费用模板') {
+                this.templateData=[]
+                this.templateList=[]
+                this.feeType = 'POD'
+                this.templateDialog = true
+                let obj = {
+                    status: 0,
+                    type: 'SOC',
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                losbfeestemplateGetListTemplate(1, 50, obj).then(res => {
+                    this.templateData = res.data.data.records
+                    if (res.data.data.records.length) {
+                        losbfeestemplateDetail(res.data.data.records[0].id).then(res => {
+                            this.templateList = res.data.data.feesTemplateItemsList
+                        })
+                    }
+
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+            if (name == 'POT费用模板') {
+                this.templateData=[]
+                this.templateList=[]
+                this.feeType = 'POT'
+                this.templateDialog = true
+                let obj = {
+                    status: 0,
+                    type: 'SOC',
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                losbfeestemplateGetListTemplate(1, 50, obj).then(res => {
+                    this.templateData = res.data.data.records
+                    if (res.data.data.records.length) {
+                        losbfeestemplateDetail(res.data.data.records[0].id).then(res => {
+                            this.templateList = res.data.data.feesTemplateItemsList
+                        })
+                    }
+
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+        },
+        importTemplate() {
+            if (!this.selectionTemplateList.length) {
+                return this.$message.error("请选择模板");
+            }
+            this.selectionTemplateList.forEach(e => {
+                if (this.feeType == 'POL') {
+                    bcurrencyGetExrate({ date: this.form.exrateDate, dc: 'D' }).then(res => {
+                        res.data.data.forEach(item => {
+                            if (e.curCode == item.code) {
+                                this.polFeeList.push({
+                                    pid: this.form.id,
+                                    busType: 'POL',
+                                    feeName: e.feeCnName,
+                                    feeCode: e.feeCode,
+                                    feeId: e.feeId,
+                                    costPrice: e.price,
+                                    curCode: e.curCode,
+                                    exrate: item.exrate,
+                                    $cellEdit: true
+                                })
+                            }
+                        })
+                    })
+                }
+                if (this.feeType == 'POD') {
+                    bcurrencyGetExrate({ date: this.form.exrateDate, dc: 'D' }).then(res => {
+                        res.data.data.forEach(item => {
+                            if (e.curCode == item.code) {
+                                this.podFeeList.push({
+                                    pid: this.form.id,
+                                    busType: 'POD',
+                                    feeName: e.feeCnName,
+                                    feeCode: e.feeCode,
+                                    feeId: e.feeId,
+                                    costPrice: e.price,
+                                    curCode: e.curCode,
+                                    exrate: item.exrate,
+                                    $cellEdit: true
+                                })
+                            }
+                        })
+                    })
+
+                }
+                if (this.feeType == 'POT') {
+                    bcurrencyGetExrate({ date: this.form.exrateDate, dc: 'D' }).then(res => {
+                        res.data.data.forEach(item => {
+                            if (e.curCode == item.code) {
+                                this.potFeeList.push({
+                                    pid: this.form.id,
+                                    busType: 'POT',
+                                    feeName: e.feeCnName,
+                                    feeCode: e.feeCode,
+                                    feeId: e.feeId,
+                                    costPrice: e.price,
+                                    curCode: e.curCode,
+                                    exrate: item.exrate,
+                                    $cellEdit: true
+                                })
+                            }
+                        })
+                    })
+
+                }
+            })
+            this.templateDialog = false
+        },
+        // 左侧选择
+        nodeClick(e) {
+            losbfeestemplateDetail(e.id).then(res => {
+                this.templateList = res.data.data.feesTemplateItemsList
+            })
         },
         submit(type) {
             this.$refs["form"].validate((valid, done) => {

+ 32 - 8
src/views/iosBasicData/costcenter/soc/index.vue

@@ -50,7 +50,7 @@ export default {
             form: {},
             query: {
                 businessType: 'SOC',
-                sort:0,
+                sort: 0,
             },
             loading: false,
             page: {
@@ -77,6 +77,30 @@ export default {
                 searchIcon: true,
                 align: 'center',
                 searchIndex: 3,
+                summaryText: "合计",
+                showSummary: true,
+                sumColumnList: [
+                    {
+                        name: 'profit20',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'profit40',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'profitHc',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'otherProfit',
+                        type: 'sum',
+                        decimals: 2
+                    }
+                ],
                 column: [
                     {
                         label: "系统号",
@@ -94,7 +118,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bports/list",
+                        dicUrl: "/api/blade-los/bports/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -111,7 +135,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bports/list",
+                        dicUrl: "/api/blade-los/bports/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -128,7 +152,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/blines/list",
+                        dicUrl: "/api/blade-los/blines/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -145,7 +169,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bcorps/list?corpTypeName=船公司",
+                        dicUrl: "/api/blade-los/bcorps/list?corpTypeName=船公司&cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -162,7 +186,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bvessels/list",
+                        dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -280,8 +304,8 @@ export default {
                         showColumn: false,
                         search: true,
                         searchOrder: 9,
-                        searchSpan:12,
-                        searchValue:0,
+                        searchSpan: 12,
+                        searchValue: 0,
                     }
                 ]
             },

+ 1 - 1
src/views/system/dept.vue

@@ -373,7 +373,7 @@
           //     })
           // }
           // 判断是否显示装货港
-          if (localStorage.getItem('sysitemType') == 12) {
+          if (localStorage.getItem('sysitemType') == 12||localStorage.getItem('sysitemType') == 13) {
               this.$nextTick(()=>{
                   this.findObject(this.option.column, "polCnName").hide = false
                   this.findObject(this.option.column, "polCnName").addDisplay = true

Some files were not shown because too many files changed in this diff