Browse Source

修改bug

Qukatie 1 year ago
parent
commit
6277160827

+ 38 - 0
src/api/iosBasicData/storageFee.js

@@ -0,0 +1,38 @@
+import request from '@/router/axios';
+//贸易代理列表
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-los/storagefee/list',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size
+        }
+    })
+}
+//贸易代理明细
+export const getDetail = (data) => {
+    return request({
+        url: '/api/blade-los/storagefee/detail',
+        method: 'get',
+        params: data
+    })
+}
+
+//贸易代理保存
+export const submit = (data) => {
+    return request({
+        url: '/api/blade-los/storagefee/submit',
+        method: 'post',
+        data: data
+    })
+}
+//贸易代理删除
+export const remove = (data) => {
+  return request({
+      url: '/api/blade-los/storagefee/remove',
+      method: 'post',
+      params: data
+  })
+}

+ 50 - 0
src/api/iosBasicData/warehouse.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getBtrademodesList = (current, size, params) => {
+  return request({
+    url: '/api/blade-los/storage/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getBtrademodesDetail = (id) => {
+  return request({
+    url: '/api/blade-los/storage/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const removeBtrademodes = (ids) => {
+  return request({
+    url: '/api/blade-los/storage/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const addBtrademodes = (row) => {
+  return request({
+    url: '/api/blade-los/storage/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const updateBtrademodes = (row) => {
+  return request({
+    url: '/api/blade-los/storage/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 9 - 1
src/api/tradeAgency/oceanFreightImport.js

@@ -189,4 +189,12 @@ export const inoutstorageRemove= (data) => {
         method: 'post',
         params: data
     })
-}
+}
+//用提单号查详情
+export const detailTradeByMblno= (data) => {
+    return request({
+        url: '/api/blade-los/tradebills/detailTradeByMblno',
+        method: 'get',
+        params: data
+    })
+}

+ 10 - 2
src/api/tradeAgency/tradeAgency.js

@@ -45,9 +45,9 @@ export const generateBalancePaymentBill = (data) => {
     })
 }
 //申请付款
-export const ApplyForPayment = (data) => {
+export const generatePayment = (data) => {
     return request({
-        url: '/api/blade-los/agent/ApplyForPayment',
+        url: '/api/blade-los/agent/generatePayment',
         method: 'post',
         data: data
     })
@@ -141,4 +141,12 @@ export const generateFreightForwarder = (data) => {
         method: 'post',
         data: data
     })
+}
+//生成尾款费用应收-列表
+export const balancePayment = (data) => {
+    return request({
+        url: '/api/blade-los/agent/balancePayment',
+        method: 'post',
+        data: data
+    })
 }

+ 2 - 2
src/components/tradeAgency/fee-info.vue

@@ -72,7 +72,7 @@
                 <span v-else>{{ row.exrate }}</span>
             </tempalte>
             <tempalte slot="stlExrate" slot-scope="{ row }">
-                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" @change="countChange(row)" :controls="false"
+                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" :controls="false"
                     placeholder="请输入 结算汇率" size="small" style="width: 100%;"></el-input-number>
                 <span v-else>{{ row.stlExrate }}</span>
             </tempalte>
@@ -150,7 +150,7 @@
                 <span v-else>{{ row.exrate }}</span>
             </tempalte>
             <tempalte slot="stlExrate" slot-scope="{ row }">
-                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" @change="countChange(row)" :controls="false"
+                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" :controls="false"
                     placeholder="请输入 结算汇率" size="small" style="width: 100%;"></el-input-number>
                 <span v-else>{{ row.stlExrate }}</span>
             </tempalte>

+ 1 - 1
src/components/tradeAgency/fee-infosimple.vue

@@ -56,7 +56,7 @@
                 <span v-else>{{ row.exrate }}</span>
             </tempalte>
             <tempalte slot="stlExrate" slot-scope="{ row }">
-                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" @change="countChange(row)" :controls="false"
+                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" :controls="false"
                     placeholder="请输入 结算汇率" size="small" style="width: 100%;"></el-input-number>
                 <span v-else>{{ row.stlExrate }}</span>
             </tempalte>

+ 2 - 2
src/components/tradeAgency/fee-oceanFreight.vue

@@ -72,7 +72,7 @@
                 <span v-else>{{ row.exrate }}</span>
             </tempalte>
             <tempalte slot="stlExrate" slot-scope="{ row }">
-                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" @change="countChange(row)" :controls="false"
+                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" :controls="false"
                     placeholder="请输入 结算汇率" size="small" style="width: 100%;"></el-input-number>
                 <span v-else>{{ row.stlExrate }}</span>
             </tempalte>
@@ -150,7 +150,7 @@
                 <span v-else>{{ row.exrate }}</span>
             </tempalte>
             <tempalte slot="stlExrate" slot-scope="{ row }">
-                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" @change="countChange(row)" :controls="false"
+                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" :controls="false"
                     placeholder="请输入 结算汇率" size="small" style="width: 100%;"></el-input-number>
                 <span v-else>{{ row.stlExrate }}</span>
             </tempalte>

+ 9 - 0
src/enums/column-name.js

@@ -1805,6 +1805,15 @@ const columnName = [{
   },{
     code: 393,
     name: '贸易代理-海运进口-应付费用明细'
+  },{
+    code: 394,
+    name: '基础资料(F)-仓库管理(T)'
+  },{
+    code: 395,
+    name: '基础资料(F)-仓储费管理(T)'
+  },{
+    code: 396,
+    name: '基础资料(F)-仓储费管理(T)-明细'
   }
 ]
 export const getColumnName = (key) => {

+ 3 - 0
src/page/index/tags.vue

@@ -469,6 +469,9 @@ export default {
         if (tag.label == "明细账(F)") {
           this.$store.commit("OUT_SUBLED_DETAIL")
         }
+        if (tag.label == "海运进口(T)") {
+          this.$store.commit("OUT_OCEANFS_DETAIL")
+        }
         this.$store.commit("DEL_TAG", tag);
         if (tag.value === this.tag.value) {
           tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个

+ 1 - 1
src/router/views/index.js

@@ -3633,7 +3633,7 @@ export default [{
   hidden: true,
   children: [{
     path: '/tradeAgency/oceanFreightImport/index',
-    name: '海运进口',
+    name: '海运进口(T)',
     meta: {
       i18n: '/tradeAgency/oceanFreightImport/index',
       keepAlive: true,

+ 1 - 0
src/store/getters.js

@@ -88,5 +88,6 @@ const getters = {
   finOutStatus:state => state.ifdetail.finOutStatus,//货代海运出口seamend
   voucherStatus:state => state.ifdetail.voucherStatus,//财务凭证
   subLedgerStatus:state => state.ifdetail.subLedgerStatus,//明细账
+  oceanFreightStatus:state => state.ifdetail.oceanFreightStatus//海运进口(T)
 }
 export default getters

+ 12 - 0
src/store/modules/ifdetail.js

@@ -65,9 +65,18 @@ const ifdetail = {
     finOutStatus: false,
     voucherStatus: false,//财务凭证(F)
     subLedgerStatus: false,//明细账(F)
+    oceanFreightStatus: false,//海运进口(T)
   },
   actions: {},
   mutations: {
+    //开启海运进口(T)
+    IN_OCEANFS_DETAIL(state) {
+      state.oceanFreightStatus = true
+    },
+    //关闭海运进口(T)(F)
+    OUT_OCEANFS_DETAIL(state) {
+      state.oceanFreightStatus = false
+    },
     //开启财务凭证
     IN_VOUCHER_DETAIL(state) {
       state.voucherStatus = true
@@ -715,6 +724,9 @@ const ifdetail = {
       if (tag.label == 'SIAMEND') {
         state.OFIStatus = true
       }
+      if (tag.label == '海运进口(T)') {
+        state.oceanFreightStatus = true
+      }
     }
   }
 

+ 336 - 0
src/views/iosBasicData/storageFee/detailsPage.vue

@@ -0,0 +1,336 @@
+<template>
+    <div>
+        <div class="customer-head">
+            <div class="customer-back">
+                <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                    @click="goBack(0)">返回列表
+                </el-button>
+            </div>
+            <div class="add-customer-btn">
+                <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
+                    @click="submit">保 存
+                </el-button>
+            </div>
+        </div>
+        <div style="margin-top: 50px">
+            <trade-card title="基础信息">
+                <avue-form :option="optionForm" v-model="form" ref="form">
+                    <tempalte slot="corpName" slot-scope="{ row }">
+                        <dic-select v-model="form.corpName" placeholder="客户" key="id" label="cnName" res="records"
+                            url="/blade-los/bcorps/listByType" :filterable="true" :remote="true" dataName="cnName"
+                            @selectChange="dicChange('corpName', $event)"></dic-select>
+                    </tempalte>
+                    <tempalte slot="warehouseName" slot-scope="{ row }">
+                        <dic-select v-model="form.warehouseName" placeholder="仓库" key="id" label="cname" res="records"
+                            url="/blade-los/storage/list" :filterable="true" :remote="true" dataName="cname"
+                            @selectChange="dicChange('warehouseName', $event)"></dic-select>
+                    </tempalte>
+                    <tempalte slot="goodsType" slot-scope="{ row }">
+                        <dic-select v-model="form.goodsType" placeholder="商品类型" key="dictKey" label="dictValue"
+                            url="/blade-system/dict-biz/dictionary?code=goods-type" :filterable="true"></dic-select>
+                    </tempalte>
+                </avue-form>
+            </trade-card>
+            <trade-card title="仓储明细">
+                <avue-crud :option="option" :data="form.storageFeeItemsList" id="out-table" ref="crud"
+                    @selection-change="selectionChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 396)"
+                    @saveColumn="saveColumn('crud', 'option', 'optionBack', 396)">
+                    <template slot="menuLeft">
+                        <el-button type="primary" size="small" icon="el-icon-plus" @click="addRow">新 增
+                        </el-button>
+                    </template>
+                    <template slot="feeName" slot-scope="{ row }">
+                        <dic-select v-if="row.$cellEdit" v-model="row.feeName" placeholder="费用信息" key="id" res="records"
+                            label="cnName" url="/blade-los/bfees/list" :filterable="true" :remote="true" fff
+                            dataName="cnName" @selectChange="rowDicChange('feeName', $event, row)"></dic-select>
+                        <span v-else>{{ row.feeName }}</span>
+                    </template>
+                </avue-crud>
+            </trade-card>
+        </div>
+    </div>
+</template>
+
+<script>
+import { submit, getDetail } from "@/api/iosBasicData/storageFee";
+import dicSelect from "@/components/dicSelect/main";
+import { bfeesList } from "@/api/iosBasicData/bfees";
+import _ from "lodash";
+export default {
+    name: "detailsPage",
+
+    data() {
+        return {
+            form: {
+                status:'0',
+                storageFeeItemsList: []
+            },
+            optionForm: {
+                menuBtn: false,
+                span: 8,
+                column: [
+                    {
+                        label: '客户',
+                        prop: "corpName",
+                        disabled: false,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },
+                    {
+                        label: "仓库名称",
+                        prop: "warehouseName",
+                    },
+                    {
+                        label: "商品类别",
+                        prop: "goodsType",
+                    },
+                    {
+                        label: "有效期起",
+                        prop: "beginDate",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd 00:00:00",
+                    },
+                    {
+                        label: "有效期至",
+                        prop: "endDate",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd 23:59:59"
+                    },
+                    {
+                        label: "状态",
+                        prop: "status",
+                        type: "select",
+                        dicData: [{
+                            label: '启用',
+                            value: '0'
+                        }, {
+                            label: '停用',
+                            value: '1'
+                        }],
+                    },
+                    {
+                        label: '备注',
+                        prop: "remarks",
+                        type: 'textarea',
+                        disabled: false,
+                        minRows: 2,
+                    },
+                ]
+            },
+            option: {},
+            optionBack: {
+                height: 'auto',
+                calcHeight: 30,
+                menuWidth: 140,
+                border: true,
+                index: true,
+                addBtn: false,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                menu: false,
+                refreshBtn: false,
+                align: 'center',
+                column: [
+                    {
+                        label: "费用名称",
+                        prop: "feeName",
+                        overHidden: true
+                    },
+                    {
+                        label: "计价单位",
+                        prop: "feeUnit",
+                        cell: true,
+                        type: 'select',
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-los/bunits/list",
+                        props: {
+                            label: 'cnName',
+                            value: 'cnName',
+                            res: 'data.records'
+                        },
+                        overHidden: true
+                    },
+                    {
+                        label: "开始天数",
+                        prop: "fromDays",
+                        cell: true,
+                        type: 'number',
+                        controls: false,
+                        overHidden: true
+                    },
+                    {
+                        label: "结束天数",
+                        prop: "enDays",
+                        cell: true,
+                        type: 'number',
+                        controls: false,
+                        overHidden: true
+                    },
+                    {
+                        label: "单价",
+                        prop: "price",
+                        cell: true,
+                        type: 'number',
+                        controls: false,
+                        overHidden: true
+                    },
+                    {
+                        label: "备注",
+                        prop: "remarks",
+                        cell: true,
+                        overHidden: true
+                    }
+                ]
+            },
+        }
+    },
+    components: {
+        dicSelect,
+    },
+    props: {
+        detailData: Object
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(396), this.optionBack);
+        if (this.detailData.id) {
+            this.getDetails(this.detailData.id)
+        }
+    },
+    methods: {
+        dicChange(name, row) {
+            if (name == 'corpName') {
+                if (row) {
+                    this.form.corpId = row.id
+                } else {
+                    this.form.corpId = null
+                }
+            }
+        },
+        rowDicChange(name, row, el) {
+            if (name == 'feeName') {
+                if (row) {
+                    el.feeId = row.id
+                } else {
+                    el.feeId = null
+                }
+            }
+            if (name == 'warehouseName') {
+                if (row) {
+                    el.warehouseId = row.id
+                } else {
+                    el.warehouseId = null
+                }
+            }
+        },
+        getDetails(id) {
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            getDetail({ id: id }).then(res => {
+                this.form = res.data.data
+                this.$refs.crud.dicInit();
+            }).finally(() => {
+                loading.close()
+            })
+        },
+        addRow() {
+            if (!this.form.corpId) {
+                return this.$message.error("请选择客户名称");
+            }
+            this.$refs.crud.dicInit();
+            bfeesList(1, 10, { cnName: '仓储费' }).then(res => {
+                res.data.data.records.forEach(e => {
+                    if (e.cnName == '仓储费')
+                        this.form.storageFeeItemsList.push({
+                            feeId: e.id,
+                            feeName: e.cnName,
+                            $cellEdit: true
+                        })
+                })
+
+            })
+
+        },
+        submit() {
+            this.$refs["form"].validate((valid, done) => {
+                done();
+                if (valid) {
+                    const loading = this.$loading({
+                        lock: true,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(255,255,255,0.7)'
+                    });
+                    submit(this.form).then(res => {
+                        this.$message.success("保存成功");
+                        this.getDetails(res.data.data.id)
+                    }).finally(() => {
+                        loading.close();
+                    })
+                } else {
+                    return false;
+                }
+            });
+        },
+        //自定义列保存
+        async saveColumn(ref, option, optionBack, code) {
+            const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+            if (inSave) {
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            }
+        },
+        //自定义列重置
+        async resetColumn(ref, option, optionBack, code) {
+            this[option] = this[optionBack];
+            const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+            if (inSave) {
+                this.$message.success("重置成功");
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            }
+        },
+        goBack(type) {
+            this.$emit("goBack", type);
+            this.$emit('updateKey')
+        },
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-form-item {
+    margin-bottom: 8px !important;
+}
+
+::v-deep .el-table .cell {
+    padding: 0 2px !important;
+
+    .el-form-item {
+        margin-bottom: 0px !important;
+    }
+
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+    left: -1px;
+}
+
+::v-deep#out-table .back-one {
+    background: #ecf5ff !important;
+}
+
+::v-deep#out-table .back-two {
+    background: #ecf5ff !important;
+}
+</style>

+ 304 - 0
src/views/iosBasicData/storageFee/index.vue

@@ -0,0 +1,304 @@
+<template>
+    <div>
+        <basic-container v-if="isShow">
+            <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :search.sync="query"
+                v-model="form" id="out-table" :header-cell-class-name="headerClassName" ref="crud" @row-del="rowDel"
+                @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+                @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
+                @resetColumn="resetColumn('crud', 'option', 'optionBack', 395)"
+                @saveColumn="saveColumn('crud', 'option', 'optionBack', 395)" @on-load="onLoad">
+                <template slot="menuLeft">
+                    <el-button type="primary" size="small" icon="el-icon-plus" @click="addButton">新 增
+                    </el-button>
+                </template>
+                <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)">删除</el-button>
+                </template>
+                <template slot="contractNo" slot-scope="{ row }">
+                    <span style="color: #1e9fff" @click="rowEdit(row)">{{ row.contractNo }}</span>
+                </template>
+            </avue-crud>
+        </basic-container>
+        <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
+    </div>
+</template>
+  
+<script>
+import { getList, remove } from "@/api/iosBasicData/storageFee";
+import detailsPage from "./detailsPage";
+
+export default {
+    data() {
+        return {
+            detailData: {},
+            isShow: true,
+            form: {},
+            query: {},
+            loading: false,
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0
+            },
+            selectionList: [],
+            option: {},
+            optionBack: {
+                height: 'auto',
+                calcHeight: 30,
+                menuWidth: 120,
+                searchShow: true,
+                searchMenuSpan: 12,
+                border: true,
+                index: true,
+                addBtn: false,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                searchIcon: true,
+                searchIndex: 3,
+                column: [
+                    {
+                        label: "客户名称",
+                        prop: "corpName",
+                        width: "200",
+                        overHidden: true,
+                        search: true,
+                        type: 'select',
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
+                        props: {
+                            label: 'cnName',
+                            value: 'cnName',
+                            res: 'data.records'
+                        },
+                        searchOrder: 1,
+                    },
+                    {
+                        label: "仓库名称",
+                        prop: "warehouseName",
+                        width: "200",
+                        overHidden: true,
+                        search: true,
+                        type: 'select',
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-los/storage/list?cname={{key}}",
+                        props: {
+                            label: 'cname',
+                            value: 'cname',
+                            res: 'data.records'
+                        },
+                        searchOrder: 2,
+                    },
+                    {
+                        label: "商品类别",
+                        prop: "goodsType",
+                        width: "200",
+                        overHidden: true,
+                    },
+                    {
+                        label: "有效期起",
+                        prop: "beginDate",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd 00:00:00",
+                        width: "200",
+                        overHidden: true
+                    },
+                    {
+                        label: "有效期至",
+                        prop: "endDate",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd 23:59:59",
+                        width: "200",
+                        overHidden: true
+                    },
+                    {
+                        label: "状态",
+                        prop: "status",
+                        width: "160",
+                        type: "select",
+                        dicData: [{
+                            label: '启用',
+                            value: '0'
+                        }, {
+                            label: '停用',
+                            value: '1'
+                        }],
+                        overHidden: true
+                    },
+                    {
+                        label: "备注",
+                        prop: "remarks",
+                        overHidden: true
+                    }
+                ]
+            },
+            data: [],
+        };
+    },
+    components: {
+        detailsPage,
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(395), this.optionBack);
+    },
+    methods: {
+        addButton() {
+            this.isShow = false
+        },
+        rowEdit(row) {
+            this.detailData = {
+                id: row.id
+            };
+            this.isShow = false
+        },
+        rowDel(row) {
+            if (row.status == 1) {
+                this.$confirm("确定将选择数据删除?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                })
+                    .then(() => {
+                        return remove({ ids: row.id }).then(() => {
+                            this.onLoad(this.page);
+                            this.$message({
+                                type: "success",
+                                message: "删除成功!"
+                            });
+                        });
+                    })
+
+            } else {
+                this.$message({
+                    message: '非禁用状态无法删除',
+                    type: 'warning'
+                });
+            }
+        },
+        // 编辑
+        inEdit(row) {
+        },
+        searchReset() {
+            this.query = this.$options.data().query;
+            this.onLoad(this.page);
+        },
+        // 搜索按钮点击
+        searchChange(params, done) {
+            this.page.currentPage = 1;
+            this.onLoad(this.page, this.query);
+            done();
+        },
+        selectionChange(list) {
+            this.selectionList = list;
+        },
+        currentChange(currentPage) {
+            this.page.currentPage = currentPage;
+        },
+        sizeChange(pageSize) {
+            this.page.pageSize = pageSize;
+        },
+        refreshChange() {
+            this.onLoad(this.page, this.query);
+        },
+        onLoad(page, params = {}) {
+            let obj = {}
+            obj = {
+                ...Object.assign(params, this.query),
+            }
+            console.log(obj)
+            this.loading = true;
+            getList(page.currentPage, page.pageSize, obj).then(res => {
+                this.data = res.data.data.records;
+                this.page.total = res.data.data.total;
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                    this.$refs.crud.dicInit();
+                });
+            }).finally(() => {
+                this.loading = false;
+            })
+
+        },
+        // 详情的返回列表
+        goBack() {
+            // 初始化数据
+            // if (JSON.stringify(this.$route.query) != "{}") {
+            //     this.$router.$avueRouter.closeTag();
+            //     this.$router.push({
+            //         path: "/iosBasicData/accounts/index"
+            //     });
+            // }
+            this.detailData = {}
+            this.isShow = true;
+            this.onLoad(this.page, this.search);
+        },
+        //自定义列保存
+        async saveColumn(ref, option, optionBack, code) {
+            /**
+             * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+             * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+             * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+             */
+            const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+            if (inSave) {
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+                this.searchReset()
+            }
+        },
+        //自定义列重置
+        async resetColumn(ref, option, optionBack, code) {
+            this[option] = this[optionBack];
+            const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+            if (inSave) {
+                this.$message.success("重置成功");
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+                this.searchReset()
+            }
+        },
+        // 更改表格颜色
+        headerClassName(tab) {
+            //颜色间隔
+            let back = ""
+            if (tab.columnIndex >= 0 && tab.column.level === 1) {
+                if (tab.columnIndex % 2 === 0) {
+                    back = "back-one"
+                } else if (tab.columnIndex % 2 === 1) {
+                    back = "back-two"
+                }
+            }
+            return back;
+        },
+
+    }
+}
+
+</script>
+  
+<style scoped>
+::v-deep#out-table .back-one {
+    background: #ecf5ff !important;
+    text-align: center;
+}
+
+::v-deep#out-table .back-two {
+    background: #ecf5ff !important;
+    text-align: center;
+}
+
+.pointerClick {
+    cursor: pointer;
+    color: #1e9fff;
+}
+
+::v-deep .el-col-md-8 {
+    width: 24.33333%;
+}
+</style>
+  

+ 499 - 0
src/views/iosBasicData/warehouse/index.vue

@@ -0,0 +1,499 @@
+<!-- 贸易条款 -->
+<template>
+    <basic-container>
+      <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+        id="out-table" :header-cell-class-name="headerClassName" :before-open="beforeOpen" :search.sync="search"
+        v-model="form" ref="crud" @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"
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 394)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 394)" @on-load="onLoad">
+        <template slot="menuLeft">
+          <el-button type="primary" size="small" icon="el-icon-plus" @click="addbtnfun()">新建仓库
+          </el-button>
+          <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
+          </el-button>
+          <!-- <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+          </el-button>
+          <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button> -->
+        </template>
+        <template slot-scope="scope" slot="menu">
+          <!--<el-button type="text" icon="el-icon-view" size="small" @click.stop="rowViewfun(scope.row, scope.index)">查看-->
+          <!--</el-button>-->
+          <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowEditfun(scope.row, scope.index)">编辑
+          </el-button>
+          <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowDel(scope.row, scope.index)">删除
+          </el-button>
+            <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
+                       @click.stop="statusfun(scope.row.id,0)">
+                启用
+            </el-button>
+            <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
+                       @click.stop="statusfun(scope.row.id,1)">
+                停用
+            </el-button>
+        </template>
+      </avue-crud>
+  
+      <!-- <el-dialog title="导入贸易条款" append-to-body :visible.sync="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="onSuccess">
+          <template slot="excelTemplate">
+            <el-button type="primary" @click="handleGet">
+              点击下载<i class="el-icon-download el-icon--right"></i>
+            </el-button>
+          </template>
+        </avue-form>
+        <p style="text-align: center;color: #DC0505">
+          温馨提示 第一次导入时请先下载模板
+        </p>
+      </el-dialog> -->
+  
+    </basic-container>
+  </template>
+  
+  <script>
+  import { getBtrademodesList, getBtrademodesDetail, addBtrademodes, updateBtrademodes, removeBtrademodes } from "@/api/iosBasicData/warehouse";
+  import { mapGetters } from "vuex";
+  
+  import { getToken } from "@/util/auth";
+  
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        excelBox: false,
+        search: {},
+        excelForm: {},
+        excelLoading: false,
+        excelOption: {
+          submitBtn: false,
+          emptyBtn: false,
+          column: [
+            {
+              label: "模板下载",
+              prop: "excelTemplate",
+              formslot: true,
+              span: 24
+            },
+            {
+              label: "模板上传",
+              prop: "excelFile",
+              type: "upload",
+              drag: true,
+              loadText: "模板上传中,请稍等",
+              span: 24,
+              propsHttp: {
+                res: "data"
+              },
+              tip: "请上传 .xls,.xlsx 标准格式文件",
+              action: "/api/blade-los/btrademodes/importBTradeModes"
+            }
+          ]
+        },
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0,
+          pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
+        selectionList: [],
+        option: {
+          dialogDrag: true,
+        },
+        optionBack: {
+          dialogDrag: true,
+          height: 'auto',
+          stripe: true,
+          calcHeight: 30,
+          searchIcon: true,
+          searchIndex: 4,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 24,
+          border: true,
+          index: true,
+          viewBtn: false,
+          selection: true,
+          dialogClickModal: false,
+            menuWidth:260,
+          column: [
+            {
+              label: "编码",
+              prop: "code",
+              width: "180",
+              search: true,
+              slot: true,
+              rules: [{
+                required: true,
+                message: "请输入编码",
+                trigger: "blur"
+              }],
+                overHidden:true,
+            },
+            {
+              label: "中文名称",
+              prop: "cname",
+              width: "180",
+              search: true,
+              slot: true,
+              rules: [{
+                required: true,
+                message: "请输入中文名称",
+                trigger: "blur"
+              }],
+                overHidden:true,
+            },
+            {
+              label: "状态",
+              prop: "status",
+              type: "select",
+              search: true,
+              dicData: [{
+                label: '启用',
+                value: 0
+              }, {
+                label: '停用',
+                value: 1
+              }],
+              value: 0,
+                overHidden:true,
+            },
+              {
+                label: "创建人",
+                prop: "createUserName",
+                  display: false,
+                  overHidden:true,
+              },
+              {
+                label: "创建部门",
+                prop: "createDeptName",
+                  display: false,
+                  overHidden:true,
+              },
+              {
+                label: "创建时间",
+                prop: "createTime",
+                  width: "160",
+                  display: false,
+                  overHidden:true,
+              },
+              {
+                label: "修改人",
+                prop: "updateUserName",
+                  display: false,
+                  overHidden:true,
+              },
+              {
+                label: "修改时间",
+                prop: "updateTime",
+                  width: "160",
+                  display: false,
+                  overHidden:true,
+              },
+            {
+              label: "是否已删除(0 否 1是)",
+              prop: "isDeleted",
+                hide: true,
+                display: false,
+                overHidden:true,
+            },
+            {
+              label: "备注",
+              prop: "remarks",
+              type: 'textarea',
+              width: "180",
+              span: 24,
+              minRows: 3,
+              slot: true,
+                overHidden:true,
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    async created() {
+      this.option = await this.getColumnData(this.getColumnName(394), this.optionBack);
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.btrademodes_add, false),
+          viewBtn: this.vaildData(this.permission.btrademodes_view, false),
+          delBtn: this.vaildData(this.permission.btrademodes_delete, false),
+          editBtn: this.vaildData(this.permission.btrademodes_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+        // 禁用启用按钮
+        statusfun(id,status){
+            this.$confirm("确定将选择数据更改状态?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(()=>{
+                getBtrademodesDetail(id).then(res=>{
+                    let obj = res.data.data;
+                    obj.status = status
+                    updateBtrademodes(obj).then(()=>{
+                        this.onLoad(this.page);
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                    })
+                })
+            })
+        },
+      // 导出
+      handleExport() {
+        var condition = ''
+        for (const key in this.search) {
+          var value = this.search[key]
+          if (value) {
+            condition += `&${key}=${this.search[key]}`
+          }
+        }
+  
+        this.$confirm('是否导出贸易条款?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          window.open(
+            `/api/blade-los/btrademodes/exportBTradeModes?${this.website.tokenHeader
+            }=${getToken()}${condition}`
+          );
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消' //
+          });
+        })
+      },
+      uploadBefore(file, done, loading) {
+        done();
+        loading = true;
+      },
+      // 上传成功
+      onSuccess(res, done, loading, column) {
+        this.excelBox = false;
+        this.$message.success("导入成功!");
+        loading = false;
+        this.onLoad(this.page);
+        done();
+      },
+      // 下载模板
+      handleGet() {
+        window.open(
+          `/api/blade-los/btrademodes/exportBTradeModes/template?${this.website.tokenHeader
+          }=${getToken()}`
+        );
+      },
+      // 新增
+      addbtnfun() {
+        this.form.status = 0
+        this.$refs.crud.rowAdd()
+      },
+      // 查看
+      rowViewfun(row, index) {
+        this.extendedDisabled = true
+        this.$refs.crud.rowView(row, index)
+      },
+      // 编辑
+      rowEditfun(row, index) {
+        getBtrademodesDetail(row.id).then(res => {
+          this.form = res.data.data;
+          this.$refs.crud.rowEdit(row, index)
+        });
+      },
+      rowSave(row, done, loading) {
+        addBtrademodes(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        updateBtrademodes(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        if (row.status === 1) {
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+            .then(() => {
+              return removeBtrademodes(row.id);
+            })
+            .then(() => {
+              this.onLoad(this.page);
+              this.$message({
+                type: "success",
+                message: "操作成功!"
+              });
+            });
+        } else {
+          this.$message({
+            message: '非禁用状态无法删除',
+            type: 'warning'
+          });
+        }
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+  
+        for (const selection of this.selectionList) {
+          if (selection.status == 0) {
+            this.$message.warning("选中的数据中有启用数据,启用数据不可删除!");
+            return;
+          }
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return removeBtrademodes(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getBtrademodesDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getBtrademodesList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      },
+      //自定义列保存
+      async saveColumnTwo(ref, option, optionBack, code) {
+        /**
+         * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+         * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+         * 一定要执行异步操作,要等接口成功返回,才能执行下一行编码
+         */
+        const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        }
+      },
+      //自定义列重置
+      async resetColumnTwo(ref, option, optionBack, code) {
+        this[option] = this[optionBack];
+        const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+        if (inSave) {
+          this.$message.success("重置成功");
+          this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        }
+      },
+      // 更改表格颜色
+      headerClassName(tab) {
+        //颜色间隔
+        let back = ""
+        if (tab.columnIndex >= 0 && tab.column.level === 1) {
+          if (tab.columnIndex % 2 === 0) {
+            back = "back-one"
+          } else if (tab.columnIndex % 2 === 1) {
+            back = "back-two"
+          }
+        }
+        return back;
+      },
+    }
+  };
+  </script>
+  
+  <style lang="scss" scoped>
+  ::v-deep#out-table .back-one {
+    background: #ecf5ff !important;
+  }
+  
+  ::v-deep#out-table .back-two {
+    background: #ecf5ff !important;
+  }
+  
+  /deep/ .el-col-md-8 {
+    width: 24.33333%;
+  }
+  </style>
+  

File diff suppressed because it is too large
+ 270 - 488
src/views/landTransportation/dispatchingCars/detailPage.vue


+ 4 - 4
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -1530,8 +1530,8 @@ export default {
     } else {
       this.initData();
     }
-
-    if (this.roleName.indexOf('调度中心业务员') !== -1 || this.roleName.indexOf('调度中心经理') !== -1) {
+    // console.log(this.roleName)
+    if (this.roleName.indexOf('调度中心业务员') !== -1 || this.roleName.indexOf('调度中心经理') !== -1||this.roleName.indexOf('调度派单') !== -1 ) {
       this.findObject(this.entrustOptionTwoT.column, "landAmountD").hide = true
       this.findObject(this.entrustOptionTwoT.column, "landAmountD").showColumn = false
       this.findObject(this.entrustOptionTwo.column, "landAmountD").hide = true
@@ -1659,7 +1659,7 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs.crudBox.$refs.dialogColumn.columnBox = false;
-        if (this.roleName.indexOf('调度中心业务员') !== -1 || this.roleName.indexOf('调度中心经理') !== -1) {
+        if (this.roleName.indexOf('调度中心业务员') !== -1 || this.roleName.indexOf('调度中心经理') !== -1||this.roleName.indexOf('调度派单') !== -1) {
           this.findObject(this.entrustOptionTwoT.column, "landAmountD").hide = true
           this.findObject(this.entrustOptionTwoT.column, "landAmountD").showColumn = false
           this.findObject(this.entrustOptionTwo.column, "landAmountD").hide = true
@@ -1688,7 +1688,7 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
-        if (this.roleName.indexOf('调度中心业务员') !== -1 || this.roleName.indexOf('调度中心经理') !== -1) {
+        if (this.roleName.indexOf('调度中心业务员') !== -1 || this.roleName.indexOf('调度中心经理') !== -1||this.roleName.indexOf('调度派单') !== -1) {
           this.findObject(this.entrustOptionTwoT.column, "landAmountD").hide = true
           this.findObject(this.entrustOptionTwoT.column, "landAmountD").showColumn = false
           this.findObject(this.entrustOptionTwo.column, "landAmountD").hide = true

+ 31 - 4
src/views/tradeAgency/oceanFreightImport/detailsPage.vue

@@ -14,7 +14,7 @@
                     :disabled="isSaveBtn || form.status != 0" @click="submit">保 存
                 </el-button>
                 <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
-                    :disabled="(form.status != 0&&form.status != 4)" @click="application">单据请核
+                    :disabled="(form.status != 0 && form.status != 4)" @click="application">单据请核
                 </el-button>
                 <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
                     size="small" @click="revokeApplication">撤销单据请核
@@ -153,7 +153,7 @@
                     @saveColumn="saveColumn('crud3', 'option3', 'optionBack3', 390)">
                     <template slot="warehouseName" slot-scope="{ row }">
                         <dic-select v-if="row.$cellEdit" v-model="row.warehouseName" placeholder="入库" key="id" label="cname"
-                            url="blade-los/storage/selectList" :filterable="true" :remote="true" dataName="cname"
+                            url="/blade-los/storage/list" res="records" :filterable="true" :remote="true" dataName="cname"
                             @selectChange="rowDicChange('warehouseName', $event, row)"></dic-select>
                         <span v-else>{{ row.warehouseName }}</span>
                     </template>
@@ -206,7 +206,7 @@
 </template>
 
 <script>
-import { submit, getDetail, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove } from "@/api/tradeAgency/oceanFreightImport";
+import { submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove } from "@/api/tradeAgency/oceanFreightImport";
 import feeInfo from "@/components/tradeAgency/fee-oceanFreight";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -882,6 +882,8 @@ export default {
                         label: "仓储单价",
                         prop: "warehouseUnitPrice",
                         cell: true,
+                        type: 'number',
+                        controls: false,
                         width: "120",
                         overHidden: true
                     },
@@ -945,6 +947,8 @@ export default {
                         prop: "outQuantity",
                         width: "120",
                         cell: true,
+                        type: 'number',
+                        controls: false,
                         overHidden: true
                     },
                     {
@@ -952,6 +956,8 @@ export default {
                         prop: "outWeight",
                         width: "120",
                         cell: true,
+                        type: 'number',
+                        controls: false,
                         overHidden: true
                     },
                     {
@@ -1026,8 +1032,29 @@ export default {
             this.optionForm.disabled = true
             this.getDetails(this.detailData.id)
         }
+        if (this.$route.query.billNo) {
+            this.getDetaiByMblno(this.$route.query.billNo)
+        }
     },
     methods: {
+        getDetaiByMblno(billNo) {
+            this.editButton = true
+            this.editDisabled = true
+            this.optionForm.disabled = true
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            detailTradeByMblno({ mblno: this.$route.query.billNo }).then(res => {
+                this.form = res.data.data
+                this.$refs.crud.dicInit();
+                this.$refs.crud3.dicInit();
+            }).finally(() => {
+                loading.close()
+            })
+        },
         dicChange(name, row) {
             if (name == 'corpCnName') {
                 if (row) {
@@ -1355,7 +1382,7 @@ export default {
         },
         inEdit() {
             this.editButton = false
-            if (this.form.status == 0||this.form.status == 4) {
+            if (this.form.status == 0 || this.form.status == 4) {
                 this.editDisabled = false
                 this.optionForm.disabled = false
             }

+ 17 - 6
src/views/tradeAgency/oceanFreightImport/index.vue

@@ -323,6 +323,14 @@ export default {
     async created() {
         this.option = await this.getColumnData(this.getColumnName(387), this.optionBack);
     },
+    activated() {
+        setTimeout(() => {
+            if (this.$route.query.billNo) {
+                this.isShow = false
+                this.$store.commit("IN_OCEANFS_DETAIL");
+            }
+        }, 100);
+    },
     methods: {
         handleCheckedChange() {
             delete this.query.whetherSail
@@ -338,12 +346,14 @@ export default {
         },
         addButton() {
             this.isShow = false
+            this.$store.commit("IN_OCEANFS_DETAIL");
         },
         rowEdit(row) {
             this.detailData = {
                 id: row.id
             };
             this.isShow = false
+            this.$store.commit("IN_OCEANFS_DETAIL");
         },
         // 删除
         rowDel(row, index) {
@@ -403,12 +413,13 @@ export default {
         // 详情的返回列表
         goBack() {
             // 初始化数据
-            // if (JSON.stringify(this.$route.query) != "{}") {
-            //     this.$router.$avueRouter.closeTag();
-            //     this.$router.push({
-            //         path: "/iosBasicData/accounts/index"
-            //     });
-            // }
+            if (JSON.stringify(this.$route.query) != "{}") {
+                this.$router.$avueRouter.closeTag();
+                this.$router.push({
+                    path: "/tradeAgency/oceanFreightImport/index"
+                });
+            }
+            this.$store.commit("OUT_OCEANFS_DETAIL");
             this.detailData = {}
             this.isShow = true;
             this.onLoad(this.page, this.search);

+ 152 - 48
src/views/tradeAgency/tradeAgency/detailsPage.vue

@@ -123,7 +123,8 @@
                         </el-button>
                         <el-button type="success" size="small" :disabled="editDisabled" @click="allClick('首款账单')">首款账单
                         </el-button>
-                        <el-button type="info" size="small" :disabled="editDisabled" @click="allClick('尾款账单')">尾款账单
+                        <el-button type="info" size="small" :disabled="editDisabled || selectionList.length == 0"
+                            @click="allClick('尾款账单')">尾款账单
                         </el-button>
                         <el-button type="warning" size="small" :disabled="selectionList.length == 0"
                             @click="allClick('生成货代')">生成货代
@@ -132,14 +133,14 @@
                         </el-button>
                         <el-dropdown>
                             <el-button type="danger" size="small" :disabled="editDisabled">
-                                申请付款<i class="el-icon-arrow-down el-icon--right"></i>
+                                生成应付<i class="el-icon-arrow-down el-icon--right"></i>
                             </el-button>
                             <el-dropdown-menu slot="dropdown">
-                                <el-dropdown-item @click.native="allClick('首款申请付款')">首款</el-dropdown-item>
-                                <el-dropdown-item @click.native="allClick('尾款申请付款')">尾款</el-dropdown-item>
+                                <el-dropdown-item @click.native="allClick('生成首款应付')">首款</el-dropdown-item>
+                                <el-dropdown-item @click.native="allClick('生成尾款应付')">尾款</el-dropdown-item>
                             </el-dropdown-menu>
                         </el-dropdown>
-                        <el-dropdown>
+                        <!-- <el-dropdown>
                             <el-button type="danger" size="small" :disabled="editDisabled">
                                 撤销申请付款<i class="el-icon-arrow-down el-icon--right"></i>
                             </el-button>
@@ -147,7 +148,7 @@
                                 <el-dropdown-item @click.native="allClick('首款撤销申请付款')">首款</el-dropdown-item>
                                 <el-dropdown-item @click.native="allClick('尾款撤销申请付款')">尾款</el-dropdown-item>
                             </el-dropdown-menu>
-                        </el-dropdown>
+                        </el-dropdown> -->
                         <el-dropdown>
                             <el-button type="primary" size="small">
                                 应收待确认通知<i class="el-icon-arrow-down el-icon--right"></i>
@@ -158,11 +159,9 @@
                             </el-dropdown-menu>
                         </el-dropdown>
                     </template>
-                    <template slot="boxType" slot-scope="{ row }">
-                        <dic-select v-if="row.$cellEdit" v-model="row.boxType" placeholder="箱型" key="id" res="records"
-                            label="cnName" url="/blade-los/bcntrtypes/list" :filterable="true" :remote="true"
-                            dataName="cnName"></dic-select>
-                        <span v-else>{{ row.boxType }}</span>
+                    <template slot="billNo" slot-scope="{ row }">
+                        <!-- <el-input v-if="row.$cellEdit" v-model="row.billNo" placeholder="请输入 提单号"></el-input> -->
+                        <span v-if="!row.$cellEdit" style="color: #1e9fff" @click="rowJump(row)">{{ row.billNo }}</span>
                     </template>
                     <tempalte slot="orderReleaseMethod" slot-scope="{ row }">
                         <dic-select v-if="row.$cellEdit" v-model="row.orderReleaseMethod" placeholder="放单方式" key="dictKey"
@@ -196,8 +195,7 @@
                         <el-button size="small" icon="el-icon-edit" type="text" :disabled="editDisabled"
                             @click="rowCell(row, index)">编 辑</el-button>
                         <el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
-                            @click="rowDel(row, index)">删
-                            除</el-button>
+                            @click="rowDel(row, index)">删 除</el-button>
                     </template>
                 </avue-crud>
             </trade-card>
@@ -232,11 +230,21 @@
             :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="尾款账单" class="el-dialogDeep" :visible.sync="wkDialog" width="50%" top="30vh"
+            :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+            <avue-form v-model="wkForm" :option="wkOption"></avue-form>
+            <avue-crud :data="wkData" :option="wkOptionList"></avue-crud>
+            <span slot="footer" class="dialog-footer">
+                <el-button size="mini" @click="wkDialog = false">取 消</el-button>
+                <el-button size="mini" type="primary" @click="wkDialog = false">提 交</el-button>
+            </span>
+
+        </el-dialog>
     </div>
 </template>
 
 <script>
-import { submit, getDetail, remove, checkAgent, revokeCheckAgent, copyAgent, generateDownPaymentBill, generateBalancePaymentBill, ApplyForPayment, revokeApplyForPayment, confirmationNotification, generateFreightForwarder } from "@/api/tradeAgency/tradeAgency";
+import { submit, getDetail, remove, checkAgent, revokeCheckAgent, copyAgent, generateDownPaymentBill, generateBalancePaymentBill, generatePayment, revokeApplyForPayment, confirmationNotification, generateFreightForwarder, balancePayment } from "@/api/tradeAgency/tradeAgency";
 import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
 import feeInfo from "@/components/tradeAgency/fee-info";
 import dicSelect from "@/components/dicSelect/main";
@@ -249,10 +257,65 @@ export default {
 
     data() {
         return {
+            wkData: [],
+            wkForm: {},
+            wkOption: {
+                menuBtn: false,
+                span: 8,
+                disabled: false,
+                column: [
+                    {
+                        label: '总货值',
+                        prop: '',
+                        disabled: true,
+                    },
+                    {
+                        label: '预付金额',
+                        prop: '',
+                        disabled: true,
+                    },
+                    {
+                        label: '应收金额',
+                        prop: '',
+                        disabled: true,
+                    },
+                    {
+                        label: '汇率',
+                        prop: ''
+                    }
+                ]
+            },
+            wkOptionList: {
+                header: false,
+                border: true,
+                index: true,
+                menu: false,
+                align: 'center',
+                column: [
+                    {
+                        label: '提单号',
+                        prop: 'invoiceHeader',
+                        overHidden: true
+                    },
+                    {
+                        label: '货值',
+                        prop: 'amount',
+                        overHidden: true
+                    },
+                    {
+                        label: '本次金额',
+                        prop: 'taxRate',
+                        cell: true,
+                        type: 'number',
+                        controls: false
+                    }
+                ]
+            },
             selectionList: [],
             checkId: '', // 审核需要的id
             batchNo: '',
             checkScheduleDialog: false, // 审核弹窗
+            wkDialog: false,//尾款弹窗
             editButton: false,
             editDisabled: false,
             activeName: '1',
@@ -631,6 +694,14 @@ export default {
                         label: "货代",
                         prop: "freightForwarder",
                         width: "120",
+                        type: 'select',
+                        dicData: [{
+                            label: '是',
+                            value: '1'
+                        }, {
+                            label: '否',
+                            value: '0'
+                        }],
                         overHidden: true
                     },
                     {
@@ -919,6 +990,12 @@ export default {
             });
             getDetail({ id: id }).then(res => {
                 this.form = res.data.data
+                if (res.data.data.abroadConsignorId) {
+                    this.$refs.abankCode.IdGetDicData({ id: res.data.data.abroadConsignorId })
+                }
+                if (res.data.data.domesticConsigneeId) {
+                    this.$refs.dbankCode.IdGetDicData({ id: res.data.data.domesticConsigneeId })
+                }
             }).finally(() => {
                 loading.close()
             })
@@ -930,6 +1007,27 @@ export default {
                 this.optionForm.disabled = false
             }
         },
+        rowJump(row) {
+            if (row.freightForwarder == 1) {
+                if (this.$store.getters.oceanFreightStatus) {
+                    this.$alert("海运进口(T)页面已存在,请关闭海运出口再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: '/tradeAgency/oceanFreightImport/index',
+                        query: {
+                            billNo: row.billNo
+                        },
+                    })
+                }
+            } else {
+                this.$message.error("未生成货代");
+            }
+        },
         allClick(name) {
             if (name == '首款账单') {
                 if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
@@ -957,55 +1055,61 @@ export default {
             }
             if (name == '尾款账单') {
                 if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
-                bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
-                    res.data.data.forEach(e => {
-                        if (this.form.currency == e.code) {
-                            this.$prompt('请输入汇率', '尾款账单', {
-                                confirmButtonText: '确定',
-                                cancelButtonText: '取消',
-                                inputValue: e.exrate
-                            }).then(({ value }) => {
-                                let obj = {}
-                                obj = {
-                                    ...this.form,
-                                    exchangeRate: value
-                                }
-                                generateBalancePaymentBill(obj).then(res => {
-                                    this.$message.success("成功生成首款账单");
-                                    this.getDetails(this.form.id)
-                                })
-                            })
-                        }
-                    })
+                this.wkDialog = true
+                let obj = {}
+                obj = {
+                    ...this.form,
+                    agentItemsList: this.selectionList
+                }
+                balancePayment(obj).then(res => {
+                    // res.data.data.forEach(e => {
+                    // if (this.form.currency == e.code) {
+                    //     this.$prompt('请输入汇率', '尾款账单', {
+                    //         confirmButtonText: '确定',
+                    //         cancelButtonText: '取消',
+                    //         inputValue: e.exrate
+                    //     }).then(({ value }) => {
+                    //         let obj = {}
+                    //         obj = {
+                    //             ...this.form,
+                    //             exchangeRate: value
+                    //         }
+                    //         generateBalancePaymentBill(obj).then(res => {
+                    //             this.$message.success("成功生成首款账单");
+                    //             this.getDetails(this.form.id)
+                    //         })
+                    //     })
+                    // }
+                    // })
                 })
             }
-            if (name == '首款申请付款') {
-                if (this.form.applyForPayment == 1) return this.$message.error("请勿重复申请");
+            if (name == '生成首款应付') {
+                if (this.form.applyForPayment == 1) return this.$message.error("请勿重复生成");
                 let obj = {}
                 obj = {
                     id: this.form.id,
-                    url: '/tradeAgency/tradeAgency/index',
-                    pageStatus: '',
-                    pageLabel: '贸易代理(T)',
+                    // url: '/tradeAgency/tradeAgency/index',
+                    // pageStatus: '',
+                    // pageLabel: '贸易代理(T)',
                     paidApplication: 'FFSQ-SK'
                 }
-                ApplyForPayment(obj).then(res => {
-                    this.$message.success("申请付款成功");
+                generatePayment(obj).then(res => {
+                    this.$message.success("生成首款应付成功");
                     this.getDetails(this.form.id)
                 })
             }
-            if (name == '尾款申请付款') {
-                if (this.form.applyForPaymentBalance == 1) return this.$message.error("请勿重复申请");
+            if (name == '生成尾款应付') {
+                if (this.form.applyForPaymentBalance == 1) return this.$message.error("请勿重复生成");
                 let obj = {}
                 obj = {
                     id: this.form.id,
-                    url: '/tradeAgency/tradeAgency/index',
-                    pageStatus: '',
-                    pageLabel: '贸易代理(T)',
+                    // url: '/tradeAgency/tradeAgency/index',
+                    // pageStatus: '',
+                    // pageLabel: '贸易代理(T)',
                     paidApplication: 'FFSQ-WK'
                 }
-                ApplyForPayment(obj).then(res => {
-                    this.$message.success("申请付款成功");
+                generatePayment(obj).then(res => {
+                    this.$message.success("生成尾款应付成功");
                     this.getDetails(this.form.id)
                 })
             }

+ 4 - 3
vue.config.js

@@ -21,6 +21,7 @@ module.exports = {
         minChunkSize: 100
       })
     ]
+    // 启用gzip
   },
   //路径前缀
   publicPath: "/",
@@ -50,11 +51,11 @@ module.exports = {
       '/api': {
         //本地服务接口地址
         // target: 'http://192.168.3.64:1080',
-        // target: 'http://192.168.8.105:1080',
+        // target: 'http://192.168.8.106:1080',
         // target: 'http://127.0.0.1:1080',
         // 打包地址
-        // target: 'http://121.37.83.47:10004',//服务器ip
-        target: 'http://192.168.161.11:10004',//服务器ip
+        target: 'http://121.37.83.47:10004',//服务器ip
+        // target: 'http://192.168.161.11:10004',//服务器ip
         // target: 'http://trade.tubaosoft.com:10004',//服务器域名
         ws: true,
         pathRewrite: {

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