Browse Source

新加页面

Qukatie 7 months ago
parent
commit
65ef00365b

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

@@ -1962,6 +1962,12 @@ const columnName = [{
   },{
     code: 439,
     name: '基础资料-拜访记录-拜访记录列表(L)'
+  },{
+    code: 440,
+    name: '货代-人力资源-在职员工列表(F)'
+  },{
+    code: 441,
+    name: '货代-人力资源-离职员工列表(F)'
   }
 ]
 export const getColumnName = (key) => {

+ 430 - 0
src/views/iosBasicData/humanResources/employees/detailsPage.vue

@@ -0,0 +1,430 @@
+<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"
+                    v-if="editDisabled"
+                    @click="inEdit">编 辑
+                </el-button>
+                <el-button v-if="!editDisabled" class="el-button--small-yh" style="margin-left: 6px;" type="primary"
+                    size="small" :disabled="isSaveBtn" @click="submit">保 存
+                </el-button>
+            </div>
+        </div>
+        <div style="margin-top: 50px">
+            <trade-card title="基础信息">
+                <avue-form :option="optionForm" v-model="form" ref="form">
+                </avue-form>
+            </trade-card>
+        </div>
+    </div>
+</template>
+
+<script>
+import { submit, getDetail } from "@/api/tradeAgency/exchangePurchasing";
+import dicSelect from "@/components/dicSelect/main";
+import _ from "lodash";
+export default {
+    name: "detailsPage",
+
+    data() {
+        return {
+            editDisabled: false,
+            form: {},
+            oldForm: {},
+            optionForm: {
+                menuBtn: false,
+                span: 8,
+                disabled: true,
+                column: [
+                    {
+                        label: "单据编号",
+                        prop: "billNo",
+                        disabled: true,
+                    },
+                    {
+                        label: "制单日期",
+                        prop: "createTime",
+                        disabled: true,
+                    },
+                    {
+                        label: '岗位类型',
+                        prop: "positionType",
+                        disabled: false,
+                    },
+                    {
+                        label: '核算部门',
+                        prop: "accountingDepartmentName",
+                        disabled: true,
+                    },
+                    {
+                        label: '员工编号',
+                        prop: "staffNo",
+                        disabled: true,
+                    },
+                    {
+                        label: '姓名',
+                        prop: "cname",
+                        disabled: true,
+                    },
+                    {
+                        label: '英文名字',
+                        prop: "ename",
+                        disabled: true,
+                    },
+                    {
+                        label: '性别',
+                        prop: "gender",
+                        disabled: true,
+                    },
+                    {
+                        label: '行政部门',
+                        prop: "administrativeDepartmentName",
+                        disabled: true,
+                    },
+                    {
+                        label: '职务',
+                        prop: "position",
+                        disabled: true,
+                    },
+                    {
+                        label: '婚否',
+                        prop: "maritalStatus",
+                        disabled: true,
+                    },
+                    {
+                        label: '办公地点',
+                        prop: "officeLocation",
+                        disabled: true,
+                    },
+                    {
+                        label: '婚否',
+                        prop: "maritalStatus",
+                        disabled: true,
+                    },
+                    {
+                        label: '婚否',
+                        prop: "maritalStatus",
+                        disabled: true,
+                    },
+                    {
+                        label: '婚否',
+                        prop: "maritalStatus",
+                        disabled: true,
+                    },
+                    {
+                        label: '婚否',
+                        prop: "maritalStatus",
+                        disabled: true,
+                    },
+                    {
+                        label: '婚否',
+                        prop: "maritalStatus",
+                        disabled: true,
+                    },
+                    {
+                        label: '业务日期',
+                        prop: "businessDate",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        disabled: false,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },
+                    {
+                        label: '金额',
+                        prop: "goodsValue",
+                        disabled: true,
+                    },
+                    {
+                        label: '付汇美元金额',
+                        prop: "paymentInUsd",
+                        disabled: true,
+                    },
+                    {
+                        label: '当天汇率',
+                        prop: "exchangeRate",
+                        disabled: true,
+                    },
+                    {
+                        label: '实付金额',
+                        prop: "actualAmount",
+                        disabled: true,
+                    },
+                    {
+                        label: '邮电费',
+                        prop: "postElectricFee",
+                        disabled: true,
+                    },
+                    {
+                        label: '手续费',
+                        prop: "serviceCharge",
+                        disabled: true,
+                    },
+                    {
+                        label: '申报单号',
+                        prop: "declarationNumber",
+                        disabled: false,
+                    },
+                    {
+                        label: '国内收货人',
+                        prop: "domesticConsigneeCname",
+                        disabled: true,
+                    },
+                    {
+                        label: '银行助记码',
+                        prop: "domesticBankMnemonicCode",
+                        disabled: true,
+                    },
+                    {
+                        label: '银行',
+                        prop: "domesticBank",
+                        disabled: true,
+                    },
+                    {
+                        label: '币别',
+                        prop: "domesticCurrency",
+                        disabled: true,
+                    },
+                    {
+                        label: '所属公司',
+                        prop: "affiliatedCompanyName",
+                        disabled: true,
+                    },
+                    {
+                        label: '付费方式',
+                        prop: "advanceRatio",
+                        type: "select",
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=advance_ratio",
+                        props: {
+                            label: "dictValue",
+                            value: "dictValue"
+                        },
+                        disabled: false
+                    },
+                    {
+                        label: '备注',
+                        prop: "remarks",
+                        type: 'textarea',
+                        span: 12,
+                        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: "billNo",
+                        overHidden: true
+                    },
+                    {
+                        label: "箱号",
+                        prop: "boxNo",
+                        overHidden: true
+                    },
+                    {
+                        label: "铅封号",
+                        prop: "leadSealNo",
+                        overHidden: true
+                    },
+                    {
+                        label: "开船日期",
+                        prop: "etd",
+                        overHidden: true
+                    },
+                    {
+                        label: "预计到港",
+                        prop: "estimateReachHarbor",
+                        width: "120",
+                        overHidden: true
+                    },
+                    {
+                        label: "HSCODE",
+                        prop: "hsCode",
+                        overHidden: true
+                    },
+                    {
+                        label: "厂号",
+                        prop: "factoryNumber",
+                        overHidden: true
+                    },
+                    {
+                        label: "标签品名",
+                        prop: "labelProductName",
+                        overHidden: true
+                    },
+                    {
+                        label: "商品类别",
+                        prop: "goodsType",
+                        overHidden: true
+                    },
+                    {
+                        label: "件数",
+                        prop: "quantity",
+                        overHidden: true
+                    },
+                    {
+                        label: "净重(kg)",
+                        prop: "netWeight",
+                        overHidden: true
+                    },
+                    {
+                        label: "单价",
+                        prop: "price",
+                        overHidden: true
+                    },
+                    {
+                        label: "毛重(kg)",
+                        prop: "grossWeight",
+                        overHidden: true
+                    },
+                    {
+                        label: "金额",
+                        prop: "amount",
+                        overHidden: true
+                    },
+                    {
+                        label: "备注",
+                        prop: "remarks",
+                        overHidden: true
+                    }
+                ]
+            },
+            showLock: false,
+            roleName: [],
+            saberUserInfo: ''
+        }
+    },
+    components: {
+        dicSelect
+    },
+    props: {
+        detailData: Object
+    },
+    async created() {
+        this.roleName = localStorage.getItem('roleName').split(',')
+        this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content
+        this.option = await this.getColumnData(this.getColumnName(384), this.optionBack);
+        if (this.detailData.id) {
+            this.showLock = true
+            this.editDisabled = true
+            this.getDetails(this.detailData.id)
+        }
+    },
+    methods: {
+        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 => {
+                if (res.data.data.orderStatus == '已确认') this.optionForm.disabled = true
+                this.form = res.data.data
+                this.oldForm = this.deepClone(res.data.data)
+                this.inLock()
+                // this.form.filesCenterList=[]
+            }).finally(() => {
+                loading.close()
+            })
+        },
+        inEdit() {
+            this.editDisabled = false
+            this.optionForm.disabled = false
+        },
+        submit(type) {
+            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("保存成功");
+                        if (type == 'goBack') {
+                            if (this.form.id) {
+                                this.unLock({
+                                    moduleName: "MYDL-D",
+                                    tableName: "MYDL-D_Detail",
+                                    billId: this.form.id,
+                                    billNo: this.form.contractNo
+                                });
+                            }
+                            this.$emit("goBack", type);
+                            this.$emit('updateKey')
+                        }
+                        this.getDetails(res.data.data.id)
+                    }).finally(() => {
+                        loading.close();
+                    })
+                } else {
+                    return false;
+                }
+            });
+        },
+        goBack(type) {
+            this.$emit("goBack", type);
+        },
+    }
+}
+</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;
+}
+
+::v-deep .el-table--small td,
+.el-table--small th {
+    padding: 2px !important;
+}
+</style>

