Browse Source

feat: 添加功能:检测依据管理、传感器管理、委托申请管理

1.检测依据增删改查
2.传感器增删改查
3.委托申请增删改查
32197351@qq.com 2 years ago
parent
commit
27040f5907

+ 209 - 0
itdmWeb/src/views/module-iTDM/chuanganqi/ItdmChuanganqiList.vue

@@ -0,0 +1,209 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="型号">
+              <a-input placeholder="请输入型号" v-model="queryParam.xinghao"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="序列号">
+              <a-input placeholder="请输入序列号" v-model="queryParam.xuliehao"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <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>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </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>
+
+    <itdm-chuanganqi-modal ref="modalForm" @ok="modalFormOk"></itdm-chuanganqi-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ItdmChuanganqiModal from './modules/ItdmChuanganqiModal'
+
+  export default {
+    name: 'ItdmChuanganqiList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ItdmChuanganqiModal
+    },
+    data () {
+      return {
+        description: '传感器管理管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'型号',
+            align:"center",
+            dataIndex: 'xinghao'
+          },
+          {
+            title:'序列号',
+            align:"center",
+            dataIndex: 'xuliehao'
+          },
+          {
+            title:'灵敏度',
+            align:"center",
+            dataIndex: 'lingmindu'
+          },
+          {
+            title:'有效期',
+            align:"center",
+            dataIndex: 'youxiaoqi'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/chuanganqi/itdmChuanganqi/list",
+          delete: "/chuanganqi/itdmChuanganqi/delete",
+          deleteBatch: "/chuanganqi/itdmChuanganqi/deleteBatch",
+          exportXlsUrl: "/chuanganqi/itdmChuanganqi/exportXls",
+          importExcelUrl: "chuanganqi/itdmChuanganqi/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'xinghao',text:'型号',dictCode:''})
+        fieldList.push({type:'string',value:'xuliehao',text:'序列号',dictCode:''})
+        fieldList.push({type:'string',value:'lingmindu',text:'灵敏度',dictCode:''})
+        fieldList.push({type:'string',value:'youxiaoqi',text:'有效期',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 131 - 0
itdmWeb/src/views/module-iTDM/chuanganqi/modules/ItdmChuanganqiForm.vue

@@ -0,0 +1,131 @@
+<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="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xinghao">
+              <a-input v-model="model.xinghao" placeholder="请输入型号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="序列号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xuliehao">
+              <a-input v-model="model.xuliehao" placeholder="请输入序列号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="灵敏度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lingmindu">
+              <a-input v-model="model.lingmindu" placeholder="请输入灵敏度"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="youxiaoqi">
+              <a-input v-model="model.youxiaoqi" placeholder="请输入有效期"  ></a-input>
+            </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: 'ItdmChuanganqiForm',
+    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: {
+           xinghao: [
+              { required: true, message: '请输入型号!'},
+           ],
+           xuliehao: [
+              { required: true, message: '请输入序列号!'},
+           ],
+           lingmindu: [
+              { required: true, message: '请输入灵敏度!'},
+           ],
+           youxiaoqi: [
+              { required: true, message: '请输入有效期!'},
+           ],
+        },
+        url: {
+          add: "/chuanganqi/itdmChuanganqi/add",
+          edit: "/chuanganqi/itdmChuanganqi/edit",
+          queryById: "/chuanganqi/itdmChuanganqi/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
itdmWeb/src/views/module-iTDM/chuanganqi/modules/ItdmChuanganqiModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-chuanganqi-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-chuanganqi-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 ItdmChuanganqiForm from './ItdmChuanganqiForm'
+
+  export default {
+    name: 'ItdmChuanganqiModal',
+    components: {
+      ItdmChuanganqiForm
+    },
+    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
itdmWeb/src/views/module-iTDM/chuanganqi/modules/ItdmChuanganqiModal.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="关闭">
+    <itdm-chuanganqi-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-chuanganqi-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmChuanganqiForm from './ItdmChuanganqiForm'
+  export default {
+    name: 'ItdmChuanganqiModal',
+    components: {
+      ItdmChuanganqiForm
+    },
+    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>

+ 256 - 0
itdmWeb/src/views/module-iTDM/weituo/ItdmWeituoInfoList.vue

@@ -0,0 +1,256 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="委托单位名称">
+              <a-input placeholder="请输入委托单位名称" v-model="queryParam.weituoClient"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="委托单位地址">
+              <a-input placeholder="请输入委托单位地址" v-model="queryParam.weituoAddress"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <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>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </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>
+
+    <itdm-weituo-info-modal ref="modalForm" @ok="modalFormOk"></itdm-weituo-info-modal>
+  </a-card>
+</template>
+
+<script>
+
+import '@/assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import ItdmWeituoInfoModal from './modules/ItdmWeituoInfoModal'
+import { ajaxGetDictItems, loadCategoryData } from '@/api/api'
+import { filterMultiDictText } from '@comp/dict/JDictSelectUtil'
+
+export default {
+  name: 'ItdmWeituoInfoList',
+  mixins:[JeecgListMixin, mixinDevice],
+  components: {
+    ItdmWeituoInfoModal
+  },
+  data () {
+    return {
+      description: '委托信息管理页面',
+      // 表头
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key:'rowIndex',
+          width:60,
+          align:"center",
+          customRender:function (t,r,index) {
+            return parseInt(index)+1;
+          }
+        },
+        {
+          title:'委托单位名称',
+          align:"center",
+          dataIndex: 'weituoClient'
+        },
+        {
+          title:'委托单位地址',
+          align:"center",
+          dataIndex: 'weituoAddress'
+        },
+        {
+          title:'委托联系人',
+          align:"center",
+          dataIndex: 'weituoLxr'
+        },
+        {
+          title:'委托电话',
+          align:"center",
+          dataIndex: 'weituoPhone'
+        },
+        {
+          title:'委托邮箱',
+          align:"center",
+          dataIndex: 'weituoEmail'
+        },
+        {
+          title:'报告用章',
+          align:"center",
+          dataIndex: 'bgyz',
+          customRender: (text) => (text ? filterMultiDictText(this.dictOptions['bgyz'], text) : '')
+        },
+        {
+          title:'报告形式',
+          align:"center",
+          dataIndex: 'bgxs',
+          customRender: (text) => (text ? filterMultiDictText(this.dictOptions['bgxs'], text) : '')
+        },
+        {
+          title:'特殊要求',
+          align:"center",
+          dataIndex: 'teshuyaoqiu'
+        },
+        {
+          title:'试验条件文件地址',
+          align:"center",
+          dataIndex: 'tiaojianFile',
+          scopedSlots: {customRender: 'fileSlot'}
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align:"center",
+          fixed:"right",
+          width:147,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: "/weituo/itdmWeituoInfo/list",
+        delete: "/weituo/itdmWeituoInfo/delete",
+        deleteBatch: "/weituo/itdmWeituoInfo/deleteBatch",
+        exportXlsUrl: "/weituo/itdmWeituoInfo/exportXls",
+        importExcelUrl: "weituo/itdmWeituoInfo/importExcel",
+
+      },
+      dictOptions:{},
+      superFieldList:[],
+    }
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    initDictConfig(){
+      ajaxGetDictItems('weituo.bgyz').then((res) => {
+        if (res.success) {
+          console.log(res.result)
+          this.$set(this.dictOptions, 'bgyz', res.result)
+        }
+      })
+      ajaxGetDictItems('weituo.bgxs').then((res) => {
+        if (res.success) {
+          console.log(res.result)
+          this.$set(this.dictOptions, 'bgxs', res.result)
+        }
+      })
+    },
+    getSuperFieldList(){
+      let fieldList=[];
+      fieldList.push({type:'string',value:'weituoClient',text:'委托单位名称',dictCode:''})
+      fieldList.push({type:'string',value:'weituoAddress',text:'委托单位地址',dictCode:''})
+      fieldList.push({type:'string',value:'weituoLxr',text:'委托联系人',dictCode:''})
+      fieldList.push({type:'string',value:'weituoPhone',text:'委托电话',dictCode:''})
+      fieldList.push({type:'string',value:'weituoEmail',text:'委托邮箱',dictCode:''})
+      fieldList.push({type:'string',value:'bgyz',text:'报告用章'})
+      fieldList.push({type:'string',value:'bgxs',text:'报告形式'})
+      fieldList.push({type:'string',value:'teshuyaoqiu',text:'特殊要求',dictCode:''})
+      fieldList.push({type:'string',value:'tiaojianFile',text:'试验条件文件地址',dictCode:''})
+      this.superFieldList = fieldList
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 150 - 0
itdmWeb/src/views/module-iTDM/weituo/modules/ItdmWeituoInfoForm.vue

@@ -0,0 +1,150 @@
+<template>
+
+
+  <a-card :bordered="false">
+    <a-steps class="steps" :current="currentTab">
+      <a-step title="填写基本信息" />
+      <a-step title="填写样品信息" />
+      <a-step title="填写试验信息" />
+    </a-steps>
+    <div class="content">
+      <step1 v-if="currentTab === 0" ref="data001" @nextStep="nextStep" />
+      <step2 v-if="currentTab === 1" @prevStep="prevStep" @nextStep="nextStep" />
+      <step3 v-if="currentTab === 2" @submitForm="submitForm" @prevStep="prevStep" />
+    </div>
+  </a-card>
+
+
+</template>
+
+<script>
+
+import { httpAction, getAction } from '@api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+import Step1 from './step/Step1'
+import Step2 from './step/Step2'
+import Step3 from './step/Step3'
+
+export default {
+  name: 'ItdmWeituoInfoForm',
+  components: {
+    Step1,
+    Step2,
+    Step3
+  },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false
+    }
+  },
+  data() {
+    return {
+      currentTab: 0,
+      weituomodel: {},
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 }
+      },
+      confirmLoading: false,
+      validatorRules: {},
+      url: {
+        add: '/weituo/itdmWeituoInfo/add',
+        edit: '/weituo/itdmWeituoInfo/edit',
+        queryById: '/weituo/itdmWeituoInfo/queryById'
+      }
+    }
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled
+    }
+  },
+  created() {
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model))
+  },
+  methods: {
+    nextStep() {
+      if (this.currentTab < 3) {
+        this.currentTab += 1
+      }
+
+    },
+
+    prevStep() {
+      if (this.currentTab > 0) {
+        this.currentTab -= 1
+      }
+
+    },
+
+    add() {
+      this.model = Object.assign({}, this.modelDefault)
+      this.visible = true
+    },
+    edit(record) {
+      const that = this
+      const select = { id: record.id }
+      getAction(this.url.queryById, select).then((res) => {
+        if (res.success) {
+          this.model.id = res.result.id
+
+          sessionStorage.setItem('data', JSON.stringify(res.result.data))
+          sessionStorage.setItem('yangpin', JSON.stringify(res.result.yangpins))
+          sessionStorage.setItem('yangpinkz', JSON.stringify(res.result.pinShiYans))
+          this.$refs.data001.init()
+
+        } else {
+          that.$message.warning(res.message)
+        }
+      })
+      this.visible = true
+    },
+
+    submitForm() {
+      const that = this
+      // 触发表单验证
+      this.weituomodel = JSON.parse(sessionStorage.getItem('data'))
+      this.weituomodel.yangpins = JSON.parse(sessionStorage.getItem('yangpin'))
+      this.weituomodel.pinShiYans = JSON.parse(sessionStorage.getItem('yangpinkz'))
+
+      that.confirmLoading = true
+      let httpurl = ''
+      let method = ''
+      if (!this.model.id) {
+        httpurl += this.url.add
+        method = 'post'
+
+      } else {
+        httpurl += this.url.edit
+        method = 'put'
+        this.weituomodel.id = this.model.id
+
+      }
+
+      httpAction(httpurl, this.weituomodel, method).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message)
+          that.$emit('ok')
+        } else {
+          that.$message.warning(res.message)
+        }
+      }).finally(() => {
+        that.confirmLoading = false
+      })
+    },
+
+    handleCategoryChange(value, backObj) {
+      this.model = Object.assign(this.model, backObj)
+    }
+  }
+}
+</script>

