wangyingjie 10 месяцев назад
Родитель
Сommit
6e2af4488f

+ 1 - 1
src/api/pages/mst/sales-management/sales-order-management/basisSalesOrder.js

@@ -18,6 +18,6 @@ export default {
     */
 export const routeUrl = {
   basisSalesOrder:{
-    add: {key: 'add', method:'add',isMustChooseFlag:true},
+    add: {key: 'add',routeName:'basis-sales-order-add'},
   }
 }

+ 1 - 1
src/api/pages/mst/sales-management/sales-order-management/ortherSalesOrder.js

@@ -18,6 +18,6 @@ export default {
     */
 export const routeUrl = {
   ortherSalesOrder:{
-    add: {key: 'add', method:'add',isMustChooseFlag:true},
+    add: {key: 'add',routeName:'orther-sales-order-add'},
   }
 }

+ 23 - 0
src/router/routers.js

@@ -625,6 +625,17 @@ let menu = [
             },
           },
           {
+            path: '/mst/sales-management/sales-order-management/basis-sales-order/add',
+            name: 'basis-sales-order-add',
+            component: () => import('@/view/mst/sales-management/sales-order-management/basis-sales-order/add.vue'),
+            meta: {
+              title: '新建基差销售单',
+              notCache: false,
+              flgRight: true,
+              menuType:2
+            },
+          },
+          {
             path: '/mst/sales-management/sales-order-management/orther-sales-order/index',
             name: 'orther-sales-order',
             component: () => import('@/view/mst/sales-management/sales-order-management/orther-sales-order/index.vue'),
@@ -636,6 +647,18 @@ let menu = [
               menuType:1
             },
           },
+          {
+            path: '/mst/sales-management/sales-order-management/orther-sales-order/add',
+            name: 'orther-sales-order-add',
+            component: () => import('@/view/mst/sales-management/sales-order-management/orther-sales-order/add.vue'),
+            menuType:1,
+            meta: {
+              title: '新建其它销售单',
+              notCache: false,
+              flgRight: true,
+              menuType:1
+            },
+          },
 
         ]
       },