+ 363 - 0
src/views/iosBasicData/humanResources/employees/index.vue

@@ -0,0 +1,363 @@
+<template>
+    <div>
+        <basic-container v-show="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', 440)"
+                @saveColumn="saveColumn('crud', 'option', 'optionBack', 440)" @on-load="onLoad">
+                <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>
+                </template>
+                <template slot="businessNo" slot-scope="{ row }">
+                    <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.businessNo }}</span>
+                </template>
+                <template slot="menuLeft">
+                    <el-button type="primary" size="small" icon="el-icon-plus" @click="addButton">新 增
+                    </el-button>
+                </template>
+            </avue-crud>
+        </basic-container>
+        <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
+    </div>
+</template>
+  
+<script>
+import { getList, remove, copyAgent } from "@/api/tradeAgency/exchangePurchasing";
+import detailsPage from "./detailsPage";
+
+export default {
+    data() {
+        return {
+            detailData: {},
+            isShow: true,
+            form: {},
+            query: {
+                businessType: 'MYDL-STL',
+                dc: 'D'
+            },
+            loading: false,
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0,
+            },
+            selectionList: [],
+            option: {},
+            optionBack: {
+                height: 'auto',
+                calcHeight: 30,
+                menuWidth: 120,
+                searchShow: true,
+                searchMenuSpan: 6,
+                border: true,
+                index: true,
+                addBtn: false,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                searchIcon: true,
+                searchIndex: 3,
+                column: [
+                    {
+                        label: "单据编号",
+                        prop: "billNo",
+                        overHidden: true,
+                    },
+                    {
+                        label: "制单日期",
+                        prop: "createTime",
+                        type: "date",
+                        search: true,
+                        searchProp: "createTimeList",
+                        unlinkPanels: true,
+                        searchRange: true,
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                        overHidden: true,
+                    },
+                    {
+                        label: '员工编号',
+                        prop: "staffNo",
+                        overHidden: true,
+                    },
+                    {
+                        label: '员工姓名',
+                        prop: "cname",
+                        overHidden: true,
+                    },
+                    {
+                        label: "*部门*",
+                        prop: "goodsValue",
+                        overHidden: true,
+                    },
+                    {
+                        label: '*就职日期*',
+                        prop: "paymentInUsd",
+                        overHidden: true,
+                    },
+                    {
+                        label: '性别',
+                        prop: "gender",
+                        overHidden: true,
+                    },
+                    {
+                        label: '年龄',
+                        prop: "age",
+                        overHidden: true,
+                    },
+                    {
+                        label: '出生日期',
+                        prop: "dateOfBirthList",
+                        overHidden: true,
+                    },
+                    {
+                        label: '身份证号',
+                        prop: "idNumber",
+                        overHidden: true,
+                    },
+                    {
+                        label: '学历',
+                        prop: "educationalBackground",
+                        overHidden: true,
+                    },
+                    {
+                        label: "专业",
+                        prop: "major",
+                        overHidden: true
+                    },
+                    {
+                        label: "职务",
+                        prop: "position",
+                        overHidden: true
+                    },
+                    {
+                        label: "*何时参加工作*",
+                        prop: "participateInWorkDate",
+                        overHidden: true
+                    },
+                    {
+                        label: "家庭住址",
+                        prop: "homeAddress",
+                        overHidden: true
+                    },
+                    {
+                        label: "家庭电话",
+                        prop: "homePhone",
+                        overHidden: true
+                    },
+                    {
+                        label: "民族",
+                        prop: "nationality",
+                        overHidden: true
+                    },
+                    {
+                        label: "政治面貌",
+                        prop: "politicalStatus",
+                        overHidden: true
+                    },
+                    {
+                        label: "*人员身份*",
+                        prop: "remarks",
+                        overHidden: true
+                    },
+                    {
+                        label: "社保编号",
+                        prop: "socialSecurityNo",
+                        overHidden: true
+                    },
+                    {
+                        label: "房屋公积金",
+                        prop: "providentFund",
+                        overHidden: true
+                    },
+                    {
+                        label: "合同起始日",
+                        prop: "contractPeriodStart",
+                        overHidden: true
+                    },
+                    {
+                        label: "合同截止日",
+                        prop: "contractPeriodEnd",
+                        overHidden: true
+                    },
+                    {
+                        label: "参加工作时间",
+                        prop: "participateInWorkDate",
+                        overHidden: true
+                    },
+                    {
+                        label: "行政部门",
+                        prop: "administrativeDepartmentName",
+                        overHidden: true
+                    }
+                ]
+            },
+            data: [],
+        };
+    },
+    components: {
+        detailsPage,
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(440), this.optionBack);
+    },
+    activated() {
+        setTimeout(() => {
+            if (this.$route.query.billNo || this.$route.query.params) {
+                this.isShow = false
+                this.$store.commit("IN_FIRSTSET_DETAIL");
+            }
+        }, 100);
+    },
+    methods: {
+        addButton() {
+            this.isShow = false
+            this.detailData = {
+                new: true
+            };
+        },
+        rowEdit(row) {
+            this.isShow = false
+        },
+        // 编辑
+        inEdit(row) {
+        },
+        // 删除
+        rowDel(row, index) {
+            this.$confirm("确定将选择数据删除?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                remove({ ids: row.id }).then(res => {
+                    this.onLoad(this.page, this.query);
+                    this.$message.success("成功删除");
+                })
+            })
+
+        },
+        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/humanResources/employees/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>
+  

