Quellcode durchsuchen

森语-质量事故单

jbb vor 2 Jahren
Ursprung
Commit
db34915d75

+ 24 - 3
src/views/oa/IncidentTicketList.vue

@@ -97,7 +97,9 @@
         </template>
 
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
+          <a @click="handleEdit(record,'edit')">编辑</a>
+          <a-divider type="vertical" />
+          <a @click="handleEdit(record,'detail')">详情</a>
 <!-- 
           <a-divider type="vertical" />
           <a-dropdown>
@@ -115,7 +117,9 @@
       </a-table>
     </div>
 
-    <incidentTicket-modal ref="modalForm" @ok="modalFormOk"></incidentTicket-modal>
+    
+    <incidentTicket-modal ref="modalForm" @ok="modalFormOk" @close='loadData'></incidentTicket-modal>
+    <incidentTicket-modal-detail ref="IncidentTicketModalDetail" @ok="modalFormOk" @close='loadData'></incidentTicket-modal-detail>
   </a-card>
 </template>
 
@@ -123,15 +127,18 @@
 
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import IncidentTicketModal from './modules/IncidentTicketModal'
+  import IncidentTicketModalDetail from './modules/IncidentTicketModalDetail'
   import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
   import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
 
+
   export default {
     name: "IncidentTicketList",
     mixins:[JeecgListMixin],
     components: {
       JDictSelectTag,
-      IncidentTicketModal
+      IncidentTicketModal,
+      IncidentTicketModalDetail
     },
     data () {
       return {
@@ -183,8 +190,12 @@
           importExcelUrl: "oa/incidentTicket/importExcel",
         },
         dictOptions:{},
+        dataSource:[]
       }
     },
+    created(){
+      this.dataSource.push({accidentTheme:''})
+    },
     computed: {
       importExcelUrl: function(){
         return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
@@ -192,6 +203,16 @@
     },
     methods: {
       initDictConfig(){
+      },
+      handleEdit(record,data){
+        if(data =='edit'){
+            this.$refs.modalForm.visible = true
+            this.$refs.modalForm.getHeaderList(record.id)
+            // this.$refs.modalForm.defultMethods = 'edit'
+        }else{
+          this.$refs.IncidentTicketModalDetail.visible = true
+            this.$refs.IncidentTicketModalDetail.getHeaderList(record.id)
+        }
       }
        
     }

+ 213 - 318
src/views/oa/modules/IncidentTicketModal.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal
-    :title="title"
-    :width="1200"
+    title="编辑"
+    width="85%"
     :visible="visible"
     :maskClosable="false"
     :confirmLoading="confirmLoading"
@@ -9,217 +9,65 @@
     @cancel="handleCancel">
     <a-spin :spinning="confirmLoading">
       <!-- 主表单区域 -->
-      <a-form :form="form">
-        <a-row>
-
-          <a-col :span="12">
-            <a-form-item label="日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'accidentData', validatorRules.accidentData]" placeholder="请输入日期"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="质量事故单主题" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'accidentTheme', validatorRules.accidentTheme]" placeholder="请输入质量事故单主题"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="事故责任人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'accidentPersonLiable', validatorRules.accidentPersonLiable]" placeholder="请输入事故责任人"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'supplier', validatorRules.supplier]" placeholder="请输入供应商"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'personLiable', validatorRules.personLiable]" placeholder="请输入责任人"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="质量事故单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'accidentNumber', validatorRules.accidentNumber]" placeholder="请输入质量事故单号"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'customer', validatorRules.customer]" placeholder="请输入客户"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="工厂" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'factory', validatorRules.factory]" placeholder="请输入工厂"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="责任人1" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'responsibilityPerson1', validatorRules.responsibilityPerson1]" placeholder="请输入责任人1"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="责任人2" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'responsibilityPerson2', validatorRules.responsibilityPerson2]" placeholder="请输入责任人2"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="责任人3" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'responsibilityPerson3', validatorRules.responsibilityPerson3]" placeholder="请输入责任人3"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="责任人4" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'responsibilityPerson4', validatorRules.responsibilityPerson4]" placeholder="请输入责任人4"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="责任人5" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'responsibilityPerson5', validatorRules.responsibilityPerson5]" placeholder="请输入责任人5"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="金额1" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'sum1', validatorRules.sum1]" placeholder="请输入金额1"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="金额2" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'sum2', validatorRules.sum2]" placeholder="请输入金额2"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="金额3" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'sum3', validatorRules.sum3]" placeholder="请输入金额3"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="金额4" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'sum4', validatorRules.sum4]" placeholder="请输入金额4"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="金额5" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'sum5', validatorRules.sum5]" placeholder="请输入金额5"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="责任单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'responsibilityCompany', validatorRules.responsibilityCompany]" placeholder="请输入责任单位"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="币种" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'moneyType', validatorRules.moneyType]" placeholder="请输入币种"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="总金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'totalMoney', validatorRules.totalMoney]" placeholder="请输入总金额"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="业务类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'businessType', validatorRules.businessType]" placeholder="请输入业务类型"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="成衣销售订单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'garmentSalesOrder', validatorRules.garmentSalesOrder]" placeholder="请输入成衣销售订单号"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="款号" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'styleNumber', validatorRules.styleNumber]" placeholder="请输入款号"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="物料" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'material', validatorRules.material]" placeholder="请输入物料"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="计划员" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'planPersonnel', validatorRules.planPersonnel]" placeholder="请输入计划员"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="业务员" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <j-dict-select-tag type="list" v-decorator="['businessPeople', validatorRules.businessPeople]" :trigger-change="true" dictCode="sys_user,realname,username" placeholder="请选择业务员"/>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="QC" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'qualityControl', validatorRules.qualityControl]" placeholder="请输入QC"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="计划单号(主)" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'planNumber', validatorRules.planNumber]" placeholder="请输入计划单号(主)"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="事故类型(主)" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'accidentType', validatorRules.accidentType]" placeholder="请输入事故类型(主)"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="事故金额(主)" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'accidentSum', validatorRules.accidentSum]" placeholder="请输入事故金额(主)"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="情况说明" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'presentationCondition', validatorRules.presentationCondition]" placeholder="请输入情况说明"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="附件上传" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'accessory', validatorRules.accessory]" placeholder="请输入附件上传"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="填报人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <j-dict-select-tag type="list" v-decorator="['informant', validatorRules.informant]" :trigger-change="true" dictCode="sys_user ,realname,username" placeholder="请选择填报人"/>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="工厂签章" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'factorySignature', validatorRules.factorySignature]" placeholder="请输入工厂签章"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="财务备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'financeRemark', validatorRules.financeRemark]" placeholder="请输入财务备注"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="添加附件" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'accessory2', validatorRules.accessory2]" placeholder="请输入添加附件"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="是否部门负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'isLeaders', validatorRules.isLeaders]" placeholder="请输入是否部门负责人"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="森_工厂质量事故单(子)" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'incidentTicketId', validatorRules.incidentTicketId]" placeholder="请输入森_工厂质量事故单(子)"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="子表控件" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="[ 'tableNameChildren', validatorRules.tableNameChildren]" placeholder="请输入子表控件"></a-input>
-            </a-form-item>
-          </a-col>
+      <div class="table-page-search-wrapper">
+        
 