+ 18 - 0
src/view/mst/sales-management/sales-order-management/basis-sales-order/add.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm type="add"></CommonForm>
+</template>
+
+<script>
+import CommonForm from "./form";
+
+export default {
+  name: "basis-sales-order-add",
+  components: {
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 18 - 0
src/view/mst/sales-management/sales-order-management/basis-sales-order/edit.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm type="edit"></CommonForm>
+</template>
+
+<script>
+import CommonForm from "./form";
+
+export default {
+  name: "basis-sales-order-edit",
+  components: {
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 566 - 0
src/view/mst/sales-management/sales-order-management/basis-sales-order/form.vue

@@ -0,0 +1,566 @@
+<!-- @desc:其他销售单 @auth:王英杰 @time :2025年6月3日 -->
+<template>
+  <div class="main-div">
+    <!--加载中-->
+    <loading :loading="loading" v-if="!modalVisible"></loading>
+    <!-- 页面区域-->
+    <DkCollapse ref="collapse" @on-change="changeCollapse">
+      <!--基本信息-->
+      <DkPanel prop="essentialInformation" id="essentialInformation">
+        <DkForm slot="content" ref="essentialInformation" v-model="formData" style="width:100%" :colCount="4">
+
+          <!--合同编号-->
+          <DkFormItem title="合同编号" prop="staffName" :required="true" v-model="formData.staffName"
+                      :readonly="readonly"></DkFormItem>
+
+          <!--开货日期-->
+          <DkFormItem title="开货日期" prop="staffBirthday" v-model="formData.staffBirthday" :readonly="readonly"
+                      :type="$config.formItemType.date" :dataType="$config.formItemType.date">
+          </DkFormItem>
+
+          <!-- 类型 -->
+          <DkFormItem prop="flgDisabilityName" title="类型" v-model="formData.flgDisability" :readonly="readonly"
+                      :type="$config.formItemType.select" :option-list="flgDisabilityList" :dataType="'boolean'"
+                      :multiple="false" labelKey="dataValue" valueKey="dataId">
+          </DkFormItem>
+
+          <!-- 销售员 -->
+          <DkFormItem prop="flgDisabilityName" title="销售员" v-model="formData.flgDisability" :readonly="readonly"
+                      :type="$config.formItemType.select" :option-list="sellStaffList" :dataType="'boolean'"
+                      :multiple="false" labelKey="dataValue" valueKey="dataId">
+          </DkFormItem>
+
+          <!-- 买方 -->
+          <DkFormItem prop="flgDisabilityName" title="买方" v-model="formData.flgDisability" :readonly="readonly"
+                      :type="$config.formItemType.select" :option-list="buyerList" :dataType="'boolean'"
+                      :multiple="false" labelKey="dataValue" valueKey="dataId">
+          </DkFormItem>
+
+          <!-- 卖方 -->
+          <DkFormItem prop="flgDisabilityName" title="卖方" v-model="formData.flgDisability" :readonly="readonly"
+                      :type="$config.formItemType.select" :option-list="sellerList" :dataType="'boolean'"
+                      :multiple="false" labelKey="dataValue" valueKey="dataId">
+          </DkFormItem>
+          <!-- 金额合计 -->
+          <DkFormItem title="金额合计" prop="金额合计"  :dataType="$config.dataType.number"  v-model="formData.staffAddress" :readonly="readonly"></DkFormItem>
+
+          <!-- 件数合计 -->
+          <DkFormItem title="件数合计" prop="件数合计"  :dataType="$config.dataType.number"  v-model="formData.staffAddress" :readonly="readonly"></DkFormItem>
+          <!-- 重量合计 -->
+          <DkFormItem title="重量合计" prop="重量合计"  :dataType="$config.dataType.number"  v-model="formData.staffAddress" :readonly="readonly"></DkFormItem>
+
+          <!-- 利息 -->
+          <DkFormItem title="利息" prop="利息"  :dataType="$config.dataType.number"  v-model="formData.staffAddress" :readonly="readonly"></DkFormItem>
+        </DkForm>
+      </DkPanel>
+      <!--销售资源-->
+      <DkPanel prop="销售资源" id="workInformation">
+        <div slot="content">
+          <EditTable
+            ref="contactName1"
+            :height="300"
+            :financeFlag="true"
+            :pageFlag="true"
+            :pageTotal="pageTotal"
+            v-model="formData.skuData"
+            :columns="editTableColumns"
+            :childCols="childCols"
+            @pageChange="pageSizeChange"
+            @operate-click="handleOperateClick"
+          ></EditTable>
+
+        </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 {formMixin} from '@/mixins/form'
+
+export default {
+  mixins: [formMixin],
+  data() {
+    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,//角色名称
+      },
+      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,
+      editTableColumns: [
+        // { field: 'expand', type: 'table', childTableWidth: 1000 },
+        {  title:'品类', field: 'skuModel', type: 'disabled'},// 商品型号
+        {field: 'nonstdParamsShow', title:'当前仓库',  type: 'select', width: '300px', required: true},
+        {
+          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: 'skuNam1e', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'点单价',field: 'skuNa1me', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'基差',field: 'sk1uName1', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'运费',field: 'skuN11ame', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'结算单价',field: 'sk22uName', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'结算金额',field: '33', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'利息',field: '44', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'备注',field: '44', type: 'disabled', width: 'auto'},// 商品名称
+      ],
+
+      childCols: [
+        {field: 'skuCode'},
+        {field: 'skuModel', type: 'disabled'},
+        {field: 'skuName', type: 'disabled'},
+        {field: 'amount', title: '变更加价金额', type: 'number'}],
+    }
+  },
+  methods: {
+
+    /**
+     * @desc   : desc
+     * @author : 王英杰
+     * @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 : 寇珊珊
+     */
+    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 = 'staff'  // 设置路由名称
+    this.formData.staffCode = this.$t('codeRemark')
+  },
+  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>

+ 12 - 33
src/view/mst/sales-management/sales-order-management/basis-sales-order/index.vue

@@ -22,7 +22,7 @@
       </template>
       <template #right>
         <!--   新建     -->
-        <BaseIndexButton right-button="warehouse-management-add" ref="add" name="add"></BaseIndexButton>
+        <BaseIndexButton right-button="basis-sales-order-add" ref="add" name="add"></BaseIndexButton>
       </template>
     </BaseIndexButtonGroup>
 
@@ -55,51 +55,29 @@
                  :pageSize="pageInfo.pageSize"
         >
           <!--  商品编号  -->
-          <DkTableColumn field="ownCpName" title="基差单号"></DkTableColumn>
+          <DkTableColumn field="ownCpName" title="合同编号"></DkTableColumn>
           <!--  商品名称  -->
-          <DkTableColumn field="staffCode" title="交易类型"></DkTableColumn>
+          <DkTableColumn field="staffCode" title="开货日期"></DkTableColumn>
           <!--  规格型号  -->
-          <DkTableColumn field="staffName" type="link" title="点价类型"
+          <DkTableColumn field="staffName" type="link" title="类型"
                          @on-link="handleLink(Object.assign($event,{button:'edit'}))"></DkTableColumn>
           <!--  计量单位  -->
-          <DkTableColumn field="staffPhone"   title="期货合约关联"></DkTableColumn>
+          <DkTableColumn field="staffPhone"   title="销售员"></DkTableColumn>
           <!--  仓库名称  -->
-          <DkTableColumn field="orgName"  title="基差价格"></DkTableColumn>
+          <DkTableColumn field="orgName"  title="买方"></DkTableColumn>
           <!--  存放货位  -->
-          <DkTableColumn field="postName" title="点价有效期"></DkTableColumn>
+          <DkTableColumn field="postName" title="卖方"></DkTableColumn>
           <!--  供应商  -->
-          <DkTableColumn field="jobName" title="点价状态"></DkTableColumn>
+          <DkTableColumn field="jobName" title="金额合计"></DkTableColumn>
           <!--  采购人  -->
-          <DkTableColumn field="openStatusName" title="现货价格计算"/>
+          <DkTableColumn field="openStatusName" title="件数合计"/>
           <!--  备注  -->
-          <DkTableColumn field="roleName" title="履约保证金"></DkTableColumn>
+          <DkTableColumn field="roleName" title="重复合计"></DkTableColumn>
+          <DkTableColumn field="roleName" 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>
 
 
@@ -143,6 +121,7 @@ export default {
         staffCode: null,//员工工号
         staffName: null,//员工编码
       },
+
     }
   },
   methods: {

+ 18 - 0
src/view/mst/sales-management/sales-order-management/orther-sales-order/add.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm type="add"></CommonForm>
+</template>
+
+<script>
+import CommonForm from "./form";
+
+export default {
+  name: "staff-add",
+  components: {
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 18 - 0
src/view/mst/sales-management/sales-order-management/orther-sales-order/edit.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm type="edit"></CommonForm>
+</template>
+
+<script>
+import CommonForm from "./form";
+
+export default {
+  name: "staff-edit",
+  components: {
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 566 - 0
src/view/mst/sales-management/sales-order-management/orther-sales-order/form.vue

@@ -0,0 +1,566 @@
+<!-- @desc:基差销售单 @auth:王英杰 @time :2025年6月3日 -->
+<template>
+  <div class="main-div">
+    <!--加载中-->
+    <loading :loading="loading" v-if="!modalVisible"></loading>
+    <!-- 页面区域-->
+    <DkCollapse ref="collapse" @on-change="changeCollapse">
+      <!--基本信息-->
+      <DkPanel prop="essentialInformation" id="essentialInformation">
+        <DkForm slot="content" ref="essentialInformation" v-model="formData" style="width:100%" :colCount="4">
+
+          <!--合同编号-->
+          <DkFormItem title="合同编号" prop="staffName" :required="true" v-model="formData.staffName"
+                      :readonly="readonly"></DkFormItem>
+
+          <!--开货日期-->
+          <DkFormItem title="开货日期" prop="staffBirthday" v-model="formData.staffBirthday" :readonly="readonly"
+                      :type="$config.formItemType.date" :dataType="$config.formItemType.date">
+          </DkFormItem>
+
+          <!-- 类型 -->
+          <DkFormItem prop="flgDisabilityName" title="类型" v-model="formData.flgDisability" :readonly="readonly"
+                      :type="$config.formItemType.select" :option-list="flgDisabilityList" :dataType="'boolean'"
+                      :multiple="false" labelKey="dataValue" valueKey="dataId">
+          </DkFormItem>
+
+          <!-- 销售员 -->
+          <DkFormItem prop="flgDisabilityName" title="销售员" v-model="formData.flgDisability" :readonly="readonly"
+                      :type="$config.formItemType.select" :option-list="sellStaffList" :dataType="'boolean'"
+                      :multiple="false" labelKey="dataValue" valueKey="dataId">
+          </DkFormItem>
+
+          <!-- 买方 -->
+          <DkFormItem prop="flgDisabilityName" title="买方" v-model="formData.flgDisability" :readonly="readonly"
+                      :type="$config.formItemType.select" :option-list="buyerList" :dataType="'boolean'"
+                      :multiple="false" labelKey="dataValue" valueKey="dataId">
+          </DkFormItem>
+
+          <!-- 卖方 -->
+          <DkFormItem prop="flgDisabilityName" title="卖方" v-model="formData.flgDisability" :readonly="readonly"
+                      :type="$config.formItemType.select" :option-list="sellerList" :dataType="'boolean'"
+                      :multiple="false" labelKey="dataValue" valueKey="dataId">
+          </DkFormItem>
+          <!-- 金额合计 -->
+          <DkFormItem title="金额合计" prop="金额合计"  :dataType="$config.dataType.number"  v-model="formData.staffAddress" :readonly="readonly"></DkFormItem>
+
+          <!-- 件数合计 -->
+          <DkFormItem title="件数合计" prop="件数合计"  :dataType="$config.dataType.number"  v-model="formData.staffAddress" :readonly="readonly"></DkFormItem>
+          <!-- 重量合计 -->
+          <DkFormItem title="重量合计" prop="重量合计"  :dataType="$config.dataType.number"  v-model="formData.staffAddress" :readonly="readonly"></DkFormItem>
+
+          <!-- 利息 -->
+          <DkFormItem title="利息" prop="利息"  :dataType="$config.dataType.number"  v-model="formData.staffAddress" :readonly="readonly"></DkFormItem>
+        </DkForm>
+      </DkPanel>
+      <!--销售资源-->
+      <DkPanel prop="销售资源" id="workInformation">
+        <div slot="content">
+          <EditTable
+            ref="contactName1"
+            :height="300"
+            :financeFlag="true"
+            :pageFlag="true"
+            :pageTotal="pageTotal"
+            v-model="formData.skuData"
+            :columns="editTableColumns"
+            :childCols="childCols"
+            @pageChange="pageSizeChange"
+            @operate-click="handleOperateClick"
+          ></EditTable>
+
+        </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 {formMixin} from '@/mixins/form'
+
+export default {
+  mixins: [formMixin],
+  data() {
+    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,//角色名称
+      },
+      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,
+      editTableColumns: [
+        // { field: 'expand', type: 'table', childTableWidth: 1000 },
+        {  title:'品类', field: 'skuModel', type: 'disabled'},// 商品型号
+        {field: 'nonstdParamsShow', title:'当前仓库',  type: 'select', width: '300px', required: true},
+        {
+          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: 'skuNam1e', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'点单价',field: 'skuNa1me', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'基差',field: 'sk1uName1', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'运费',field: 'skuN11ame', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'结算单价',field: 'sk22uName', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'结算金额',field: '33', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'利息',field: '44', type: 'disabled', width: 'auto'},// 商品名称
+        {  title:'备注',field: '44', type: 'disabled', width: 'auto'},// 商品名称
+      ],
+
+      childCols: [
+        {field: 'skuCode'},
+        {field: 'skuModel', type: 'disabled'},
+        {field: 'skuName', type: 'disabled'},
+        {field: 'amount', title: '变更加价金额', type: 'number'}],
+    }
+  },
+  methods: {
+
+    /**
+     * @desc   : desc
+     * @author : 王英杰
+     * @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 : 寇珊珊
+     */
+    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 = 'staff'  // 设置路由名称
+    this.formData.staffCode = this.$t('codeRemark')
+  },
+  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>