瀏覽代碼

科研报工(项目成本——工时详情)、mes装机信息卡(项目成本——装机详情)

LLL 1 年之前
父節點
當前提交
87a2bf6417

+ 297 - 0
src/views/module_kzks/kyBgInfo/KyBgInfoList.vue

@@ -0,0 +1,297 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('科研报工')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <ky-bg-info-modal ref="modalForm" @ok="modalFormOk"></ky-bg-info-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import KyBgInfoModal from './modules/KyBgInfoModal'
+
+  export default {
+    name: 'KyBgInfoList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      KyBgInfoModal
+    },
+    data () {
+      return {
+        description: '科研报工管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'key',
+            align:"center",
+            dataIndex: 'key'
+          },
+          {
+            title:'报工任务号',
+            align:"center",
+            dataIndex: 'taskno'
+          },
+          {
+            title:'任务名称',
+            align:"center",
+            dataIndex: 'taskname'
+          },
+          {
+            title:'工作内容',
+            align:"center",
+            dataIndex: 'workcontent'
+          },
+          {
+            title:'当日用时(h)',
+            align:"center",
+            dataIndex: 'workhour'
+          },
+          {
+            title:'型号',
+            align:"center",
+            dataIndex: 'xhname'
+          },
+          {
+            title:'研制数量',
+            align:"center",
+            dataIndex: 'yzsl'
+          },
+          {
+            title:'研制阶段',
+            align:"center",
+            dataIndex: 'yzjdname'
+          },
+          {
+            title:'用户名称',
+            align:"center",
+            dataIndex: 'tcdw'
+          },
+          {
+            title:'用户简称',
+            align:"center",
+            dataIndex: 'brief'
+          },
+          {
+            title:'状态',
+            align:"center",
+            dataIndex: 'status'
+          },
+          {
+            title:'计划开始时间',
+            align:"center",
+            dataIndex: 'jhkssj',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'计划完成时间(进度要求)',
+            align:"center",
+            dataIndex: 'jhwcsj',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'工作日期',
+            align:"center",
+            dataIndex: 'worktime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'填写时间',
+            align:"center",
+            dataIndex: 'createtime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'填报人',
+            align:"center",
+            dataIndex: 'username'
+          },
+          {
+            title:'填报部门',
+            align:"center",
+            dataIndex: 'userdept'
+          },
+          {
+            title:'审核人',
+            align:"center",
+            dataIndex: 'shr'
+          },
+          {
+            title:'审批人',
+            align:"center",
+            dataIndex: 'spr'
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'memo'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/kyBgInfo/kyBgInfo/list",
+          delete: "/kyBgInfo/kyBgInfo/delete",
+          deleteBatch: "/kyBgInfo/kyBgInfo/deleteBatch",
+          exportXlsUrl: "/kyBgInfo/kyBgInfo/exportXls",
+          importExcelUrl: "kyBgInfo/kyBgInfo/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'int',value:'key',text:'key'})
+        fieldList.push({type:'string',value:'taskno',text:'报工任务号'})
+        fieldList.push({type:'string',value:'taskname',text:'任务名称'})
+        fieldList.push({type:'string',value:'workcontent',text:'工作内容'})
+        fieldList.push({type:'number',value:'workhour',text:'当日用时(h)'})
+        fieldList.push({type:'string',value:'xhname',text:'型号'})
+        fieldList.push({type:'int',value:'yzsl',text:'研制数量'})
+        fieldList.push({type:'string',value:'yzjdname',text:'研制阶段'})
+        fieldList.push({type:'string',value:'tcdw',text:'用户名称'})
+        fieldList.push({type:'string',value:'brief',text:'用户简称'})
+        fieldList.push({type:'string',value:'status',text:'状态'})
+        fieldList.push({type:'date',value:'jhkssj',text:'计划开始时间'})
+        fieldList.push({type:'date',value:'jhwcsj',text:'计划完成时间(进度要求)'})
+        fieldList.push({type:'date',value:'worktime',text:'工作日期'})
+        fieldList.push({type:'date',value:'createtime',text:'填写时间'})
+        fieldList.push({type:'string',value:'username',text:'填报人'})
+        fieldList.push({type:'string',value:'userdept',text:'填报部门'})
+        fieldList.push({type:'string',value:'shr',text:'审核人'})
+        fieldList.push({type:'string',value:'spr',text:'审批人'})
+        fieldList.push({type:'string',value:'memo',text:'备注'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 202 - 0
src/views/module_kzks/kyBgInfo/modules/KyBgInfoForm.vue

@@ -0,0 +1,202 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="key" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="key">
+              <a-input-number v-model="model.key" placeholder="请输入key" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="报工任务号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskno">
+              <a-input v-model="model.taskno" placeholder="请输入报工任务号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="任务名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskname">
+              <a-input v-model="model.taskname" placeholder="请输入任务名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="工作内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workcontent">
+              <a-input v-model="model.workcontent" placeholder="请输入工作内容"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="当日用时(h)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workhour">
+              <a-input-number v-model="model.workhour" placeholder="请输入当日用时(h)" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xhname">
+              <a-input v-model="model.xhname" placeholder="请输入型号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="研制数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="yzsl">
+              <a-input-number v-model="model.yzsl" placeholder="请输入研制数量" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="研制阶段" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="yzjdname">
+              <a-input v-model="model.yzjdname" placeholder="请输入研制阶段"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="用户名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tcdw">
+              <a-input v-model="model.tcdw" placeholder="请输入用户名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="用户简称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brief">
+              <a-input v-model="model.brief" placeholder="请输入用户简称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+              <a-input v-model="model.status" placeholder="请输入状态"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="计划开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jhkssj">
+              <j-date placeholder="请选择计划开始时间" v-model="model.jhkssj"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="计划完成时间(进度要求)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jhwcsj">
+              <j-date placeholder="请选择计划完成时间(进度要求)" v-model="model.jhwcsj"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="工作日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="worktime">
+              <j-date placeholder="请选择工作日期" v-model="model.worktime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="填写时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createtime">
+              <j-date placeholder="请选择填写时间" v-model="model.createtime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="填报人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username">
+              <a-input v-model="model.username" placeholder="请输入填报人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="填报部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userdept">
+              <a-input v-model="model.userdept" placeholder="请输入填报部门"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="审核人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shr">
+              <a-input v-model="model.shr" placeholder="请输入审核人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spr">
+              <a-input v-model="model.spr" placeholder="请输入审批人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="memo">
+              <a-textarea v-model="model.memo" rows="4" placeholder="请输入备注" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'KyBgInfoForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           key: [
+              { required: true, message: '请输入key!'},
+           ],
+        },
+        url: {
+          add: "/kyBgInfo/kyBgInfo/add",
+          edit: "/kyBgInfo/kyBgInfo/edit",
+          queryById: "/kyBgInfo/kyBgInfo/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_kzks/kyBgInfo/modules/KyBgInfoModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <ky-bg-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></ky-bg-info-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import KyBgInfoForm from './KyBgInfoForm'
+
+  export default {
+    name: 'KyBgInfoModal',
+    components: {
+      KyBgInfoForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_kzks/kyBgInfo/modules/KyBgInfoModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <ky-bg-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></ky-bg-info-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import KyBgInfoForm from './KyBgInfoForm'
+  export default {
+    name: 'KyBgInfoModal',
+    components: {
+      KyBgInfoForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 420 - 0
src/views/module_kzks/mesInfo/MesInfoList.vue

@@ -0,0 +1,420 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('mes装机信息卡')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <mes-info-modal ref="modalForm" @ok="modalFormOk"></mes-info-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import MesInfoModal from './modules/MesInfoModal'
+
+  export default {
+    name: 'MesInfoList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      MesInfoModal
+    },
+    data () {
+      return {
+        description: 'mes装机信息卡管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'keyId',
+            align:"center",
+            dataIndex: 'keyId'
+          },
+          {
+            title:'任务号',
+            align:"center",
+            dataIndex: 'taskno'
+          },
+          {
+            title:'工单号',
+            align:"center",
+            dataIndex: 'wo'
+          },
+          {
+            title:'制令单号',
+            align:"center",
+            dataIndex: 'mo'
+          },
+          {
+            title:'生产条码',
+            align:"center",
+            dataIndex: 'serialNumber'
+          },
+          {
+            title:'出所编号',
+            align:"center",
+            dataIndex: 'outNo'
+          },
+          {
+            title:'产品代号',
+            align:"center",
+            dataIndex: 'productNumber'
+          },
+          {
+            title:'物料编码',
+            align:"center",
+            dataIndex: 'pnCode'
+          },
+          {
+            title:'物料名称',
+            align:"center",
+            dataIndex: 'pnName'
+          },
+          {
+            title:'批次',
+            align:"center",
+            dataIndex: 'batchNo'
+          },
+          {
+            title:'元器件编号',
+            align:"center",
+            dataIndex: 'componentSn'
+          },
+          {
+            title:'供应商',
+            align:"center",
+            dataIndex: 'supplier'
+          },
+          {
+            title:'质量等级',
+            align:"center",
+            dataIndex: 'qualitygrate'
+          },
+          {
+            title:'位号',
+            align:"center",
+            dataIndex: 'pcbItem'
+          },
+          {
+            title:'数量',
+            align:"center",
+            dataIndex: 'qty'
+          },
+          {
+            title:'有效期',
+            align:"center",
+            dataIndex: 'validDate',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'筛选情况',
+            align:"center",
+            dataIndex: 'filter'
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remarks'
+          },
+          {
+            title:'更新人',
+            align:"center",
+            dataIndex: 'updator'
+          },
+          {
+            title:'更新时间',
+            align:"center",
+            dataIndex: 'updateDate',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'位号2',
+            align:"center",
+            dataIndex: 'pcbItem2'
+          },
+          {
+            title:'型号规格',
+            align:"center",
+            dataIndex: 'pnSpec'
+          },
+          {
+            title:'物料条码',
+            align:"center",
+            dataIndex: 'iqcSn'
+          },
+          {
+            title:'操作者',
+            align:"center",
+            dataIndex: 'workMan'
+          },
+          {
+            title:'操作工序',
+            align:"center",
+            dataIndex: 'workLocat'
+          },
+          {
+            title:'检验者',
+            align:"center",
+            dataIndex: 'checkMan'
+          },
+          {
+            title:'j检验时间',
+            align:"center",
+            dataIndex: 'checkDate',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'原始位号',
+            align:"center",
+            dataIndex: 'pcbItemS'
+          },
+          {
+            title:'原始数量',
+            align:"center",
+            dataIndex: 'qtyS'
+          },
+          {
+            title:'拆除位号',
+            align:"center",
+            dataIndex: 'pcbItemR'
+          },
+          {
+            title:'拆除数量',
+            align:"center",
+            dataIndex: 'qtyR'
+          },
+          {
+            title:'呈现位号',
+            align:"center",
+            dataIndex: 'pcbItemShow'
+          },
+          {
+            title:'PID',
+            align:"center",
+            dataIndex: 'pid'
+          },
+          {
+            title:'dpano',
+            align:"center",
+            dataIndex: 'dpano'
+          },
+          {
+            title:'technicalstandard',
+            align:"center",
+            dataIndex: 'technicalstandard'
+          },
+          {
+            title:'行号',
+            align:"center",
+            dataIndex: 'iqcIndex'
+          },
+          {
+            title:'出库单号',
+            align:"center",
+            dataIndex: 'outStockNo'
+          },
+          {
+            title:'印制板号',
+            align:"center",
+            dataIndex: 'boardNo'
+          },
+          {
+            title:'入库批次号',
+            align:"center",
+            dataIndex: 'inbatchno'
+          },
+          {
+            title:'采购单价',
+            align:"center",
+            dataIndex: 'purchaseprice'
+          },
+          {
+            title:'内部单价',
+            align:"center",
+            dataIndex: 'internalprice'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/mesInfo/mesInfo/list",
+          delete: "/mesInfo/mesInfo/delete",
+          deleteBatch: "/mesInfo/mesInfo/deleteBatch",
+          exportXlsUrl: "/mesInfo/mesInfo/exportXls",
+          importExcelUrl: "mesInfo/mesInfo/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'int',value:'keyId',text:'keyId'})
+        fieldList.push({type:'string',value:'taskno',text:'任务号'})
+        fieldList.push({type:'string',value:'wo',text:'工单号'})
+        fieldList.push({type:'string',value:'mo',text:'制令单号'})
+        fieldList.push({type:'string',value:'serialNumber',text:'生产条码'})
+        fieldList.push({type:'string',value:'outNo',text:'出所编号'})
+        fieldList.push({type:'string',value:'productNumber',text:'产品代号'})
+        fieldList.push({type:'string',value:'pnCode',text:'物料编码'})
+        fieldList.push({type:'string',value:'pnName',text:'物料名称'})
+        fieldList.push({type:'string',value:'batchNo',text:'批次'})
+        fieldList.push({type:'string',value:'componentSn',text:'元器件编号'})
+        fieldList.push({type:'string',value:'supplier',text:'供应商'})
+        fieldList.push({type:'string',value:'qualitygrate',text:'质量等级'})
+        fieldList.push({type:'string',value:'pcbItem',text:'位号'})
+        fieldList.push({type:'number',value:'qty',text:'数量'})
+        fieldList.push({type:'date',value:'validDate',text:'有效期'})
+        fieldList.push({type:'string',value:'filter',text:'筛选情况'})
+        fieldList.push({type:'string',value:'remarks',text:'备注'})
+        fieldList.push({type:'string',value:'updator',text:'更新人'})
+        fieldList.push({type:'date',value:'updateDate',text:'更新时间'})
+        fieldList.push({type:'string',value:'pcbItem2',text:'位号2'})
+        fieldList.push({type:'string',value:'pnSpec',text:'型号规格'})
+        fieldList.push({type:'string',value:'iqcSn',text:'物料条码'})
+        fieldList.push({type:'string',value:'workMan',text:'操作者'})
+        fieldList.push({type:'string',value:'workLocat',text:'操作工序'})
+        fieldList.push({type:'string',value:'checkMan',text:'检验者'})
+        fieldList.push({type:'date',value:'checkDate',text:'j检验时间'})
+        fieldList.push({type:'string',value:'pcbItemS',text:'原始位号'})
+        fieldList.push({type:'number',value:'qtyS',text:'原始数量'})
+        fieldList.push({type:'string',value:'pcbItemR',text:'拆除位号'})
+        fieldList.push({type:'number',value:'qtyR',text:'拆除数量'})
+        fieldList.push({type:'string',value:'pcbItemShow',text:'呈现位号'})
+        fieldList.push({type:'string',value:'pid',text:'PID'})
+        fieldList.push({type:'string',value:'dpano',text:'dpano'})
+        fieldList.push({type:'string',value:'technicalstandard',text:'technicalstandard'})
+        fieldList.push({type:'string',value:'iqcIndex',text:'行号'})
+        fieldList.push({type:'string',value:'outStockNo',text:'出库单号'})
+        fieldList.push({type:'string',value:'boardNo',text:'印制板号'})
+        fieldList.push({type:'string',value:'inbatchno',text:'入库批次号'})
+        fieldList.push({type:'number',value:'purchaseprice',text:'采购单价'})
+        fieldList.push({type:'number',value:'internalprice',text:'内部单价'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 307 - 0
src/views/module_kzks/mesInfo/modules/MesInfoForm.vue

@@ -0,0 +1,307 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="keyId" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="keyId">
+              <a-input-number v-model="model.keyId" placeholder="请输入keyId" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="任务号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskno">
+              <a-input v-model="model.taskno" placeholder="请输入任务号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="工单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wo">
+              <a-input v-model="model.wo" placeholder="请输入工单号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="制令单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mo">
+              <a-input v-model="model.mo" placeholder="请输入制令单号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="生产条码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="serialNumber">
+              <a-input v-model="model.serialNumber" placeholder="请输入生产条码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="出所编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outNo">
+              <a-input v-model="model.outNo" placeholder="请输入出所编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="产品代号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productNumber">
+              <a-input v-model="model.productNumber" placeholder="请输入产品代号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pnCode">
+              <a-input v-model="model.pnCode" placeholder="请输入物料编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pnName">
+              <a-input v-model="model.pnName" placeholder="请输入物料名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchNo">
+              <a-input v-model="model.batchNo" placeholder="请输入批次"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="元器件编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentSn">
+              <a-input v-model="model.componentSn" placeholder="请输入元器件编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplier">
+              <a-input v-model="model.supplier" placeholder="请输入供应商"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="质量等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qualitygrate">
+              <a-input v-model="model.qualitygrate" placeholder="请输入质量等级"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pcbItem">
+              <a-textarea v-model="model.pcbItem" rows="4" placeholder="请输入位号" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty">
+              <a-input-number v-model="model.qty" placeholder="请输入数量" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validDate">
+              <j-date placeholder="请选择有效期" v-model="model.validDate"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="筛选情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="filter">
+              <a-input v-model="model.filter" placeholder="请输入筛选情况"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
+              <a-input v-model="model.remarks" placeholder="请输入备注"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="更新人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="updator">
+              <a-input v-model="model.updator" placeholder="请输入更新人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="更新时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="updateDate">
+              <j-date placeholder="请选择更新时间" v-model="model.updateDate"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="位号2" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pcbItem2">
+              <a-input v-model="model.pcbItem2" placeholder="请输入位号2"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="型号规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pnSpec">
+              <a-input v-model="model.pnSpec" placeholder="请输入型号规格"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="物料条码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="iqcSn">
+              <a-input v-model="model.iqcSn" placeholder="请输入物料条码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="操作者" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workMan">
+              <a-input v-model="model.workMan" placeholder="请输入操作者"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="操作工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workLocat">
+              <a-input v-model="model.workLocat" placeholder="请输入操作工序"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="检验者" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="checkMan">
+              <a-input v-model="model.checkMan" placeholder="请输入检验者"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="j检验时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="checkDate">
+              <j-date placeholder="请选择j检验时间" v-model="model.checkDate"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="原始位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pcbItemS">
+              <a-textarea v-model="model.pcbItemS" rows="4" placeholder="请输入原始位号" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="原始数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qtyS">
+              <a-input-number v-model="model.qtyS" placeholder="请输入原始数量" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="拆除位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pcbItemR">
+              <a-textarea v-model="model.pcbItemR" rows="4" placeholder="请输入拆除位号" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="拆除数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qtyR">
+              <a-input-number v-model="model.qtyR" placeholder="请输入拆除数量" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="呈现位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pcbItemShow">
+              <a-textarea v-model="model.pcbItemShow" rows="4" placeholder="请输入呈现位号" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="PID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid">
+              <a-input v-model="model.pid" placeholder="请输入PID"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="dpano" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dpano">
+              <a-input v-model="model.dpano" placeholder="请输入dpano"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="technicalstandard" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalstandard">
+              <a-input v-model="model.technicalstandard" placeholder="请输入technicalstandard"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="行号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="iqcIndex">
+              <a-input v-model="model.iqcIndex" placeholder="请输入行号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="出库单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outStockNo">
+              <a-input v-model="model.outStockNo" placeholder="请输入出库单号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="印制板号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="boardNo">
+              <a-input v-model="model.boardNo" placeholder="请输入印制板号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="入库批次号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inbatchno">
+              <a-input v-model="model.inbatchno" placeholder="请输入入库批次号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="采购单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purchaseprice">
+              <a-input-number v-model="model.purchaseprice" placeholder="请输入采购单价" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="内部单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="internalprice">
+              <a-input-number v-model="model.internalprice" placeholder="请输入内部单价" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'MesInfoForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           keyId: [
+              { required: true, message: '请输入keyId!'},
+           ],
+        },
+        url: {
+          add: "/mesInfo/mesInfo/add",
+          edit: "/mesInfo/mesInfo/edit",
+          queryById: "/mesInfo/mesInfo/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_kzks/mesInfo/modules/MesInfoModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <mes-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></mes-info-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import MesInfoForm from './MesInfoForm'
+
+  export default {
+    name: 'MesInfoModal',
+    components: {
+      MesInfoForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_kzks/mesInfo/modules/MesInfoModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <mes-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></mes-info-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import MesInfoForm from './MesInfoForm'
+  export default {
+    name: 'MesInfoModal',
+    components: {
+      MesInfoForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>