|
|
@@ -1,290 +1,550 @@
|
|
|
<!-- @desc:利息管理-锁基差利息管理 @auth:??? @time:----- -->
|
|
|
<template>
|
|
|
- <div class="main-div" ref="mainDiv">
|
|
|
+ <div class="main-div">
|
|
|
+ <!--加载中-->
|
|
|
<loading :loading="loading" v-if="!modalVisible"></loading>
|
|
|
- <!--按钮区-->
|
|
|
- <BaseIndexButtonGroup id="BaseIndexButtonGroup">
|
|
|
- <template #left>
|
|
|
- <!-- 查询 -->
|
|
|
- <BaseIndexButton ref="search" name="search"></BaseIndexButton>
|
|
|
- <!-- 清空条件 -->
|
|
|
- <BaseIndexButton ref="clear" name="clear"></BaseIndexButton>
|
|
|
- <!-- 编辑 -->
|
|
|
- <BaseIndexButton right-button="warehouse-management-edit" ref="edit" name="edit"></BaseIndexButton>
|
|
|
- <!-- 启用 -->
|
|
|
- <BaseIndexButton right-button="warehouse-management-enable" ref="enable" name="enable"></BaseIndexButton>
|
|
|
- <!-- 停用 -->
|
|
|
- <BaseIndexButton right-button="warehouse-management-disable" ref="disable" name="disable"></BaseIndexButton>
|
|
|
- <!-- 导入 -->
|
|
|
- <BaseIndexButton right-button="warehouse-management-import" ref="import" name="import"></BaseIndexButton>
|
|
|
- <!-- 导出 -->
|
|
|
- <BaseIndexButton right-button="warehouse-management-export" ref="export" name="export"></BaseIndexButton>
|
|
|
- </template>
|
|
|
- <template #right>
|
|
|
- <!-- 新建 -->
|
|
|
- <BaseIndexButton right-button="warehouse-management-add" ref="add" name="add"></BaseIndexButton>
|
|
|
- </template>
|
|
|
- </BaseIndexButtonGroup>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 表格部分 -->
|
|
|
- <div :style="'height: ' + tableHeight + 'px'" class="split-div-class">
|
|
|
- <!-- 卡片区 -->
|
|
|
- <div class="index-card">
|
|
|
- <!-- 查询条件区域 -->
|
|
|
- <div id="search-cond-div" ref="search-cond-div" class="search-cond-class">
|
|
|
- <SearchCond ref="searchCond" v-model="searchCond"
|
|
|
- @collapse-change="collapseChange" :setFlag="false"
|
|
|
- :searchContent="searchContent" ></SearchCond>
|
|
|
+ <!-- 页面区域-->
|
|
|
+ <DkCollapse ref="collapse" @on-change="changeCollapse">
|
|
|
+ <DkPanel title="锁基差利息1:计算规则(️ 超期天数 ✖️ 锁基差成本 )" prop="锁基差利息1:计算规则(️ 超期天数 ✖️ 锁基差成本 )" class="tabs-step-class" >
|
|
|
+ <div slot="content">
|
|
|
+ <EditTable
|
|
|
+ ref="contactName1"
|
|
|
+ :height="250"
|
|
|
+ :financeFlag="true"
|
|
|
+ :operateFlag ="false"
|
|
|
+ :pageFlag="true"
|
|
|
+ :pageTotal="pageTotal"
|
|
|
+ v-model="formData.skuData"
|
|
|
+ :columns="editTableColumns"
|
|
|
+ @pageChange="pageSizeChange"
|
|
|
+ ></EditTable>
|
|
|
</div>
|
|
|
+ </DkPanel>
|
|
|
+ <DkPanel prop="批号资源" id="workInformation">
|
|
|
+ <div slot="content">
|
|
|
+ <EditTable
|
|
|
+ ref="contactName1"
|
|
|
+ :height="250"
|
|
|
+ :financeFlag="true"
|
|
|
+ :pageFlag="false"
|
|
|
+ :pageTotal="pageTotal"
|
|
|
+ v-model="formData.skuData1"
|
|
|
+ :columns="editTableColumns1"
|
|
|
+ :childCols="childCols"
|
|
|
+ @pageChange="pageSizeChange"
|
|
|
+ @operate-click="handleOperateClick"
|
|
|
+ ></EditTable>
|
|
|
|
|
|
- <!-- 表格部分 -->
|
|
|
- <DkTable :id="'table-'+$options.name"
|
|
|
- ref="table-select"
|
|
|
- :data="tableData"
|
|
|
- :height="tableHeight-60"
|
|
|
- primaryKey="staffId"
|
|
|
- :multiple="false"
|
|
|
- :choose-flag="false"
|
|
|
- @current-change="currentChangeTable"
|
|
|
- :page-flag="true"
|
|
|
- :page-total="pageInfo.total"
|
|
|
- @pageChange="pageSizeChange"
|
|
|
- :pageSizeOpts="pageSizeOpts"
|
|
|
- :current-page="pageInfo.currentPage"
|
|
|
- :pageSize="pageInfo.pageSize"
|
|
|
- >
|
|
|
- <!-- 商品编号 -->
|
|
|
- <DkTableColumn field="lockBasisOrderNo" title="锁基差单号"></DkTableColumn>
|
|
|
- <!-- 商品名称 -->
|
|
|
- <DkTableColumn field="relatedSalesOrderNo" title="关联销售单号"></DkTableColumn>
|
|
|
- <!-- 规格型号 -->
|
|
|
- <DkTableColumn field="customerName" title="客户名称" ></DkTableColumn>
|
|
|
- <!-- 计量单位 -->
|
|
|
- <DkTableColumn field="lockBasisType" title="锁基差类型"></DkTableColumn>
|
|
|
- <!-- 仓库名称 -->
|
|
|
- <DkTableColumn field="futuresContractCode" title="期货合约代码"></DkTableColumn>
|
|
|
- <!-- 存放货位 -->
|
|
|
- <DkTableColumn field="lockedBasis" title="锁定基差"></DkTableColumn>
|
|
|
- <!-- 供应商 -->
|
|
|
- <DkTableColumn field="lockedPrice" title="锁定价格"></DkTableColumn>
|
|
|
- <!-- 采购人 -->
|
|
|
- <DkTableColumn field="currentFuturesPrice" title="当前期货价"/>
|
|
|
- <!-- 备注 -->
|
|
|
- <DkTableColumn field="lockedQuantity" title="锁定数量"></DkTableColumn>
|
|
|
-
|
|
|
-
|
|
|
- </DkTable>
|
|
|
- </div>
|
|
|
- <!--新建编辑-->
|
|
|
- <DkModal
|
|
|
- :loading="loading"
|
|
|
- v-model="editAddModal"
|
|
|
- ref="modal_editAdd"
|
|
|
- @modalOk="save"
|
|
|
- :saveFlag="true"
|
|
|
- :title="modalTitle"
|
|
|
- @on-visible-change="handleVisibleModal"
|
|
|
- >
|
|
|
- <DkForm ref="dk-form" v-model="formData" :col-count="1">
|
|
|
-
|
|
|
- <DkFormItem prop="remarks" title="锁基差单号" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- <DkFormItem prop="remarks" title="关联销售单号" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- <DkFormItem prop="remarks" title="客户名称" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- <DkFormItem prop="remarks" title="锁基差类型" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- <DkFormItem prop="remarks" title="期货合约代码" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- <DkFormItem prop="remarks" title="锁定基差" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- <DkFormItem prop="remarks" title="锁定价格" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- <DkFormItem prop="remarks" title="当前期货价" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- <DkFormItem prop="remarks" title="锁定数量" v-model="formData.remarks" :readonly="readonly"> </DkFormItem>
|
|
|
- </DkForm>
|
|
|
- </DkModal>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
+ </div>
|
|
|
+ </DkPanel>
|
|
|
|
|
|
|
|
|
+ <!--附件-->
|
|
|
+ <DkPanel prop="files" :right-btns="fileRightBtns" @on-click="handleClickBtn" :readonly="readonly">
|
|
|
+ <div id="search-cond-div-files-info" ref="search-cond-div-files-info"
|
|
|
+ slot="content">
|
|
|
+ <DkPicWall v-model="formData.annexPaths"
|
|
|
+ :table="$config.tables.staff" :accept="$config.uploadFileConfig.acceptPicType"
|
|
|
+ :format="['jpg','jpeg','png']"></DkPicWall>
|
|
|
+ </div>
|
|
|
+ </DkPanel>
|
|
|
+ </DkCollapse>
|
|
|
+ <!-- 下部分按钮区域-->
|
|
|
+ <DkSaveButton ref="saveButton" :loading="loading" :validFormRefs="validFormRefs" @save="saveValidData"
|
|
|
+ @close="close"></DkSaveButton>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
-import {indexMixin} from '@/mixins'
|
|
|
+import {formMixin} from '@/mixins/form'
|
|
|
|
|
|
export default {
|
|
|
- name: 'sales-order-management',
|
|
|
- mixins: [indexMixin],
|
|
|
+ mixins: [formMixin],
|
|
|
data() {
|
|
|
- return {
|
|
|
- tableData : [
|
|
|
- {
|
|
|
- staffId: 1001,
|
|
|
- lockBasisOrderNo: `LBO-20250601-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250601-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `CU2512`, // 假设铜期货合约
|
|
|
- lockedBasis: `${(Math.random() * 50 - 25).toFixed(2)}`, // -25 至 +25 区间
|
|
|
- lockedPrice: `${(48000 + Math.random() * 2000).toFixed(2)}`, // 48000-50000 区间
|
|
|
- currentFuturesPrice: `${(48500 + Math.random() * 1500).toFixed(2)}`, // 48500-50000 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1002,
|
|
|
- lockBasisOrderNo: `LBO-20250602-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250602-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `AL2510`, // 铝期货合约
|
|
|
- lockedBasis: `${(Math.random() * 30 - 15).toFixed(2)}`, // -15 至 +15 区间
|
|
|
- lockedPrice: `${(18000 + Math.random() * 1000).toFixed(2)}`, // 18000-19000 区间
|
|
|
- currentFuturesPrice: `${(18200 + Math.random() * 800).toFixed(2)}`, // 18200-19000 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1003,
|
|
|
- lockBasisOrderNo: `LBO-20250603-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250603-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `RB2511`, // 螺纹钢期货合约
|
|
|
- lockedBasis: `${(Math.random() * 40 - 20).toFixed(2)}`, // -20 至 +20 区间
|
|
|
- lockedPrice: `${(3800 + Math.random() * 200).toFixed(2)}`, // 3800-4000 区间
|
|
|
- currentFuturesPrice: `${(3850 + Math.random() * 150).toFixed(2)}`, // 3850-4000 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1004,
|
|
|
- lockBasisOrderNo: `LBO-20250604-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250604-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `AG2512`, // 白银期货合约
|
|
|
- lockedBasis: `${(Math.random() * 60 - 30).toFixed(2)}`, // -30 至 +30 区间
|
|
|
- lockedPrice: `${(5000 + Math.random() * 300).toFixed(2)}`, // 5000-5300 区间
|
|
|
- currentFuturesPrice: `${(5100 + Math.random() * 200).toFixed(2)}`, // 5100-5300 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1005,
|
|
|
- lockBasisOrderNo: `LBO-20250605-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250605-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `RU2511`, // 橡胶期货合约
|
|
|
- lockedBasis: `${(Math.random() * 50 - 25).toFixed(2)}`, // -25 至 +25 区间
|
|
|
- lockedPrice: `${(12000 + Math.random() * 800).toFixed(2)}`, // 12000-12800 区间
|
|
|
- currentFuturesPrice: `${(12200 + Math.random() * 600).toFixed(2)}`, // 12200-12800 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1006,
|
|
|
- lockBasisOrderNo: `LBO-20250606-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250606-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `ZN2510`, // 锌期货合约
|
|
|
- lockedBasis: `${(Math.random() * 30 - 15).toFixed(2)}`, // -15 至 +15 区间
|
|
|
- lockedPrice: `${(22000 + Math.random() * 1000).toFixed(2)}`, // 22000-23000 区间
|
|
|
- currentFuturesPrice: `${(22300 + Math.random() * 700).toFixed(2)}`, // 22300-23000 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1007,
|
|
|
- lockBasisOrderNo: `LBO-20250607-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250607-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `HC2512`, // 热轧卷板期货合约
|
|
|
- lockedBasis: `${(Math.random() * 40 - 20).toFixed(2)}`, // -20 至 +20 区间
|
|
|
- lockedPrice: `${(3900 + Math.random() * 150).toFixed(2)}`, // 3900-4050 区间
|
|
|
- currentFuturesPrice: `${(3950 + Math.random() * 100).toFixed(2)}`, // 3950-4050 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1008,
|
|
|
- lockBasisOrderNo: `LBO-20250608-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250608-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `NI2511`, // 镍期货合约
|
|
|
- lockedBasis: `${(Math.random() * 60 - 30).toFixed(2)}`, // -30 至 +30 区间
|
|
|
- lockedPrice: `${(180000 + Math.random() * 5000).toFixed(2)}`, // 180000-185000 区间
|
|
|
- currentFuturesPrice: `${(182000 + Math.random() * 3000).toFixed(2)}`, // 182000-185000 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1009,
|
|
|
- lockBasisOrderNo: `LBO-20250609-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250609-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `PB2510`, // 铅期货合约
|
|
|
- lockedBasis: `${(Math.random() * 50 - 25).toFixed(2)}`, // -25 至 +25 区间
|
|
|
- lockedPrice: `${(15000 + Math.random() * 600).toFixed(2)}`, // 15000-15600 区间
|
|
|
- currentFuturesPrice: `${(15200 + Math.random() * 400).toFixed(2)}`, // 15200-15600 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- },
|
|
|
- {
|
|
|
- staffId: 1010,
|
|
|
- lockBasisOrderNo: `LBO-20250610-${Math.random().toString(36).substr(2, 6)}`,
|
|
|
- relatedSalesOrderNo: `SO-20250610-${Math.floor(Math.random() * 10000)}`,
|
|
|
- customerName: `客户${Math.floor(Math.random() * 100 + 1)}`,
|
|
|
- lockBasisType: ['买入保值', '卖出保值'][Math.floor(Math.random() * 2)],
|
|
|
- futuresContractCode: `AU2512`, // 黄金期货合约
|
|
|
- lockedBasis: `${(Math.random() * 80 - 40).toFixed(2)}`, // -40 至 +40 区间
|
|
|
- lockedPrice: `${(450 * 1000 + Math.random() * 20 * 1000).toFixed(2)}`, // 450000-470000 区间(元/千克)
|
|
|
- currentFuturesPrice: `${(460 * 1000 + Math.random() * 10 * 1000).toFixed(2)}`, // 460000-470000 区间
|
|
|
- lockedQuantity: `${Math.floor(Math.random() * 10 + 1)}手`
|
|
|
- }
|
|
|
- ],
|
|
|
- //查询条件
|
|
|
- searchContent: [
|
|
|
- {
|
|
|
- //公司名称
|
|
|
- itemCode: 'cpIds',
|
|
|
- title: '锁基差单号',
|
|
|
-
|
|
|
- required: true
|
|
|
- },
|
|
|
- {
|
|
|
- //员工工号
|
|
|
- itemCode: 'staffCode',
|
|
|
- title: '关联销售单号',
|
|
|
- },
|
|
|
- {
|
|
|
- //员工名称
|
|
|
- itemCode: 'staffName',
|
|
|
- title: '客户名称',
|
|
|
- },
|
|
|
+ let self = this
|
|
|
+ return {
|
|
|
|
|
|
|
|
|
- ],
|
|
|
+ validFormRefs: ['essentialInformation', 'workInformation', 'openAccount'],
|
|
|
+ roleRequiredFlag: true,//角色必填标识
|
|
|
+ hrStatusList: [],
|
|
|
+ // 画面表单数据
|
|
|
+ roleIds: null,//编辑用
|
|
|
+ saveRoleIds: null,//编辑用
|
|
|
formData: {
|
|
|
+ staffId: null,//员工id
|
|
|
staffCode: null,//员工工号
|
|
|
staffName: null,//员工编码
|
|
|
+ staffPhone: null,//联系电话
|
|
|
+ staffCardid: null,//身份证号
|
|
|
+ staffSex: null,//员工性别
|
|
|
+ staffBirthday: null,//出生日期
|
|
|
+ maritalStatus: null,//婚姻状态
|
|
|
+ staffQualification: null,//员工学历
|
|
|
+ emergencyContacts: null,//紧急联系人
|
|
|
+ emergencyContactPhone: null,//紧急联系人电话
|
|
|
+ flgDisability: false,//是否残疾职工
|
|
|
+ staffAddress: null,//员工地址
|
|
|
+ // 附件
|
|
|
+ annexPaths: null,
|
|
|
+ limitEdit: true,//小编辑标识 true不是 false是
|
|
|
+ ctrCpId: self.$store.state.user.ctrCpId,//公司Id
|
|
|
+ ownCpId: self.type === self.$config.formMode.add ? self.$store.state.user.cpId : null,//公司Id
|
|
|
+ ownCpName: self.type === self.$config.formMode.add ? self.$store.state.user.cpName : null,//公司名称
|
|
|
+ orgId: null,//部门Id
|
|
|
+ orgName: null,//部门名称
|
|
|
+ jobId: null,//职位Id
|
|
|
+ postId: null,//岗位Id
|
|
|
+ hrStatus: this.$config.hrStatusSql.onTheJob,//在职状态
|
|
|
+ hrEntryDate: null,//入职日期
|
|
|
+ hrOfficeDate: null,//转正日期
|
|
|
+ hrDepartDate: null,//离职日期
|
|
|
+ bankName: null,//银行名称
|
|
|
+ bankBranch: null,//开户银行
|
|
|
+ bankCardno: null,//银行账号
|
|
|
+ flgApplyOpen: true,//开通账号标识
|
|
|
+ remarks: null,//备注
|
|
|
+
|
|
|
+ openStatus: self.$config.openStatusSql.open,//账号开通状态
|
|
|
+ roleIds: null,//角色Id
|
|
|
+ userPhone: null,//登录账号
|
|
|
+ roleNames: null,//角色名称
|
|
|
+
|
|
|
+ skuData: [
|
|
|
+ { shipmentDate: '2023-12-03', buyer: '销售员小张', seller: '客户张经理', number: 2362,
|
|
|
+ metricWeight: '554.297', amount: '477053.1',contractNumber: '',status: '完成',remarks: '', },
|
|
|
+ { shipmentDate: '2023-12-03', buyer: '销售员小张', seller: '客户张经理', number: 2362,
|
|
|
+ metricWeight: '554.297', amount: '477053.1',contractNumber: '',status: '完成',remarks: '', },
|
|
|
+
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ editTableColumns: [
|
|
|
+ { title:'开货日期', field: 'shipmentDate', type: 'checkbox'},// 商品型号
|
|
|
+ { title:'开货日期', field: 'shipmentDate', type: 'disabled'},// 商品型号
|
|
|
+ { title:'买方',field: 'buyer', type: 'disabled', width: 'auto'},// 商品名称
|
|
|
+ { title:'卖方', field: 'seller', type: 'disabled'},// 商品型号
|
|
|
+ { title:'件数',field: 'number', type: 'number', width: 'auto'},// 商品名称
|
|
|
+ { title:'公重',field: 'metricWeight', type: 'disabled', width: 'auto'},// 商品名称
|
|
|
+ { title:'金额',field: 'amount', type: 'disabled', width: 'auto'},// 商品名称
|
|
|
+ { title:'合同号',field: 'contractNumber', type: 'disabled', width: 'auto'},// 商品名称
|
|
|
+ { title:'状态',field: 'status', type: 'disabled', width: 'auto'},// 商品名称
|
|
|
+ { title:'备注',field: 'remarks', type: 'disabled', width: 'auto'},// 商品名称
|
|
|
+ ],
|
|
|
+ editTableColumns1: [
|
|
|
+ // { field: 'expand', type: 'table', childTableWidth: 1000 },
|
|
|
+ { title:'批号', field: 'skuModel', type: 'disabled'},// 商品型号
|
|
|
+ {
|
|
|
+ title:'公重',
|
|
|
+ field: 'skuCode',
|
|
|
+ controlId: 'invId',
|
|
|
+ type: 'tableSelect',
|
|
|
+ treeNode: true,
|
|
|
+ width: 200,
|
|
|
+ dataType: self.$config.tableSelectType.invGoods,
|
|
|
+ fieldUpdate: self.$updateColumns.outGoodsColumns,
|
|
|
+ searchDetailFlag: true
|
|
|
+ },// 商品编码
|
|
|
+ { title:'起息日', field: 'skuName', type: 'disabled'},// 商品型号
|
|
|
+ { title:'结息日',field: 'whpId', type: 'disabled', width: 'auto'},// 商品名称
|
|
|
+ { title:'计息天数', field: 'skuModel3', type: 'disabled'},// 商品型号
|
|
|
+ { title:'锁基差成本(浮动', field: 'skuModel3', type: 'disabled'},// 商品型号
|
|
|
+ { title:'锁基差利息',field: 'skuNa1me', type: 'disabled', width: 'auto'},// 商品名称
|
|
|
+
|
|
|
+ ],
|
|
|
+ flgDisabilityList: [
|
|
|
+ {dataId: true, dataValue: '点价销售'},
|
|
|
+ {dataId: false, dataValue: '点价销售'}
|
|
|
+ ],//类型
|
|
|
+ sellStaffList: [
|
|
|
+ {dataId: true, dataValue: '销售员小张'},
|
|
|
+ {dataId: false, dataValue: '销售员小李'}
|
|
|
+ ],//销售员
|
|
|
+ buyerList: [
|
|
|
+ {dataId: true, dataValue: '客户张经理'},
|
|
|
+ {dataId: false, dataValue: '客户李经理'}
|
|
|
+ ],//买方
|
|
|
+ sellerList: [
|
|
|
+ {dataId: true, dataValue: '广州雨田'},
|
|
|
+ {dataId: false, dataValue: '郑州嘉丰'}
|
|
|
+ ],//卖方
|
|
|
+ //岗位List
|
|
|
+ jobList: [],
|
|
|
+ //职位List
|
|
|
+ postList: [],
|
|
|
+ rightBtns: [{code: 'auth'}], //开通账号右侧按钮列表
|
|
|
+ //可以编辑标识
|
|
|
+ fileRightBtns: [{code: 'scanCodeUpload'},],//附件右侧按钮
|
|
|
+ //上一次选择的公司
|
|
|
+ lastCp: {
|
|
|
+ cpId: self.type === self.$config.formMode.add ? self.$store.state.user.cpId : null,
|
|
|
+ cpName: self.type === self.$config.formMode.add ? self.$store.state.user.cpName : null
|
|
|
},
|
|
|
+ openAuthFlag: false,//跳转授权页面标识
|
|
|
+ //--------
|
|
|
+ pageTotal: null,
|
|
|
+
|
|
|
+ childCols: [
|
|
|
+ {field: 'skuCode'},
|
|
|
+ {field: 'skuModel', type: 'disabled'},
|
|
|
+ {field: 'skuName', type: 'disabled'},
|
|
|
+ {field: 'amount', title: '变更加价金额', type: 'number'}],
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
/**
|
|
|
- * @desc : 点击预览页当前行
|
|
|
+ * @desc : desc
|
|
|
* @author : 王英杰
|
|
|
- * @date : 2025/5/28 14:41
|
|
|
+ * @date : 2025/6/3 9:55
|
|
|
+ */
|
|
|
+ handleOperateClick(item, row) {
|
|
|
+ let childData = row.childData || []
|
|
|
+ let cRow = {...this.newRow}
|
|
|
+ let num = Math.random()
|
|
|
+ cRow.skuCode = cRow.skuCode + num
|
|
|
+ cRow.skuModel = cRow.skuModel + num
|
|
|
+ cRow.skuName = cRow.skuName + num
|
|
|
+ childData.push(cRow)
|
|
|
+ this.$set(row, 'childData', childData)
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : EditTable 点击事件
|
|
|
+ * @date : 2025/3/5 14:46
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ chooseCompany(e) {
|
|
|
+ if (typeof e != 'object') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (e && this.lastCp) {
|
|
|
+ if (this.formData.orgId || this.formData.roleIds) {
|
|
|
+ this.$IBMessage({
|
|
|
+ content: this.$t('Q_016'),
|
|
|
+ title: this.$t('systemQuestion')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ ok: () => {
|
|
|
+ this.formData.orgId = null
|
|
|
+ this.formData.orgName = null
|
|
|
+ this.formData.roleIds = null
|
|
|
+ this.formData.roleName = null
|
|
|
+ this.lastCp = e
|
|
|
+ },
|
|
|
+ cancel: () => {
|
|
|
+ this.formData.ownCpId = this.lastCp.cpId
|
|
|
+ this.formData.ownCpName = this.lastCp.cpName
|
|
|
+ this.$refs.ownCpId.$refs.prepend.$refs.content.selectedValue = this.lastCp.cpName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.lastCp = e
|
|
|
+ }
|
|
|
+ } else if (!e && this.lastCp) {
|
|
|
+ this.formData.ownCpId = this.lastCp.cpId
|
|
|
+ this.formData.ownCpName = this.lastCp.cpName
|
|
|
+ this.$refs.ownCpId.$refs.prepend.$refs.content.selectedValue = this.lastCp.cpName
|
|
|
+ } else if (e && !this.lastCp) {
|
|
|
+ this.lastCp = e
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : DkPanel组件右侧按钮点击回调
|
|
|
+ * @date : 2024/11/14 15:22
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ handleClickBtn(e) {
|
|
|
+ switch (e.code) {
|
|
|
+ // 扫码上传
|
|
|
+ case 'scanCodeUpload':
|
|
|
+ let data = [{
|
|
|
+ title: this.$t('files'),
|
|
|
+ code: 'annexPaths'
|
|
|
+ }]
|
|
|
+ // 开启扫码上传
|
|
|
+ this.openWxUpload('staff', data)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 加载数据
|
|
|
+ * @date : 2024/3/14 8:47
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ initData() {
|
|
|
+ //获取岗位
|
|
|
+ this.getJob()
|
|
|
+ //获取职位
|
|
|
+ this.getPost()
|
|
|
+ },
|
|
|
+ //获取岗位
|
|
|
+ getJob() {
|
|
|
+ let params = {
|
|
|
+ cpId: this.formData.ownCpdId ? this.formData.ownCpdId : this.$store.state.user.cpId
|
|
|
+ }
|
|
|
+ return this.excute(this.$service.commonService, this.$service.commonService.getJob, params).then(res => {
|
|
|
+ this.jobList = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取职位
|
|
|
+ getPost() {
|
|
|
+ let params = {
|
|
|
+ cpId: this.formData.ownCpdId ? this.formData.ownCpdId : this.$store.state.user.cpId
|
|
|
+ }
|
|
|
+ return this.excute(this.$service.commonService, this.$service.commonService.getPost, params).then(res => {
|
|
|
+ this.postList = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 基础信息员工电话失焦事件
|
|
|
+ * @date : 2024/10/17 9:46
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ onBlurStaffPhone(e) {
|
|
|
+ if (e && e.target.value) {
|
|
|
+ this.formData.userPhone = this.formData.staffPhone
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 身份证变化事件
|
|
|
+ * @author : 洪旭东
|
|
|
+ * @date : 2025-03-07 16:39
|
|
|
+ */
|
|
|
+ changeStaffCardid(e) {
|
|
|
+ // 身份证校验, 替换e中非数字和字母
|
|
|
+ this.formData.staffCardid = e.target.value.replace(/[^0-9a-zA-Z]/g, '')
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 申请账号标识改变事件
|
|
|
+ * @date : 2025/2/17 9:07
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ changeFlgApplyOpen(value) {
|
|
|
+ //账号开通状态-已开通
|
|
|
+ if (this.formData.openStatus && value) {
|
|
|
+ this.formData.openStatus = this.$config.openStatusSql.open
|
|
|
+ this.roleRequiredFlag = true
|
|
|
+ }
|
|
|
+ //账号开通状态-未开通
|
|
|
+ else if (this.formData.openStatus && !value) {
|
|
|
+ this.formData.openStatus = this.$config.openStatusSql.notActivated
|
|
|
+ this.formData.roleIds = []
|
|
|
+ this.formData.roleName = null
|
|
|
+ this.roleRequiredFlag = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 账号开通状态 选择事件
|
|
|
+ * @date : 2024/10/17 10:32
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ changeOpenStatus(value) {
|
|
|
+ this.formData.openStatus = value.kindCode
|
|
|
+ if (this.formData.openStatus === this.$config.openStatusSql.notActivated) {
|
|
|
+ this.roleRequiredFlag = false
|
|
|
+ this.formData.roleIds = null
|
|
|
+ this.formData.roleName = null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 选择角色事件
|
|
|
+ * @date : 2024/10/29 9:50
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ chooseRoles(e) {
|
|
|
+ if (e && e.length > 0) {
|
|
|
+ this.formData.roleNames = e.map(map => map.roleName).toString()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 保存校验
|
|
|
+ * @date : 2025/4/24 15:41
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ saveValidData() {
|
|
|
+ if (this.type === this.$config.formMode.edit) {
|
|
|
+ this.saveRoleIds = this.formData.roleIds
|
|
|
+ let isEqual = this.areArraysEqual(this.saveRoleIds, this.roleIds)
|
|
|
+ if (!isEqual) {
|
|
|
+ this.$IBMessage({
|
|
|
+ content: this.$t('Q_002', {'param': this.$v('changeRole')})
|
|
|
+ + '\n ' + this.$t('W_209'),
|
|
|
+ title: this.$t('systemQuestion')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ ok: () => {
|
|
|
+ this.save()
|
|
|
+ },
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.save()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.save()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ validData() {
|
|
|
+ //入职日期不能大于转正日期
|
|
|
+ if (this.formData.hrEntryDate && this.formData.hrOfficeDate) {
|
|
|
+ let entryDate = this.formData.hrEntryDate.getTime()
|
|
|
+ let officeDate = this.formData.hrOfficeDate.getTime()
|
|
|
+ if (entryDate > officeDate) {
|
|
|
+ this.$Message.warning(this.$t('W_112'))
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 参数赋值
|
|
|
+ * @date : 2024/3/14 10:36
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ setParams() {
|
|
|
+ let params = JSON.parse(JSON.stringify(this.formData))
|
|
|
+ // params = Object.assign(this.formData,this.formData, this.formData)
|
|
|
+ //开通标识为true 开通状态为空
|
|
|
+ if (params.flgApplyOpen && params.openStatus == null) {
|
|
|
+ //未开通
|
|
|
+ params.openStatus = this.$config.openStatus.noOpenAccount
|
|
|
+ }
|
|
|
+ //开通状态
|
|
|
+ if (!params.flgApplyOpen && params.openStatus == null) {
|
|
|
+ //未开通
|
|
|
+ params.openStatus = this.$config.openStatus.noOpenAccount
|
|
|
+ }
|
|
|
+ //员工生日
|
|
|
+ if (params.staffBirthday) {
|
|
|
+ params.staffBirthday = new Date(params.staffBirthday).format('yyyy-MM-dd')
|
|
|
+ }
|
|
|
+ //入职日期
|
|
|
+ if (params.hrEntryDate) {
|
|
|
+ params.hrEntryDate = new Date(params.hrEntryDate).format('yyyy-MM-dd')
|
|
|
+ }
|
|
|
+ //转正日期
|
|
|
+ if (params.hrOfficeDate) {
|
|
|
+ params.hrOfficeDate = new Date(params.hrOfficeDate).format('yyyy-MM-dd')
|
|
|
+ }
|
|
|
+ //离职日期
|
|
|
+ if (params.hrDepartDate) {
|
|
|
+ params.hrDepartDate = new Date(params.hrDepartDate).format('yyyy-MM-dd')
|
|
|
+ }
|
|
|
+ this.params = params;
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 保存数据
|
|
|
+ * @date : 2024/3/14 10:32
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ saveData() {
|
|
|
+ //测试留档,等待测试通过后删除
|
|
|
+ console.log("保存数据", this.params)
|
|
|
+ //新建
|
|
|
+ if (this.type === this.$config.formMode.add || this.type === this.$config.formMode.copy) {
|
|
|
+ return this.excute(this.$service.staffService, this.$service.staffService.insert, this.params)
|
|
|
+ }
|
|
|
+ //编辑
|
|
|
+ else if (this.type === this.$config.formMode.edit) {
|
|
|
+ return this.excute(this.$service.staffService, this.$service.staffService.update, this.params)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 保存完毕后清空窗体
|
|
|
+ * @date : 2024/3/14 13:53
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ clear() {
|
|
|
+ this.$refs['essentialInformation'].resetFields()
|
|
|
+ this.$refs['workInformation'].resetFields()
|
|
|
+ this.$refs['openAccount'].resetFields()
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 通过id查询
|
|
|
+ * @date : 2024/3/14 16:29
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ detail(id) {
|
|
|
+ return this.excuteNoParam(this.$service.staffService, this.$service.staffService.selectById, [id], false);
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 编辑页面赋值
|
|
|
+ * @date : 2024/3/14 16:42
|
|
|
+ * @author : 寇珊珊
|
|
|
*/
|
|
|
- currentChangeTable(e) {
|
|
|
- if (e && e.row) {
|
|
|
- this.row = e
|
|
|
+ setValuesByEdit(data) {
|
|
|
+ if (data) {
|
|
|
+ this.formData = data
|
|
|
+ this.roleIds = data.roleIds
|
|
|
+ }
|
|
|
+ if (this.type === this.$config.formMode.copy) {
|
|
|
+ this.formData.staffCode = this.$t('codeRemark')
|
|
|
+ this.formData.staffId = null
|
|
|
+ this.formData.userId = null
|
|
|
}
|
|
|
},
|
|
|
+ /**
|
|
|
+ * @desc : 账号授权
|
|
|
+ * @date : 2024/10/17 11:42
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ rightBtnsClick() {
|
|
|
+ //开通账号未开通
|
|
|
+ if (this.formData.openStatus === this.$config.openStatusSql.notActivated) {
|
|
|
+ this.$Message.error(this.$t('W_155'))
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //调用保存
|
|
|
+ if (this.$refs.saveButton && this.$refs.saveButton.$refs.save) {
|
|
|
+ this.openAuthFlag = true
|
|
|
+ this.$refs.saveButton.$refs.save[0].$el.click();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 保存后后续操作方法
|
|
|
+ * @date : 2024/10/29 11:36
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ areArraysEqual(arr1, arr2) {
|
|
|
+ if (arr1.length !== arr2.length) return false;
|
|
|
+ return JSON.stringify([...arr1].sort()) === JSON.stringify([...arr2].sort());
|
|
|
+ },
|
|
|
+ handleSaveData(data) {
|
|
|
+ //false 不一致
|
|
|
+ let isEqual = this.areArraysEqual(this.saveRoleIds, this.roleIds)
|
|
|
+ if (this.openAuthFlag || !isEqual) {
|
|
|
+ if (data) {
|
|
|
+ this.openAuthFlag = false
|
|
|
+ let params = {
|
|
|
+ id: data.staffId,
|
|
|
+ roleIds: data.roleIds
|
|
|
+ }
|
|
|
+ //打开员工授权页面
|
|
|
+ this.open(this.$config.routeUrl[this.routeObjName]['auth'], params)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
+ this.focusItem = 'staffId'; // 给第一个组件赋值,可以在混入中自动去聚焦
|
|
|
this.primaryKey = 'staffId' // 设置主键Id
|
|
|
- this.routeObjName = 'lockBdiManagement' // 设置路由名称
|
|
|
+ //设置默认值
|
|
|
+ this.routeObjName = 'staff' // 设置路由名称
|
|
|
+ this.formData.staffCode = this.$t('codeRemark')
|
|
|
+ this.resizeTableFlag = true // 开启计算高度
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+ mounted() {
|
|
|
+ //添加身份证校验
|
|
|
+ const validateIdno = (rule, value, callback) => {
|
|
|
+ if (value && value.length != 18) {
|
|
|
+ callback(new Error(this.$t('W_072', {'param1': this.$t('staffCardid'), "param2": "18"})));
|
|
|
+ }
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ this.$refs.essentialInformation.setItemRule({prop: 'staffCardid', rule: {validator: validateIdno, trigger: 'blur'}})
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
+<style>
|
|
|
+
|
|
|
+</style>
|
|
|
+
|