-        </a-row>
-      </a-form>
 
       <!-- 子表单区域 -->
-      <a-tabs v-model="activeKey" @change="handleChangeTabs">
-        <a-tab-pane tab="森_工厂质量事故单-子表" :key="refKeys[0]" :forceRender="true">
-          <j-editable-table
+          <!-- <a-button type="primary"  @click="addList" style="margin-bottom: 1%;">增行</a-button> -->
+          <a-table
+           bordered
+          :columns="incidentTicketChildrenTable.columns"
+          :data-source="incidentTicketChildrenTable.dataSource"
+         :loading="incidentTicketChildrenTable.loading"
+         :scroll="{x: 2000,y:300 }"
+          :pagination="false"
+            >
+          <!-- 汇率 -->
+          <span slot="exchangeRate" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.exchangeRate" />
+          </span>
+           <!-- 实际事故金额 -->
+           <span slot="practicalSum" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.practicalSum" />
+          </span>
+           <!-- U8生成运费发票号 -->
+           <span slot="u8Invoice" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.u8Invoice" />
+          </span>
+          <!-- 账套号 -->
+          <span slot="zhanghaoId" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.zhanghaoId" />
+          </span>
+           <!-- 备注 -->
+           <span slot="remark" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.remark" />
+          </span>
+          </a-table>
+
+          <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
+          <a-row :gutter="24">
+          <a-col :span="24" style="height: 110px;">
+            <a-form-model-item label="财务备注" prop="financeRemark" class="nresume">
+              <a-input v-model="formState.financeRemark"  type="textarea"  placeholder="请输入"></a-input>
+            </a-form-model-item>
+          </a-col>
+          
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="8">
+            <a-form-model-item label="添加附件" prop="accessory2">
+              <a-input v-model="formState.accessory2"  placeholder="请输入"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="通知人" prop="Noticer">
+              <a-input v-model="formState.Noticer"  placeholder="请输入"></a-input>
+            </a-form-model-item>
+          </a-col>
+          </a-row>
+         </a-form-model>
+          <!-- <j-editable-table
             :ref="refKeys[0]"
             :loading="incidentTicketChildrenTable.loading"
             :columns="incidentTicketChildrenTable.columns"