+ 539 - 0
src/views/iosBasicData/humanResources/resignations/detailsPage.vue

@@ -0,0 +1,539 @@
+<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 size="small" style="margin-right: 8px" :disabled="!form.id"
+                    @click="$refs.print.openDialog()">打印账单
+                </el-button>
+                <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
+                    @click="$refs.report.openDialog()">报表设计
+                </el-button>
+                <el-button v-if="!editDisabled" class="el-button--small-yh" type="success" size="small"
+                    :disabled="isSaveBtn || form.orderStatus == '已确认'" @click="submitFee">确认收款
+                </el-button>
+                <el-button v-if="!editDisabled" class="el-button--small-yh" type="warning" size="small"
+                    :disabled="isSaveBtn || form.orderStatus != '已确认'" @click="revokeFee">撤销收款
+                </el-button>
+                <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
+                    v-if="editDisabled"
+                    :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
+                    @click="inEdit">编 辑
+                </el-button>
+                <el-button v-if="!editDisabled" class="el-button--small-yh" style="margin-left: 6px;" type="primary"
+                    size="small" :disabled="isSaveBtn" @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="remarks">
+                        <el-input type="textarea" :rows="2" placeholder="请输入 备注" v-model="form.remarks" :disabled="editDisabled">
+                        </el-input>
+                    </tempalte>
+                </avue-form>
+            </trade-card>
+            <trade-card title="费用明细">
+                <fee-infosimple feeType="D" :form="form" :disabled="editDisabled" @getDetails="getDetails"></fee-infosimple>
+            </trade-card>
+            <containerTitle title="上传附件"></containerTitle>
+            <c-upload :data="form.filesCenterList" :enumerationValue="76"
+                deleteUrl="/api/blade-los/filescenter/remove" display :disabled="editDisabled"></c-upload>
+            <business-reports :id="form.id" ref="print" businessValue="MYDL-STL" :type="true"></business-reports>
+            <reports :id="form.id" :assemblyForm="form" businessValue="MYDL-STL" ref="report"></reports>
+        </div>
+    </div>
+</template>
+
+<script>
+import { submit, getDetail, confirmCollectionOfPayments, revokeCollectionOfPayments } from "@/api/tradeAgency/exchangePurchasing";
+import { contrastObj, contrastList } from "@/util/contrastData";
+import feeInfosimple from "@/components/tradeAgency/fee-infosimple";
+import dicSelect from "@/components/dicSelect/main";
+import businessReports from "@/components/tradeAgency/businessReports.vue";
+import reports from "@/components/tradeAgency/reports.vue";
+import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
+import { dateFormat } from "@/util/date";
+import _ from "lodash";
+export default {
+    name: "detailsPage",
+
+    data() {
+        return {
+            editDisabled: false,
+            form: {},
+            oldForm: {},
+            optionForm: {
+                menuBtn: false,
+                span: 8,
+                disabled: true,
+                column: [
+                    {
+                        label: '客户',
+                        prop: "corpName",
+                        disabled: true,
+                    },
+                    {
+                        label: '业务号',
+                        prop: "businessNo",
+                        disabled: true,
+                    },
+                    {
+                        label: '合同号',
+                        prop: "contractNo",
+                        disabled: true,
+                    },
+                    {
+                        label: '提单号',
+                        prop: "billNoJoin",
+                        disabled: true,
+                    },
+                    {
+                        label: '业务日期',
+                        prop: "businessDate",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        disabled: false,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },
+                    {
+                        label: '金额',
+                        prop: "goodsValue",
+                        disabled: true,
+                    },
+                    {
+                        label: '付汇美元金额',
+                        prop: "paymentInUsd",
+                        disabled: true,
+                    },
+                    {
+                        label: '当天汇率',
+                        prop: "exchangeRate",
+                        disabled: true,
+                    },
+                    {
+                        label: '实付金额',
+                        prop: "actualAmount",
+                        disabled: true,
+                    },
+                    {
+                        label: '邮电费',
+                        prop: "postElectricFee",
+                        disabled: true,
+                    },
+                    {
+                        label: '手续费',
+                        prop: "serviceCharge",
+                        disabled: true,
+                    },
+                    {
+                        label: '申报单号',
+                        prop: "declarationNumber",
+                        disabled: false,
+                    },
+                    {
+                        label: '国内收货人',
+                        prop: "domesticConsigneeCname",
+                        disabled: true,
+                    },
+                    {
+                        label: '银行助记码',
+                        prop: "domesticBankMnemonicCode",
+                        disabled: true,
+                    },
+                    {
+                        label: '银行',
+                        prop: "domesticBank",
+                        disabled: true,
+                    },
+                    {
+                        label: '币别',
+                        prop: "domesticCurrency",
+                        disabled: true,
+                    },
+                    {
+                        label: '所属公司',
+                        prop: "affiliatedCompanyName",
+                        disabled: true,
+                    },
+                    {
+                        label: '付费方式',
+                        prop: "advanceRatio",
+                        type: "select",
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=advance_ratio",
+                        props: {
+                            label: "dictValue",
+                            value: "dictValue"
+                        },
+                        disabled: false
+                    },
+                    {
+                        label: '备注',
+                        prop: "remarks",
+                        type: 'textarea',
+                        span: 12,
+                        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: "billNo",
+                        overHidden: true
+                    },
+                    {
+                        label: "箱号",
+                        prop: "boxNo",
+                        overHidden: true
+                    },
+                    {
+                        label: "铅封号",
+                        prop: "leadSealNo",
+                        overHidden: true
+                    },
+                    {
+                        label: "开船日期",
+                        prop: "etd",
+                        overHidden: true
+                    },
+                    {
+                        label: "预计到港",
+                        prop: "estimateReachHarbor",
+                        width: "120",
+                        overHidden: true
+                    },
+                    {
+                        label: "HSCODE",
+                        prop: "hsCode",
+                        overHidden: true
+                    },
+                    {
+                        label: "厂号",
+                        prop: "factoryNumber",
+                        overHidden: true
+                    },
+                    {
+                        label: "标签品名",
+                        prop: "labelProductName",
+                        overHidden: true
+                    },
+                    {
+                        label: "商品类别",
+                        prop: "goodsType",
+                        overHidden: true
+                    },
+                    {
+                        label: "件数",
+                        prop: "quantity",
+                        overHidden: true
+                    },
+                    {
+                        label: "净重(kg)",
+                        prop: "netWeight",
+                        overHidden: true
+                    },
+                    {
+                        label: "单价",
+                        prop: "price",
+                        overHidden: true
+                    },
+                    {
+                        label: "毛重(kg)",
+                        prop: "grossWeight",
+                        overHidden: true
+                    },
+                    {
+                        label: "金额",
+                        prop: "amount",
+                        overHidden: true
+                    },
+                    {
+                        label: "备注",
+                        prop: "remarks",
+                        overHidden: true
+                    }
+                ]
+            },
+            showLock: false,
+            roleName: [],
+            saberUserInfo: ''
+        }
+    },
+    components: {
+        dicSelect,
+        feeInfosimple,
+        businessReports,
+        reports
+    },
+    props: {
+        detailData: Object
+    },
+    async created() {
+        this.roleName = localStorage.getItem('roleName').split(',')
+        this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content
+        this.option = await this.getColumnData(this.getColumnName(384), this.optionBack);
+        if (this.detailData.id) {
+            this.showLock = true
+            this.editDisabled = true
+            this.getDetails(this.detailData.id)
+        }
+        if (this.$route.query.billNo) {
+            this.showLock = true
+            this.getDetails(this.$route.query.billNo)
+        }
+        if (this.$route.query.params) {
+            this.showLock = true
+            this.getDetails(this.$route.query.params)
+        }
+    },
+    methods: {
+        inLock() {
+            const data = {
+                moduleName: "MYDL-D",
+                tableName: "MYDL-D_Detail",
+                billId: this.form.id,
+                no: localStorage.getItem("browserID"),
+                billNo: this.form.contractNo
+            };
+            this.inDetailsKey(this.$route.name, {
+                moduleName: "MYDL-D",
+                tableName: "MYDL-D_Detail",
+                billId: this.form.id,
+                billNo: this.form.contractNo
+
+            });
+            this.checkLock(data).then(res => {
+                if (res.data.code == 200) {
+                    this.onLock(data).then(res => {
+                        if (res.data.code == 200) {
+                            this.showLock = false
+                        }
+                    });
+                }
+            });
+        },
+        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 => {
+                if (res.data.data.orderStatus == '已确认') this.optionForm.disabled = true
+                this.form = res.data.data
+                this.oldForm = this.deepClone(res.data.data)
+                this.inLock()
+                // this.form.filesCenterList=[]
+            }).finally(() => {
+                loading.close()
+            })
+        },
+        inEdit() {
+            this.editDisabled = false
+            if (this.form.orderStatus != '已确认') {
+                this.optionForm.disabled = false
+            }
+        },
+        submit(type) {
+            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("保存成功");
+                        if (type == 'goBack') {
+                            if (this.form.id) {
+                                this.unLock({
+                                    moduleName: "MYDL-D",
+                                    tableName: "MYDL-D_Detail",
+                                    billId: this.form.id,
+                                    billNo: this.form.contractNo
+                                });
+                            }
+                            this.$emit("goBack", type);
+                            this.$emit('updateKey')
+                        }
+                        this.getDetails(res.data.data.id)
+                    }).finally(() => {
+                        loading.close();
+                    })
+                } else {
+                    return false;
+                }
+            });
+        },
+        submitFee() {
+            bcurrencyGetExrate({ date: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'), dc: "D" }).then(res => {
+                res.data.data.forEach(e => {
+                    if (e.code == 'USD') {
+                        this.$prompt('<br/>请输入当天汇率:', '确定收费', {
+                            confirmButtonText: '确定',
+                            cancelButtonText: '取消',
+                            inputValue: e.exrate,
+                            dangerouslyUseHTMLString: true,
+                            closeOnClickModal: false,
+                        }).then(({ value }) => {
+                            let obj = {}
+                            obj = {
+                                ...this.form,
+                                exchangeRate: value
+                            }
+                            const loading = this.$loading({
+                                lock: true,
+                                text: '加载中',
+                                spinner: 'el-icon-loading',
+                                background: 'rgba(255,255,255,0.7)'
+                            });
+                            confirmCollectionOfPayments(obj).then(res => {
+                                this.getDetails(res.data.data.id)
+                                this.$message.success("确认成功");
+                            }).finally(() => {
+                                loading.close();
+                            })
+                        })
+                    }
+                })
+            })
+        },
+        revokeFee() {
+            this.$confirm('撤销收费?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                revokeCollectionOfPayments(this.form).then(res => {
+                    this.getDetails(res.data.data.id)
+                    this.$message.success("撤销成功");
+                }).finally(() => {
+                    loading.close();
+                })
+            })
+
+        },
+        //自定义列保存
+        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) {
+            if (contrastObj(this.form, this.oldForm) || contrastList(this.form.filesCenterList, this.oldForm.filesCenterList)) {
+                this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                })
+                    .then(() => {
+                        this.submit('goBack')
+                    })
+                    .catch(() => {
+                        if (this.form.id) {
+                            this.unLock({
+                                moduleName: "MYDL-D",
+                                tableName: "MYDL-D_Detail",
+                                billId: this.form.id,
+                                billNo: this.form.contractNo
+                            });
+                        }
+                        this.$emit("goBack", type);
+                        this.$emit('updateKey')
+                    });
+            } else {
+                if (this.form.id) {
+                    this.unLock({
+                        moduleName: "MYDL-D",
+                        tableName: "MYDL-D_Detail",
+                        billId: this.form.id,
+                        billNo: this.form.contractNo
+                    });
+                }
+                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;
+}
+
+::v-deep .el-table--small td,
+.el-table--small th {
+    padding: 2px !important;
+}
+</style>