+ 84 - 0
itdmWeb/src/views/module-iTDM/weituo/modules/ItdmWeituoInfoModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-weituo-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-weituo-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 ItdmWeituoInfoForm from './ItdmWeituoInfoForm'
+
+  export default {
+    name: 'ItdmWeituoInfoModal',
+    components: {
+      ItdmWeituoInfoForm
+    },
+    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>

+ 79 - 0
itdmWeb/src/views/module-iTDM/weituo/modules/ItdmWeituoInfoModal.vue

@@ -0,0 +1,79 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-weituo-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-weituo-info-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmWeituoInfoForm from './ItdmWeituoInfoForm'
+  export default {
+    name: 'ItdmWeituoInfoModal',
+    components: {
+      ItdmWeituoInfoForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1300,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+
+        sessionStorage.removeItem("data")
+        sessionStorage.removeItem("yangpin")
+        sessionStorage.removeItem("yangpinkz")
+
+        sessionStorage.removeItem("count")
+        sessionStorage.removeItem("count1")
+
+
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        sessionStorage.removeItem("data")
+        sessionStorage.removeItem("yangpin")
+        sessionStorage.removeItem("yangpinkz")
+        sessionStorage.removeItem("count")
+        sessionStorage.removeItem("count1")
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        sessionStorage.removeItem("data")
+        sessionStorage.removeItem("yangpin")
+        sessionStorage.removeItem("yangpinkz")
+        sessionStorage.removeItem("count")
+        sessionStorage.removeItem("count1")
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 129 - 0
itdmWeb/src/views/module-iTDM/weituo/modules/step/ItdmWeituoYangpinExtendForm.vue

@@ -0,0 +1,129 @@
+<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="委托id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoId">
+              <a-input v-model="model.weituoId" placeholder="请输入委托id"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="样品id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="yangpinId">
+              <a-input v-model="model.yangpinId" placeholder="请输入样品id"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="检测项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="testItems">
+              <a-input v-model="model.testItems" placeholder="请输入检测项目"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="检测依据" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardRequirement">
+              <j-search-select-tag v-model="model.standardRequirement" dict=""  />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="判定依据" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="judgementBasis">
+              <a-input v-model="model.judgementBasis" placeholder="请输入判定依据"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="beizhu">
+              <a-input v-model="model.beizhu" placeholder="请输入备注"  ></a-input>
+            </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: 'ItdmWeituoYangpinExtendForm',
+    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: {
+        },
+        url: {
+          add: "/weituo/itdmWeituoYangpinExtend/add",
+          edit: "/weituo/itdmWeituoYangpinExtend/edit",
+          queryById: "/weituo/itdmWeituoYangpinExtend/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>

+ 159 - 0
itdmWeb/src/views/module-iTDM/weituo/modules/step/Step1.vue

@@ -0,0 +1,159 @@
+<template>
+
+
+  <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+    <a-row>
+      <a-col :span="24">
+        <a-form-model-item label="委托单位名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoClient">
+          <a-input v-model="model.weituoClient" placeholder="请输入委托单位名称"></a-input>
+        </a-form-model-item>
+      </a-col>
+      <a-col :span="24">
+        <a-form-model-item label="委托单位地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoAddress">
+          <a-input v-model="model.weituoAddress" placeholder="请输入委托单位地址"></a-input>
+        </a-form-model-item>
+      </a-col>
+      <a-col :span="24">
+        <a-form-model-item label="委托联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoLxr">
+          <a-input v-model="model.weituoLxr" placeholder="请输入委托联系人"></a-input>
+        </a-form-model-item>
+      </a-col>
+      <a-col :span="24">
+        <a-form-model-item label="委托电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoPhone">
+          <a-input v-model="model.weituoPhone" placeholder="请输入委托电话"></a-input>
+        </a-form-model-item>
+      </a-col>
+      <a-col :span="24">
+        <a-form-model-item label="委托邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoEmail">
+          <a-input v-model="model.weituoEmail" placeholder="请输入委托邮箱"></a-input>
+        </a-form-model-item>
+      </a-col>
+      <a-col :span="24">
+        <a-form-model-item label="报告用章" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bgyz">
+          <j-dict-select-tag v-model="model.bgyz" placeholder="请选择报告形式"
+                             dictCode="weituo.bgyz" />
+        </a-form-model-item>
+      </a-col>
+      <a-col :span="24">
+        <a-form-model-item label="报告形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bgxs">
+
+
+          <j-dict-select-tag v-model="model.bgxs" placeholder="请选择报告形式"
+                             dictCode="weituo.bgxs" />
+
+        </a-form-model-item>
+      </a-col>
+      <a-col :span="24">
+        <a-form-model-item label="特殊要求" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="teshuyaoqiu">
+          <a-textarea v-model="model.teshuyaoqiu" placeholder="请输入特殊要求"></a-textarea>
+        </a-form-model-item>
+      </a-col>
+
+      <a-col :span="24">
+        <a-form-model-item label="试验条件文件地址" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                           prop="tiaojianFile">
+          <j-upload v-model="model.tiaojianFile"></j-upload>
+        </a-form-model-item>
+      </a-col>
+    </a-row>
+    <a-form-item :wrapperCol="{span: 19, offset: 5}">
+      <a-button type="primary" @click="nextStep">下一步</a-button>
+    </a-form-item>
+  </a-form-model>
+
+</template>
+
+<script>
+
+import { httpAction, getAction } from '@api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+
+export default {
+  name: 'step1',
+  components: {},
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 }
+      },
+      confirmLoading: false,
+      validatorRules: {
+        weituoClient: [
+          { required: true, message: '请输入委托单位!' }
+        ],
+        weituoAddress: [
+          { required: true, message: '请输入委托单位!' }
+        ],
+        weituoLxr: [
+          { required: true, message: '请输入委托联系人!' }
+        ],
+        weituoPhone: [
+          { required: true, message: '请输入委托电话!' }
+        ],
+        weituoEmail: [
+          { required: true, message: '请输入委托邮箱!' }
+        ],
+        bgyz: [
+          { required: true, message: '请输入报告用章!' }
+        ],
+        bgxs: [
+          { required: true, message: '请输入报告形式!' }
+        ],
+        teshuyaoqiu: [
+          { required: true, message: '请输入特殊要求!' }
+        ]
+      }
+
+    }
+  },
+  created() {
+
+  },
+
+  methods: {
+
+    init() {
+      const data = JSON.parse(sessionStorage.getItem('data'))
+
+      if (data != null) {
+        this.model = data
+
+
+
+
+      }
+    },
+
+    nextStep() {
+      const data = {
+        weituoClient: this.model.weituoClient,
+        weituoAddress: this.model.weituoAddress,
+        weituoLxr: this.model.weituoLxr,
+        weituoPhone: this.model.weituoPhone,
+        weituoEmail: this.model.weituoEmail,
+        bgyz: this.model.bgyz,
+        bgxs: this.model.bgxs,
+        teshuyaoqiu: this.model.teshuyaoqiu,
+        tiaojianFile: this.model.tiaojianFile
+      }
+
+      sessionStorage.setItem('data', JSON.stringify(data))
+      this.$emit('nextStep')
+
+      // this.$refs.form.validate(valid => {
+      //
+      //   if(valid){
+
+      //   }
+      // })
+    }
+  }
+
+}
+</script>