@@ -227,11 +75,21 @@
             :maxHeight="300"
             :rowNumber="true"
             :rowSelection="true"
-            :actionButton="true"/>
-        </a-tab-pane>
+            :actionButton="true"/> -->
+           <!-- <div class="table-page-search-wrapper">
+              <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
+                <a-row :gutter="24">
+              <a-col :md="24" :sm="8"> 
+               <a-form-model-item label="财务备注"  class="nresume" style="height:100px !important">
+                 <a-input type="textarea" placeholder="请输入" v-model="formState.demo"/>
+               </a-form-model-item>
+              </a-col>
+            </a-row>
+              </a-form-model>
+            </div> -->
+        <!-- </a-tab-pane> -->
         
-      </a-tabs>
-
+    </div>
     </a-spin>
   </a-modal>
 </template>
@@ -243,7 +101,7 @@
   import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
   import { validateDuplicateValue } from '@/utils/util'
   import JDictSelectTag from "@/components/dict/JDictSelectTag"
-
+  import { putAction,getAction } from '@/api/manage'
   export default {
     name: 'IncidentTicketModal',
     mixins: [JEditableTableMixin],
@@ -253,7 +111,7 @@
     data() {
       return {
         labelCol: {
-          span: 6
+          span: 8
         },
         wrapperCol: {
           span: 16
@@ -264,6 +122,7 @@
         wrapperCol2: {
           span: 20
         },
+        formState:{},
         // 新增时子表默认添加几行空数据
         addDefaultRowNum: 1,
         validatorRules: {
@@ -356,94 +215,64 @@
           loading: false,
           dataSource: [],
           columns: [
-            {
-              title: '计划单号',
-              key: 'planNumber',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '事故类型',
-              key: 'accidentType',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '事故金额',
-              key: 'accidentSum',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '汇率',
-              key: 'exchangeRate',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '实际事故金额',
-              key: 'practicalSum',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: 'U8生成运费发票号',
-              key: 'u8Invoice',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '账套号',
-              key: 'zhanghaoId',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '备注',
-              key: 'remark',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '是否部门负责人',
-              key: 'isLeaders',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '主表id',
-              key: 'incidentTicketId',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
-            {
-              title: '报错字段sort',
-              key: 'sort',
-              type: FormTypes.input,
-              width:"200px",
-              placeholder: '请输入${title}',
-              defaultValue: '',
-            },
+          {
+            title: '计划单号',
+            align: "center",
+            dataIndex: 'planNumber',
+            width: 140,
+            // scopedSlots: { customRender: 'planNumber' },
+          },
+          {
+            title: '事故类型',
+            align: "center",
+            dataIndex: 'accidentType',
+            width: 140,
+            // scopedSlots: { customRender: 'accidentType' },
+          },
+          {
+            title: '事故金额',
+            align: "center",
+            dataIndex: 'accidentSum',
+            width: 140,
+            // scopedSlots: { customRender: 'accidentSum' },
+          },
+          {
+            title: '汇率',
+            align: "center",
+            dataIndex: 'exchangeRate',
+            width: 140,
+            scopedSlots: { customRender: 'exchangeRate' },
+          },
+          {
+            title: '实际事故金额',
+            align: "center",
+            dataIndex: 'practicalSum',
+            width: 140,
+            scopedSlots: { customRender: 'practicalSum' },
+          },
+          {
+            title: 'U8生成运费发票号',
+            align: "center",
+            dataIndex: 'u8Invoice',
+            width: 140,
+            scopedSlots: { customRender: 'u8Invoice' },
+          },
+          {
+            title: '账套号',
+            align: "center",
+            dataIndex: 'zhanghaoId',
+            width: 140,
+            scopedSlots: { customRender: 'zhanghaoId' },
+          },
+          
+          {
+            title: '备注',
+            align: "center",
+            dataIndex: 'remark',
+            width: 140,
+            scopedSlots: { customRender: 'remark' },
+          },
+
           ]
         },
         url: {
@@ -456,22 +285,82 @@
       }
     },
     methods: {
-      getAllTable() {
-        let values = this.tableKeys.map(key => getRefPromise(this, key))
-        return Promise.all(values)
+      getHeaderList(id){
+        getAction('/oa/incidentTicket/queryById', {id:id}).then((res) => {
+          if(res.success){
+            var zhuId = '' //主表id
+             this.formState=res.result //详情
+             zhuId = res.result.id
+             this.getTable(zhuId)
+             this.getNotifier(zhuId)
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
       },
-      /** 调用完edit()方法之后会自动调用此方法 */
-      editAfter() {
-        let fieldval = pick(this.model,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren')
-        this.$nextTick(() => {
-          this.form.setFieldsValue(fieldval)
+      getTable(id){
+        getAction('/oa/incidentTicket/queryIncidentTicketChildrenByMainId', {id:id}).then((res) => {
+          if(res.success){
+            this.incidentTicketChildrenTable.dataSource = res.result
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      getNotifier(id){
+        getAction('/oa/incidentTicketMsg/queryByMainId', {id:id}).then((res) => {
+          if(res.success){
+            var noticeList =[]
+            res.result.map(item=>{
+              noticeList.push(item.userName)
+            })
+            this.formState.Noticer = noticeList.toString()
+            console.log(this.formState.Noticer)
+            this.$forceUpdate()
+          }
         })
-        // 加载子表数据
-        if (this.model.id) {
-          let params = { id: this.model.id }
-          this.requestSubTableData(this.url.incidentTicketChildren.list, params, this.incidentTicketChildrenTable)
-        }
       },
+      handleOk(){
+        this.$refs.form.validate(async valid => {
+         if(valid){
+            var obj = this.formState
+            obj.incidentTicketChildrenList =  this.incidentTicketChildrenTable.dataSource 
+                putAction('/oa/incidentTicket/edit', obj).then((res) => {
+                   if(res.success){
+                      this.$message.success('编辑成功')
+                      this.handleCancel()
+                      this.$emit('close')
+                   }else{
+                       this.$message.warning(res.message)
+                     }
+                 })
+            } 
+         })
+       
+      },
+       //关闭
+       handleCancel(){
+        this.incidentTicketChildrenTable.dataSource =[]
+        this.formState = {}
+        this.visible = false
+        this.$emit('close')
+      },
+      // getAllTable() {
+      //   let values = this.tableKeys.map(key => getRefPromise(this, key))
+      //   return Promise.all(values)
+      // },
+      /** 调用完edit()方法之后会自动调用此方法 */
+      // editAfter() {
+      //   let fieldval = pick(this.model,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren')
+      //   this.$nextTick(() => {
+      //     this.form.setFieldsValue(fieldval)
+      //   })
+      //   // 加载子表数据
+      //   if (this.model.id) {
+      //     let params = { id: this.model.id }
+      //     this.requestSubTableData(this.url.incidentTicketChildren.list, params, this.incidentTicketChildrenTable)
+      //   }
+      // },
       /** 整理成formData */
       classifyIntoFormData(allValues) {
         let main = Object.assign(this.model, allValues.formValue)
@@ -492,5 +381,11 @@
   }
 </script>
 
-<style scoped>
+<style lang="less" scoped>
+/deep/ .ant-table-wrapper{
+  margin-bottom: 2%;
+}
+/deep/ .nresume .ant-input{
+  height: 100px !important;
+}
 </style>

+ 418 - 0
src/views/oa/modules/IncidentTicketModalDetail.vue

@@ -0,0 +1,418 @@
+<template>
+  <a-modal
+    title="详情"
+    width="85%"
+    :visible="visible"
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    @cancel="handleCancel"
+    destroyOnClose
+    >
+    <template #footer>
+        <a-button  @click="handleCancel" style="margin-left: 8px;">取消</a-button>
+        <a-button  type="primary"  @click="addNotice" style="margin-left: 8px;" :disabled="!(formState.state=='1')">通知</a-button>
+        <a-popconfirm title="确定反馈通知吗?" ok-text="是" cancel-text="否" @confirm="feedbackNotice">
+          <a-button  type="primary"   style="margin-left: 8px;" :disabled="!(formState.state=='2')">反馈通知</a-button>
+        </a-popconfirm>
+        <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push">
+          <a-button  type="primary"   style="margin-left: 8px;" :disabled="!(formState.state=='3')">推送</a-button>
+        </a-popconfirm>
+        <a-popconfirm title="确定完结吗?" ok-text="是" cancel-text="否" @confirm="end">
+          <a-button  type="primary"   style="margin-left: 8px;" :disabled="!(formState.state=='4')">完结</a-button>
+        </a-popconfirm>
+      </template>
+    <a-spin :spinning="confirmLoading">
+      
+      <div class="table-page-search-wrapper">
+      <!-- 子表单区域 -->
+          <!-- <a-button type="primary"  @click="addList" style="margin-bottom: 1%;">增行</a-button> -->
+          <a-table
+           bordered
+          :columns="incidentTicketChildrenTable.columns"
+          :data-source="incidentTicketChildrenTable.dataSource"
+         :loading="incidentTicketChildrenTable.loading"
+         :scroll="{x: 2000,y:300 }"
+          :pagination="false"
+            >
+          <!-- 汇率 -->
+          <span slot="exchangeRate" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.exchangeRate" />
+          </span>
+           <!-- 实际事故金额 -->
+           <span slot="practicalSum" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.practicalSum" />
+          </span>
+           <!-- U8生成运费发票号 -->
+           <span slot="u8Invoice" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.u8Invoice" />
+          </span>
+          <!-- 账套号 -->
+          <span slot="zhanghaoId" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.zhanghaoId" />
+          </span>
+           <!-- 备注 -->
+           <span slot="remark" slot-scope="text, record, index">
+                  <a-input placeholder="请输入" v-model="record.remark" />
+          </span>
+          </a-table>
+            <!-- 主表单区域 -->
+        <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
+          <a-row :gutter="24">
+          <a-col :span="24" style="height: 110px;">
+            <a-form-model-item label="财务备注" prop="financeRemark" class="nresume">
+              <a-input v-model="formState.financeRemark"  type="textarea"  placeholder="请输入" readOnly></a-input>
+            </a-form-model-item>
+          </a-col>
+          
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="8">
+            <a-form-model-item label="添加附件" prop="accessory2">
+              <a-input v-model="formState.accessory2"  placeholder="请输入" readOnly></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="通知人" prop="Noticer">
+              <a-input v-model="formState.Noticer"  placeholder="请输入"></a-input>
+            </a-form-model-item>
+          </a-col>
+          </a-row>
+        </a-form-model>
+
+      <j-select-biz-component   ref="JSelectBizComponent"  :value="value"  :listUrl="url.list"  :columns="columns"  v-on="$listeners"  v-bind="attrs" @send-notice="sendNotice"  />
+    </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import JSelectBizComponent from './JSelectUserByDepModal'
+  import pick from 'lodash.pick'
+  import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil'
+  import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
+  import { validateDuplicateValue } from '@/utils/util'
+  import JDictSelectTag from "@/components/dict/JDictSelectTag"
+  import { putAction,getAction } from '@/api/manage'
+  export default {
+    name: 'IncidentTicketModalDetail',
+    mixins: [JEditableTableMixin],
+    components: {
+      JDictSelectTag,
+      JSelectBizComponent
+    },
+    data() {
+      return {
+        labelCol: {
+          span: 8
+        },
+        wrapperCol: {
+          span: 16
+        },
+        labelCol2: {
+          span: 3
+        },
+        wrapperCol2: {
+          span: 20
+        },
+        formState:{},
+        columns: [
+          { title: '姓名', align: 'center', width: '20%', widthRight: '70%', dataIndex: 'realname' },
+          { title: '账号', align: 'center', width: '20%', dataIndex: 'username' },
+          { title: '电话', align: 'center', width: '23%', dataIndex: 'phone' },
+          { title: '出生日期', align: 'center', width: '23%', dataIndex: 'birthday' }
+        ],
+        multi:true,
+        // 新增时子表默认添加几行空数据
+        addDefaultRowNum: 1,
+        validatorRules: {
+          accidentData: {rules: [
+          ]},
+          accidentTheme: {rules: [
+          ]},
+          accidentPersonLiable: {rules: [
+          ]},
+          supplier: {rules: [
+          ]},
+          personLiable: {rules: [
+          ]},
+          accidentNumber: {rules: [
+          ]},
+          customer: {rules: [
+          ]},
+          factory: {rules: [
+          ]},
+          responsibilityPerson1: {rules: [
+          ]},
+          responsibilityPerson2: {rules: [
+          ]},
+          responsibilityPerson3: {rules: [
+          ]},
+          responsibilityPerson4: {rules: [
+          ]},
+          responsibilityPerson5: {rules: [
+          ]},
+          sum1: {rules: [
+          ]},
+          sum2: {rules: [
+          ]},
+          sum3: {rules: [
+          ]},
+          sum4: {rules: [
+          ]},
+          sum5: {rules: [
+          ]},
+          responsibilityCompany: {rules: [
+          ]},
+          moneyType: {rules: [
+          ]},
+          totalMoney: {rules: [
+          ]},
+          businessType: {rules: [
+          ]},
+          garmentSalesOrder: {rules: [
+          ]},
+          styleNumber: {rules: [
+          ]},
+          material: {rules: [
+          ]},
+          planPersonnel: {rules: [
+          ]},
+          businessPeople: {rules: [
+          ]},
+          qualityControl: {rules: [
+          ]},
+          planNumber: {rules: [
+          ]},
+          accidentType: {rules: [
+          ]},
+          accidentSum: {rules: [
+          ]},
+          presentationCondition: {rules: [
+          ]},
+          accessory: {rules: [
+          ]},
+          informant: {rules: [
+          ]},
+          factorySignature: {rules: [
+          ]},
+          financeRemark: {rules: [
+          ]},
+          accessory2: {rules: [
+          ]},
+          isLeaders: {rules: [
+          ]},
+          incidentTicketId: {rules: [
+          ]},
+          tableNameChildren: {rules: [
+          ]},
+        },
+        refKeys: ['incidentTicketChildren', ],
+        tableKeys:['incidentTicketChildren', ],
+        activeKey: 'incidentTicketChildren',
+        // 森_工厂质量事故单-子表
+        incidentTicketChildrenTable: {
+          loading: false,
+          dataSource: [],
+          columns: [
+          {
+            title: '计划单号',
+            align: "center",
+            dataIndex: 'planNumber',
+            width: 140,
+            // scopedSlots: { customRender: 'planNumber' },
+          },
+          {
+            title: '事故类型',
+            align: "center",
+            dataIndex: 'accidentType',
+            width: 140,
+            // scopedSlots: { customRender: 'accidentType' },
+          },
+          {
+            title: '事故金额',
+            align: "center",
+            dataIndex: 'accidentSum',
+            width: 140,
+            // scopedSlots: { customRender: 'accidentSum' },
+          },
+          {
+            title: '汇率',
+            align: "center",
+            dataIndex: 'exchangeRate',
+            width: 140,
+            // scopedSlots: { customRender: 'exchangeRate' },
+          },
+          {
+            title: '实际事故金额',
+            align: "center",
+            dataIndex: 'practicalSum',
+            width: 140,
+            // scopedSlots: { customRender: 'practicalSum' },
+          },
+          {
+            title: 'U8生成运费发票号',
+            align: "center",
+            dataIndex: 'u8Invoice',
+            width: 140,
+            // scopedSlots: { customRender: 'u8Invoice' },
+          },
+          {
+            title: '账套号',
+            align: "center",
+            dataIndex: 'zhanghaoId',
+            width: 140,
+            // scopedSlots: { customRender: 'zhanghaoId' },
+          },
+          
+          {
+            title: '备注',
+            align: "center",
+            dataIndex: 'remark',
+            width: 140,
+            // scopedSlots: { customRender: 'remark' },
+          },
+
+          ]
+        },
+        url: {
+          add: "/oa/incidentTicket/add",
+          edit: "/oa/incidentTicket/edit",
+          incidentTicketChildren: {
+            list: '/oa/incidentTicket/queryIncidentTicketChildrenByMainId'
+          },
+          list:'/sys/user/list' 
+        }
+      }
+    },
+    methods: {
+      addNotice(){   
+        this.$refs.JSelectBizComponent.visible = true
+      },
+      feedbackNotice(){
+        getAction('/oa/incidentTicket/noticeUserReturn', {headId:this.formState.id,title:this.formState.accidentTheme,code:this.formState.accidentNumber}).then((res) => {
+          if(res.success){
+            this.$message.success(res.message)
+            this.getNotifier(this.formState.id)
+            this.formState.state='3'
+            this.$forceUpdate()
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      push(){
+        getAction('/oa/incidentTicket/propelling', {headId:this.formState.id}).then((res) => {
+          if(res.success){
+            this.$message.success(res.message)
+            this.handleCancel()
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      end(){
+        getAction('/oa/incidentTicket/endOrder', {headId:this.formState.id}).then((res) => {
+          if(res.success){
+            this.$message.success(res.message)
+            this.handleCancel()
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      sendNotice(ids){
+        getAction('/oa/incidentTicket/noticeUser', {ids:ids,headId:this.formState.id,code:this.formState.accidentNumber,title:this.formState.accidentTheme}).then((res) => {
+          if(res.success){
+            this.$message.success(res.message)
+            this.getNotifier(this.formState.id)
+            this.formState.state='2'
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      getHeaderList(id){
+        getAction('/oa/incidentTicket/queryById', {id:id}).then((res) => {
+          if(res.success){
+            var zhuId = '' //主表id
+             this.formState=res.result //详情
+             zhuId = res.result.id
+             this.getTable(zhuId)
+             this.getNotifier(zhuId)
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      getTable(id){
+        getAction('/oa/incidentTicket/queryIncidentTicketChildrenByMainId', {id:id}).then((res) => {
+          if(res.success){
+            this.incidentTicketChildrenTable.dataSource = res.result
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      getNotifier(id){
+        getAction('/oa/incidentTicketMsg/queryByMainId', {id:id}).then((res) => {
+          if(res.success){
+            var noticeList =[]
+            res.result.map(item=>{
+              noticeList.push(item.userName)
+            })
+            this.formState.Noticer = noticeList.toString()
+            this.$forceUpdate()
+          }
+        })
+      },
+       //关闭
+       handleCancel(){
+        this.incidentTicketChildrenTable.dataSource =[]
+        this.formState = {}
+        this.visible = false
+        this.$emit('close')
+      },
+      // getAllTable() {
+      //   let values = this.tableKeys.map(key => getRefPromise(this, key))
+      //   return Promise.all(values)
+      // },
+      /** 调用完edit()方法之后会自动调用此方法 */
+      // editAfter() {
+      //   let fieldval = pick(this.model,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren')
+      //   this.$nextTick(() => {
+      //     this.form.setFieldsValue(fieldval)
+      //   })
+      //   // 加载子表数据
+      //   if (this.model.id) {
+      //     let params = { id: this.model.id }
+      //     this.requestSubTableData(this.url.incidentTicketChildren.list, params, this.incidentTicketChildrenTable)
+      //   }
+      // },
+      /** 整理成formData */
+      classifyIntoFormData(allValues) {
+        let main = Object.assign(this.model, allValues.formValue)
+
+        return {
+          ...main, // 展开
+          incidentTicketChildrenList: allValues.tablesValue[0].values,
+        }
+      },
+      validateError(msg){
+        this.$message.error(msg)
+      },
+     popupCallback(row){
+       this.form.setFieldsValue(pick(row,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren'))
+     },
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/deep/ .ant-table-wrapper{
+  margin-bottom: 2%;
+}
+/deep/ .nresume .ant-input{
+  height: 100px !important;
+}
+</style>

+ 319 - 0
src/views/oa/modules/JSelectUserByDepModal.vue

@@ -0,0 +1,319 @@
+<template>
+  <a-modal
+    centered
+    :title="name + '选择'"
+    :width="width"
+    :visible="visible"
+    @ok="handleOk"
+    @cancel="close"
+    cancelText="关闭">
+
+    <a-row :gutter="18">
+      <a-col :span="16">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline">
+            <a-row :gutter="24">
+
+              <a-col :span="14">
+                <a-form-item :label="(queryParamText||name)">
+                  <a-input v-model="queryParam[queryParamCode||valueKey]" :placeholder="'请输入' + (queryParamText||name)" @pressEnter="searchQuery"/>
+                </a-form-item>
+              </a-col>
+              <a-col :span="8">
+                  <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                    <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                    <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+                  </span>
+              </a-col>
+
+            </a-row>
+          </a-form>
+        </div>
+
+        <a-table
+          size="small"
+          bordered
+          :rowKey="rowKey"
+          :columns="innerColumns"
+          :dataSource="dataSource"
+          :pagination="ipagination"
+          :loading="loading"
+          :scroll="{ y: 240 }"
+          :rowSelection="{selectedRowKeys, onChange: onSelectChange, type: multiple ? 'checkbox':'radio'}"
+          :customRow="customRowFn"
+          @change="handleTableChange">
+        </a-table>
+
+      </a-col>
+      <a-col :span="8">
+        <a-card :title="'已选' + name" :bordered="false" :head-style="{padding:0}" :body-style="{padding:0}">
+
+          <a-table size="small" :rowKey="rowKey" bordered v-bind="selectedTable">
+              <span slot="action" slot-scope="text, record, index">
+                <a @click="handleDeleteSelected(record, index)">删除</a>
+              </span>
+          </a-table>
+
+        </a-card>
+      </a-col>
+    </a-row>
+  </a-modal>
+</template>
+
+<script>
+  import { getAction } from '@/api/manage'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import { cloneObject, pushIfNotExist } from '@/utils/util'
+
+  export default {
+    name: 'JSelectBizComponentModal',
+    mixins: [JeecgListMixin],
+    props: {
+      value: {
+        type: Array,
+        default: () => []
+      },
+      visible: {
+        type: Boolean,
+        default: false
+      },
+      valueKey: {
+        type: String,
+        required: true
+      },
+      multiple: {
+        type: Boolean,
+        default: true
+      },
+      width: {
+        type: Number,
+        default: 900
+      },
+
+      name: {
+        type: String,
+        default: ''
+      },
+      listUrl: {
+        type: String,
+        required: true,
+        default: ''
+      },
+      // 根据 value 获取显示文本的地址,例如存的是 username,可以通过该地址获取到 realname
+      valueUrl: {
+        type: String,
+        default: ''
+      },
+      displayKey: {
+        type: String,
+        default: null
+      },
+      columns: {
+        type: Array,
+        required: true,
+        default: () => []
+      },
+      // 查询条件Code
+      queryParamCode: {
+        type: String,
+        default: null
+      },
+      // 查询条件文字
+      queryParamText: {
+        type: String,
+        default: null
+      },
+      rowKey: {
+        type: String,
+        default: 'id'
+      },
+    },
+    data() {
+      return {
+        innerValue: [],
+        // 表头
+        innerColumns: this.columns,
+        // 已选择列表
+        selectedTable: {
+          pagination: false,
+          scroll: { y: 240 },
+          columns: [
+            {
+              ...this.columns[0],
+              width: this.columns[0].widthRight || this.columns[0].width,
+            },
+            { title: '操作', dataIndex: 'action', align: 'center', width: 60, scopedSlots: { customRender: 'action' }, }
+          ],
+          dataSource: [],
+        },
+        url: { list: this.listUrl },
+        /* 分页参数 */
+        ipagination: {
+          current: 1,
+          pageSize: 5,
+          pageSizeOptions: ['5', '10', '20', '30'],
+          showTotal: (total, range) => {
+            return range[0] + '-' + range[1] + ' 共' + total + '条'
+          },
+          showQuickJumper: true,
+          showSizeChanger: true,
+          total: 0
+        },
+        options: [],
+        dataSourceMap: {},
+      }
+    },
+    watch: {
+      value: {
+        deep: true,
+        immediate: true,
+        handler(val) {
+          this.innerValue = cloneObject(val)
+          this.selectedRowKeys = []
+          this.valueWatchHandler(val)
+          this.queryOptionsByValue(val)
+        }
+      },
+      dataSource: {
+        deep: true,
+        handler(val) {
+          this.emitOptions(val)
+          this.valueWatchHandler(this.innerValue)
+        }
+      },
+      selectedRowKeys: {
+        immediate: true,
+        deep: true,
+        handler(val) {
+          this.selectedTable.dataSource = val.map(key => {
+            for (let data of this.dataSource) {
+              if (data[this.rowKey] === key) {
+                pushIfNotExist(this.innerValue, data[this.valueKey])
+                return data
+              }
+            }
+            for (let data of this.selectedTable.dataSource) {
+              if (data[this.rowKey] === key) {
+                pushIfNotExist(this.innerValue, data[this.valueKey])
+                return data
+              }
+            }
+            console.warn('未找到选择的行信息,key:' + key)
+            return {}
+          })
+        },
+      }
+    },
+
+    methods: {
+
+      /** 关闭弹窗 */
+      close() {
+        this.visible = false
+      },
+
+      valueWatchHandler(val) {
+        val.forEach(item => {
+          this.dataSource.concat(this.selectedTable.dataSource).forEach(data => {
+            if (data[this.valueKey] === item) {
+              pushIfNotExist(this.selectedRowKeys, data[this.rowKey])
+            }
+          })
+        })
+      },
+
+      queryOptionsByValue(value) {
+        if (!value || value.length === 0) {
+          return
+        }
+        // 判断options是否存在value,如果已存在数据就不再请求后台了
+        let notExist = false
+        for (let val of value) {
+          let find = false
+          for (let option of this.options) {
+            if (val === option.value) {
+              find = true
+              break
+            }
+          }
+          if (!find) {
+            notExist = true
+            break
+          }
+        }
+        if (!notExist) return
+        getAction(this.valueUrl || this.listUrl, {
+          // 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确
+          [this.valueKey]: value.join(',') + ',',
+          pageNo: 1,
+          pageSize: value.length
+        }).then((res) => {
+          if (res.success) {
+            let dataSource = res.result
+            if (!(dataSource instanceof Array)) {
+              dataSource = res.result.records
+            }
+            this.emitOptions(dataSource, (data) => {
+              pushIfNotExist(this.innerValue, data[this.valueKey])
+              pushIfNotExist(this.selectedRowKeys, data[this.rowKey])
+              pushIfNotExist(this.selectedTable.dataSource, data, this.rowKey)
+            })
+          }
+        })
+      },
+
+      emitOptions(dataSource, callback) {
+        dataSource.forEach(data => {
+          let key = data[this.valueKey]
+          this.dataSourceMap[key] = data
+          pushIfNotExist(this.options, { label: data[this.displayKey || this.valueKey], value: key }, 'value')
+          typeof callback === 'function' ? callback(data) : ''
+        })
+        this.$emit('options', this.options, this.dataSourceMap)
+      },
+
+      /** 完成选择 */
+      handleOk() {
+        var username =[]
+         this.selectedTable.dataSource.map(data => {
+          username.push(data.username)
+        })
+        var ids = username.toString()
+        this.$emit('send-notice', ids)
+        this.close()
+      },
+
+      /** 删除已选择的 */
+      handleDeleteSelected(record, index) {
+        this.selectedRowKeys.splice(this.selectedRowKeys.indexOf(record[this.rowKey]), 1)
+        this.selectedTable.dataSource.splice(index, 1)
+      },
+
+      customRowFn(record) {
+        return {
+          on: {
+            click: () => {
+              let key = record[this.rowKey]
+              if (!this.multiple) {
+                this.selectedRowKeys = [key]
+                this.selectedTable.dataSource = [record]
+              } else {
+                let index = this.selectedRowKeys.indexOf(key)
+                if (index === -1) {
+                  this.selectedRowKeys.push(key)
+                  this.selectedTable.dataSource.push(record)
+                } else {
+                  this.handleDeleteSelected(record, index)
+                }
+              }
+            }
+          }
+        }
+      },
+
+    }
+  }
+</script>
+<style lang="less" scoped>
+</style>