+ 345 - 0
src/views/iosBasicData/humanResources/resignations/index.vue

@@ -0,0 +1,345 @@
+<template>
+    <div>
+        <basic-container v-show="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', 441)"
+                @saveColumn="saveColumn('crud', 'option', 'optionBack', 441)" @on-load="onLoad">
+                <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>
+                </template>
+                <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, copyAgent } from "@/api/tradeAgency/exchangePurchasing";
+import detailsPage from "./detailsPage";
+
+export default {
+    data() {
+        return {
+            detailData: {},
+            isShow: true,
+            form: {},
+            query: {
+                businessType: 'MYDL-STL',
+                dc: 'D'
+            },
+            loading: false,
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0,
+            },
+            selectionList: [],
+            option: {},
+            optionBack: {
+                height: 'auto',
+                calcHeight: 30,
+                menuWidth: 120,
+                searchShow: true,
+                searchMenuSpan: 6,
+                border: true,
+                index: true,
+                addBtn: false,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                searchIcon: true,
+                searchIndex: 3,
+                column: [
+                    {
+                        label: "客户名称",
+                        prop: "corpId",
+                        overHidden: true,
+                        search: true,
+                        type: 'select',
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-los/bcorps/listByType?corpTypeName=客户&cnName={{key}}",
+                        props: {
+                            label: 'cnName',
+                            value: 'id',
+                            res: 'data.records'
+                        },
+                        hide: true,
+                        showColumn: false,
+                        searchOrder: 1,
+                    },
+                    {
+                        label: "客户名称",
+                        prop: "corpName",
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
+                        label: "业务号",
+                        prop: "businessNo",
+                        overHidden: true,
+                        search: true,
+                        width: "140",
+                        searchOrder: 2,
+                    },
+                    {
+                        label: '合同号',
+                        prop: "contractNo",
+                        search: true,
+                        searchOrder: 3,
+                        width: "140",
+                        overHidden: true,
+                    },
+                    {
+                        label: '提单号',
+                        prop: "billNoJoin",
+                        search: true,
+                        searchOrder: 4,
+                        width: "140",
+                        overHidden: true,
+                    },
+                    {
+                        label: "业务日期",
+                        prop: "businessDate",
+                        type: "date",
+                        search: true,
+                        searchOrder: 5,
+                        width: "100",
+                        searchProp: "businessDateList",
+                        unlinkPanels: true,
+                        searchRange: true,
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                        overHidden: true,
+                    },
+                    {
+                        label: "状态",
+                        prop: "orderStatus",
+                        search: true,
+                        type: 'select',
+                        dicData: [{
+                            label: '录入',
+                            value: '录入'
+                        }, {
+                            label: '已确认',
+                            value: '已确认'
+                        }],
+                        overHidden: true,
+                    },
+                    {
+                        label: "金额",
+                        prop: "goodsValue",
+                        overHidden: true,
+                    },
+                    {
+                        label: '付汇美元金额',
+                        prop: "paymentInUsd",
+                        width: 160,
+                        overHidden: true,
+                    },
+                    {
+                        label: '当天汇率',
+                        prop: "exchangeRate",
+                        overHidden: true,
+                    },
+                    {
+                        label: '实收金额',
+                        prop: "actualAmount",
+                        overHidden: true,
+                    },
+                    {
+                        label: '邮电费',
+                        prop: "postElectricFee",
+                        overHidden: true,
+                    },
+                    {
+                        label: '手续费',
+                        prop: "serviceCharge",
+                        overHidden: true,
+                    },
+                    {
+                        label: '申报单号',
+                        prop: "declarationNumber",
+                        search: true,
+                        searchOrder: 6,
+                        overHidden: true,
+                    },
+                    {
+                        label: "备注",
+                        prop: "remarks",
+                        overHidden: true
+                    }
+                ]
+            },
+            data: [],
+        };
+    },
+    components: {
+        detailsPage,
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(441), this.optionBack);
+    },
+    activated() {
+        setTimeout(() => {
+            if (this.$route.query.billNo || this.$route.query.params) {
+                this.isShow = false
+                this.$store.commit("IN_FIRSTSET_DETAIL");
+            }
+        }, 100);
+    },
+    methods: {
+        rowEdit(row) {
+            this.detailData = {
+                id: row.id
+            };
+            this.isShow = false
+            this.$store.commit("IN_FIRSTSET_DETAIL");
+        },
+        // 编辑
+        inEdit(row) {
+        },
+        // 删除
+        rowDel(row, index) {
+            this.$confirm("确定将选择数据删除?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                remove({ ids: row.id }).then(res => {
+                    this.onLoad(this.page, this.query);
+                    this.$message.success("成功删除");
+                })
+            })
+
+        },
+        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: "/tradeAgency/firstSettlement/index"
+                });
+            }
+            this.$store.commit("OUT_FIRSTSET_DETAIL");
+            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>
+