+ 195 - 0
itdmWeb/src/views/module-iTDM/weituo/modules/step/Step2.vue

@@ -0,0 +1,195 @@
+<template>
+
+  <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+    <a-table
+      :columns="columns"
+      :dataSource="data"
+      :pagination="false"
+    >
+      <template
+        v-for="(col, i) in ['sampleName', 'sampleModelSpecification', 'sampleQuantities','sampleManufacturer']"
+        :slot="col" slot-scope="text, record, index">
+        <a-input
+          :key="col"
+          style="margin: -5px 0"
+          :value="text"
+          :placeholder="columns[i].title"
+          @change="e => handleChange(e.target.value, record.key, col)"
+        />
+
+        <a-input type="hidden" name="id" :value="index"></a-input>
+      </template>
+
+      <template slot="operation" slot-scope="text, record, index">
+          <span>
+              <a-divider type="vertical" />
+              <a-popconfirm title="是否要删除此行?" @confirm="remove(record.key)">
+                <a>删除</a>
+              </a-popconfirm>
+            </span>
+      </template>
+    </a-table>
+    <a-button style="width: 100%; margin-top: 16px; margin-bottom: 8px" type="dashed" icon="plus" @click="newMember">
+      新增成员
+    </a-button>
+
+
+    <a-form-item :wrapperCol="{span: 19, offset: 5}">
+      <a-button style="margin-left: 8px" @click="prevStep">上一步</a-button>
+
+      <a-button type="primary" @click="nextStep">下一步</a-button>
+
+    </a-form-item>
+  </a-form-model>
+
+
+</template>
+
+<script>
+
+
+export default {
+  name: 'step2',
+
+  props: {},
+  data() {
+    return {
+      count: 1,
+      validatorRules: {
+        sampleName: [
+          { required: true, message: '请输入样品名称!' }
+        ],
+        sampleModelSpecification: [
+          { required: true, message: '请输入样品规格/型号!' }
+        ],
+        sampleQuantities: [
+          { required: true, message: '请输入样品数量!' }
+        ],
+        sampleManufacturer: [
+          { required: true, message: '请输入生产厂家!' }
+        ]
+      },
+      model: {},
+      description: '高级表单常见于一次性输入和提交大批量数据的场景。',
+      loading: false,
+
+      // table
+      columns: [
+        {
+          title: '样品名称',
+          dataIndex: 'sampleName',
+          key: 'sampleName',
+          width: '20%',
+          scopedSlots: { customRender: 'sampleName' }
+        },
+        {
+          title: '样品规格/型号',
+          dataIndex: 'sampleModelSpecification',
+          key: 'sampleModelSpecification',
+          width: '20%',
+          scopedSlots: { customRender: 'sampleModelSpecification' }
+        },
+        {
+          title: '样品数量',
+          dataIndex: 'sampleQuantities',
+          key: 'sampleQuantities',
+          width: '40%',
+          scopedSlots: { customRender: 'sampleQuantities' }
+        },
+        {
+          title: '生产厂家',
+          dataIndex: 'sampleManufacturer',
+          key: 'sampleManufacturer',
+          width: '40%',
+          scopedSlots: { customRender: 'sampleManufacturer' }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          scopedSlots: { customRender: 'operation' }
+        }
+      ],
+      data: []
+    }
+  },
+  created() {
+    const data = JSON.parse(sessionStorage.getItem('yangpin'))
+    if (data != null) {
+        for (let  xx of data) {
+          this.data.push({
+            key: xx.key,
+            sampleName: xx.sampleName,
+            sampleModelSpecification: xx.sampleModelSpecification,
+            sampleQuantities: xx.sampleQuantities,
+            sampleManufacturer: xx.sampleManufacturer,
+            editable: true,
+            isNew: true
+          })
+        }
+
+
+    }
+    this.count = sessionStorage.getItem('count') != null ? Number(sessionStorage.getItem('count')) : 1
+
+  },
+  methods: {
+
+    newMember() {
+      this.data.push({
+        key: this.count + '',
+        sampleQuantities: 0,
+        sampleModelSpecification: '',
+        sampleName: '',
+        sampleManufacturer: sessionStorage.getItem('data') ? JSON.parse(sessionStorage.getItem('data')).weituoClient : '',
+        editable: true,
+        isNew: true
+      })
+      this.count++
+      sessionStorage.setItem('count', this.count)
+
+    },
+    remove(key) {
+      const newData = this.data.filter(item => item.key !== key)
+      this.data = newData
+    },
+    saveRow(key) {
+      let target = this.data.filter(item => item.key === key)[0]
+      target.editable = false
+      target.isNew = false
+
+    },
+
+    handleChange(value, key, column) {
+      const newData = [...this.data]
+      const target = newData.filter(item => key === item.key)[0]
+      if (target) {
+        target[column] = value
+        this.data = newData
+      }
+    },
+    nextStep() {
+      sessionStorage.setItem('yangpin', JSON.stringify(this.data))
+
+
+      // this.$refs.form.validate(valid => {
+      //   if (valid) {
+      this.$emit('nextStep')
+      //   }
+      // })
+
+    },
+    prevStep() {
+      sessionStorage.setItem('yangpin', JSON.stringify(this.data))
+
+      this.$emit('prevStep')
+    }
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.card {
+  margin-bottom: 24px;
+}
+</style>

+ 247 - 0
itdmWeb/src/views/module-iTDM/weituo/modules/step/Step3.vue

@@ -0,0 +1,247 @@
+<template>
+
+  <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+    <a-table
+      :columns="columns"
+      :dataSource="data"
+      :pagination="false"
+    >
+
+
+      <template v-for="(col, i) in ['yangpinKeyId', 'testItems', 'standardRequirement','judgementBasis','beizhu']"
+                :slot="col" slot-scope="text, record, index">
+
+
+        <a-select
+          :key="col"
+          v-if="record.editable && col==='yangpinKeyId'"
+          style="margin: -5px 0"
+          :value="text"
+          :placeholder="columns[i].title"
+
+          @change="e => handleChange(e, record.key, col)">
+
+          <a-select-option v-for="d in yangpins" :key="d.key">
+            {{ d.sampleName }}
+          </a-select-option>
+        </a-select>
+
+
+        <a-input
+          :key="col"
+          v-if="record.editable && col==='testItems'"
+          style="margin: -5px 0"
+          :value="text"
+          :placeholder="columns[i].title"
+          @change="e => handleChange(e.target.value, record.key, col)"></a-input>
+
+
+        <j-search-select-tag
+          :key="col"
+          v-if="record.editable && col==='standardRequirement'"
+          style="margin: -5px 0"
+          :value="text"
+          :placeholder="columns[i].title" @change="e=>handleChange(e, record.key, col)"
+          dict="itdm_weituo_yiju,name,name" />
+
+        <a-input
+          :key="col"
+          v-if="record.editable && col==='judgementBasis'"
+          style="margin: -5px 0"
+          :value="text"
+          :placeholder="columns[i].title"
+          @change="e => handleChange(e.target.value, record.key, col)"></a-input>
+
+
+        <a-input
+          :key="col"
+          v-if="record.editable && col==='beizhu'"
+          style="margin: -5px 0"
+          :value="text"
+          :placeholder="columns[i].title"
+          @change="e => handleChange(e.target.value, record.key, col)"></a-input>
+
+
+      </template>
+
+      <template slot="operation" slot-scope="text, record, index">
+          <span>
+              <a-divider type="vertical" />
+              <a-popconfirm title="是否要删除此行?" @confirm="remove(record.key)">
+                <a>删除</a>
+              </a-popconfirm>
+            </span>
+      </template>
+
+
+    </a-table>
+    <a-button style="width: 100%; margin-top: 16px; margin-bottom: 8px" type="dashed" icon="plus" @click="newMember">
+      新增成员
+    </a-button>
+
+
+    <a-form-item :wrapperCol="{span: 19, offset: 5}">
+      <a-button style="margin-left: 8px" @click="prevStep">上一步</a-button>
+      <a-button style="margin-left: 8px" @click="submitForm">提交</a-button>
+
+
+    </a-form-item>
+  </a-form-model>
+
+
+</template>
+
+<script>
+
+
+export default {
+  name: 'step3',
+
+  props: {},
+  data() {
+    return {
+      yangpins: {},
+      count: 1,
+      model: {},
+      description: '高级表单常见于一次性输入和提交大批量数据的场景。',
+      loading: false,
+      validatorRules: {},
+      // table
+      columns: [
+        {
+          title: '样品名称',
+          dataIndex: 'yangpinKeyId',
+          key: 'yangpinKeyId',
+          width: '15%',
+          scopedSlots: { customRender: 'yangpinKeyId' }
+        },
+        {
+          title: '检测项目',
+          dataIndex: 'testItems',
+          key: 'testItems',
+          width: '20%',
+          scopedSlots: { customRender: 'testItems' }
+        },
+        {
+          title: '检测依据',
+          dataIndex: 'standardRequirement',
+          key: 'standardRequirement',
+          width: '20%',
+          scopedSlots: { customRender: 'standardRequirement' }
+        },
+        {
+          title: '判定依据',
+          dataIndex: 'judgementBasis',
+          key: 'judgementBasis',
+          width: '20%',
+          scopedSlots: { customRender: 'judgementBasis' }
+        },
+        {
+          title: '备注',
+          dataIndex: 'beizhu',
+          key: 'beizhu',
+          width: '25%',
+          scopedSlots: { customRender: 'beizhu' }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          scopedSlots: { customRender: 'operation' }
+        }
+      ],
+      data: []
+    }
+  },
+
+  created() {
+    const data = JSON.parse(sessionStorage.getItem('yangpinkz'))
+
+    if (data != null) {
+      for (let  xx of data) {
+        this.data.push({
+          key: xx.key,
+          yangpinKeyId: xx.yangpinKeyId,
+          testItems: xx.testItems,
+          standardRequirement: xx.standardRequirement,
+          judgementBasis: xx.judgementBasis,
+          beizhu: xx.beizhu,
+          editable: true,
+          isNew: true
+        })
+      }
+
+    }
+
+    const yangpins = JSON.parse(sessionStorage.getItem('yangpin'))
+
+    if (yangpins != null) {
+      this.yangpins = yangpins
+    }
+
+    this.count = sessionStorage.getItem('count1') != null ? Number(sessionStorage.getItem('count1')) : 1
+
+
+  },
+  methods: {
+
+    newMember() {
+      this.data.push({
+        key: this.count + '',
+        yangpinKeyId: '',
+        testItems: '',
+        standardRequirement: '',
+        judgementBasis: '',
+        beizhu: '',
+        editable: true,
+        isNew: true
+      })
+
+      this.count++
+      sessionStorage.setItem('count1', this.count)
+
+    },
+    remove(key) {
+      const newData = this.data.filter(item => item.key !== key)
+      this.data = newData
+    },
+    saveRow(key) {
+      let target = this.data.filter(item => item.key === key)[0]
+      target.editable = false
+      target.isNew = false
+
+    },
+
+    handleChange(value, key, column) {
+      const newData = [...this.data]
+      const target = newData.filter(item => key === item.key)[0]
+      if (target) {
+        target[column] = value
+        this.data = newData
+      }
+    },
+    submitForm() {
+      sessionStorage.setItem('yangpinkz', JSON.stringify(this.data))
+
+
+      // this.$refs.form.validate(valid => {
+      //   if (valid) {
+      this.$emit('submitForm')
+      //   }
+      // })
+
+    },
+    prevStep() {
+      sessionStorage.setItem('yangpinkz', JSON.stringify(this.data))
+
+      this.$emit('prevStep')
+    }
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.card {
+  margin-bottom: 24px;
+}
+</style>

+ 198 - 0
itdmWeb/src/views/module-iTDM/weituoyiju/ItdmWeituoYijuList.vue

@@ -0,0 +1,198 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="代号">
+              <a-input placeholder="请输入代号" v-model="queryParam.core"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="名称">
+              <a-input placeholder="请输入名称" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <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>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </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>
+
+    <itdm-weituo-yiju-modal ref="modalForm" @ok="modalFormOk"></itdm-weituo-yiju-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ItdmWeituoYijuModal from './modules/ItdmWeituoYijuModal'
+
+  export default {
+    name: 'ItdmWeituoYijuList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ItdmWeituoYijuModal
+    },
+    data () {
+      return {
+        description: '委托依据管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'名称',
+            align:"center",
+            dataIndex: 'name'
+          },
+          {
+            title:'代号',
+            align:"center",
+            dataIndex: 'core'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/weituoyiju/itdmWeituoYiju/list",
+          delete: "/weituoyiju/itdmWeituoYiju/delete",
+          deleteBatch: "/weituoyiju/itdmWeituoYiju/deleteBatch",
+          exportXlsUrl: "/weituoyiju/itdmWeituoYiju/exportXls",
+          importExcelUrl: "weituoyiju/itdmWeituoYiju/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
+        fieldList.push({type:'string',value:'core',text:'代号',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 117 - 0
itdmWeb/src/views/module-iTDM/weituoyiju/modules/ItdmWeituoYijuForm.vue

@@ -0,0 +1,117 @@
+<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="代号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="core">
+              <a-input v-model="model.core" placeholder="请输入代号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+              <a-input v-model="model.name" placeholder="请输入名称"  ></a-input>
+            </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: 'ItdmWeituoYijuForm',
+    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: {
+           name: [
+              { required: true, message: '请输入名称!'},
+           ],
+           core: [
+              { required: true, message: '请输入代号!'},
+           ],
+        },
+        url: {
+          add: "/weituoyiju/itdmWeituoYiju/add",
+          edit: "/weituoyiju/itdmWeituoYiju/edit",
+          queryById: "/weituoyiju/itdmWeituoYiju/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
itdmWeb/src/views/module-iTDM/weituoyiju/modules/ItdmWeituoYijuModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-weituo-yiju-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-weituo-yiju-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 ItdmWeituoYijuForm from './ItdmWeituoYijuForm'
+
+  export default {
+    name: 'ItdmWeituoYijuModal',
+    components: {
+      ItdmWeituoYijuForm
+    },
+    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
itdmWeb/src/views/module-iTDM/weituoyiju/modules/ItdmWeituoYijuModal.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="关闭">
+    <itdm-weituo-yiju-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-weituo-yiju-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmWeituoYijuForm from './ItdmWeituoYijuForm'
+  export default {
+    name: 'ItdmWeituoYijuModal',
+    components: {
+      ItdmWeituoYijuForm
+    },
+    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>