Browse Source

数据确认

wyh 2 years ago
parent
commit
64130c01ac

+ 10 - 1
itdmWeb/src/api/api.js

@@ -40,6 +40,10 @@ const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermission
 const getWeituoClientList = (params)=>getAction("/weituo/itdmWeituoInfo/distinctClientList",params);
 // 委托信息——根据委托单位查询委托信息列表
 const getWeituoInfoListByClient = (params)=>getAction("/weituo/itdmWeituoInfo/weituoNoList",params);
+// 根据委托编号获取日期下拉列表
+const getWeituoRq = (params)=>getAction("/gongdandetail/itdmGongdanDetail/gongdanWorkdateList",params);
+// 根据日期获取工单号下拉列表
+const getWeituoGdh = (params)=>getAction("/gongdandetail/itdmGongdanDetail/gongdanWoIdList",params);
 
 // 部门管理
 const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params);
@@ -87,6 +91,8 @@ const listBdc = (params)=>getAction("/itdmFirstPage/getFrstPageTaskNum",params);
 const listBdc2 = (params)=>getAction("/itdmFirstPage/itdmTask/list",params);
 // 数据确认提交按钮
 const saveSj = (params)=>postAction("/itdmgomgongdanshuju/ItdmGongdanshuju/editList",params);
+// 数据确认列表
+const listSj = (params)=>getAction("/itdmgomgongdanshuju/ItdmGongdanshuju/list",params);
 
 
 //日志管理
@@ -210,7 +216,10 @@ export {
   listGraph,
   listBdc,
   listBdc2,
-  saveSj
+  saveSj,
+  getWeituoRq,
+  getWeituoGdh,
+  listSj
 }
 
 

+ 1 - 0
itdmWeb/src/views/module-iTDM/gongdanshuju/ItdmGongdanShujuList.vue

@@ -185,6 +185,7 @@
           :mouse-config="{selected: true}"
           :checkbox-config="{range: true}"
           :menu-config="tableMenu"
+          :loading="loading"
           :keyboard-config="{isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true}"
           :edit-config="{trigger: 'dblclick', mode: 'cell'}">
           <vxe-column type="checkbox" width="60"></vxe-column>

+ 332 - 0
itdmWeb/src/views/module-iTDM/gongdanshuju/ItdmGongdanShujuList2.vue

@@ -0,0 +1,332 @@
+<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-select
+                        v-model="queryParam2.weituoClient"
+                        placeholder="请选择委托单位"
+                        show-search
+                        allowClear
+                        :options="weituoClientOptions"
+                        @change="getWeituoClientOptions">
+                        </a-select>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                      <a-form-item label="委托编号">
+                        <a-select
+                        v-model="queryParam2.weituoId"
+                        placeholder="请选择委托编号"
+                        show-search
+                        allowClear
+                        :options="weituoNoOptions"
+                        @change="getWeituoNoOptions">
+                        </a-select>
+                      </a-form-item>
+                  </a-col>
+                    <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                        <a-form-item label="日期">
+                            <a-select
+                            v-model="queryParam.riqi"
+                            placeholder="请选择日期"
+                            show-search
+                            allowClear
+                            :options="weituoRqOptions"
+                            @change="getWeituoRqOptions">
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                        <a-form-item label="工单号">
+                            <a-select
+                            v-model="queryParam.woId"
+                            placeholder="请选择工单号"
+                            show-search
+                            allowClear
+                            :options="weituoGdOptions"
+                            @change="getWoId">
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                        <a-form-item label="试验类型">
+                            <j-dict-select-tag placeholder="请选择试验类型" v-model="queryParam.shiyanType" dictCode="shiiyan_type"/>
+                        </a-form-item>
+                    </a-col>
+                <template v-if="toggleSearchStatus">
+                    <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                    <a-form-item label="试验开始时间">
+                        <a-time-picker
+                        style="width: 100%"
+                        format="HH:mm"
+                        :valueFormat="'HH:mm'"
+                        v-model="shiyanKaishitime"
+                        placeholder="请选择试验开始时间"
+                        />
+                    </a-form-item>
+                    </a-col>
+                    <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                    <a-form-item label="试验结束时间">
+                        <a-time-picker
+                        style="width: 100%"
+                        format="HH:mm"
+                        :valueFormat="'HH:mm'"
+                        v-model="shiyanJieshutime"
+                        placeholder="请选择结束时间"
+                        />
+                    </a-form-item>
+                    </a-col>
+                    <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                    <a-form-item label="频次">
+                        <a-input placeholder="请输入频次(分钟)" v-model="pinci"></a-input>
+                    </a-form-item>
+                    </a-col>
+                </template>
+                <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="getList" icon="search">查询</a-button>
+                    <a-button type="primary" @click="listReset" icon="reload" style="margin-left: 8px">重置</a-button>
+                    <a-button type="primary" @click="submitSJ" icon="check" style="margin-left: 8px">提交</a-button>
+                    <a-button type="primary" @click="create" icon="vertical-align-bottom" 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>
+
+        <vxe-toolbar>
+          <template #buttons>
+            <vxe-button icon="vxe-icon-square-plus" @click="insertEvent()">新增</vxe-button>
+            <vxe-button @click="$refs.xTable.removeCheckboxRow()">删除选中</vxe-button>
+          </template>
+        </vxe-toolbar>
+
+        <vxe-table
+          border
+          show-overflow
+          ref="xTable"
+          height="500"
+          :data="dataSource"
+          :mouse-config="{selected: true}"
+          :checkbox-config="{range: true}"
+          :menu-config="tableMenu"
+          :loading="loading"
+          :keyboard-config="{isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true}"
+          :edit-config="{trigger: 'dblclick', mode: 'cell'}">
+          <vxe-column type="checkbox" width="60"></vxe-column>
+          <vxe-column field="shiyanType_dictText" title="试验类型" :edit-render="{autofocus: '.vxe-input--inner'}">
+            <template #edit="{ row }">
+              <input v-model="row.shiyanType" type="text" class="myinput" />
+            </template>
+          </vxe-column>
+          <vxe-column field="shiyanTime" title="生成时间" :edit-render="{autofocus: '.vxe-input--inner'}">
+            <template #edit="{ row }">
+              <vxe-input v-model="row.shiyanTime" type="text"></vxe-input>
+            </template>
+          </vxe-column>
+          <vxe-column field="shiyanWendu" title="温度" :edit-render="{autofocus: '.vxe-input--inner'}">
+            <template #edit="{ row }">
+              <vxe-input v-model="row.shiyanWendu" type="text"></vxe-input>
+            </template>
+          </vxe-column>
+          <vxe-column field="shiyanShidu" title="湿度" :edit-render="{autofocus: '.vxe-input--inner'}">
+            <template #edit="{ row }">
+              <vxe-input v-model="row.shiyanShidu" type="text"></vxe-input>
+            </template>
+          </vxe-column>
+        </vxe-table>
+    </a-card>
+
+
+</template>
+
+<script>
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { getWeituoClientList, getWeituoInfoListByClient, getWeituoRq, getWeituoGdh, listSj, saveSj } from '@/api/api'
+import VXETable from 'vxe-table'
+export default {
+    mixins: [JeecgListMixin, mixinDevice],
+    data() {
+        return {
+            // 查询
+            queryParam2: {},
+            queryParam: {},
+            loading: false,
+            // 委托单位列表
+            weituoClientOptions : [],
+            // 委托编号列表
+            weituoNoOptions:[],
+            // 工单日期列表
+            weituoRqOptions:[],
+            // 工单号下拉列表
+            weituoGdOptions: [],
+            shiyanKaishitime: '',
+            shiyanJieshutime: '',
+            pinci: '',
+
+            // url: {
+            //     list: '/itdmgomgongdanshuju/ItdmGongdanshuju/list',
+            // },
+            dataSource: [],
+
+
+            tableMenu: {
+                body: {
+                options: [
+                    [
+                    { code: 'copy', name: '复制', prefixIcon: 'vxe-icon-copy', disabled: false },
+                    { code: 'remove', name: '删除', disabled: false },
+                    { code: 'save', name: '保存', prefixIcon: 'vxe-icon-save', disabled: false }
+                    ]
+                ]
+                }
+            },
+
+        }
+    },
+    created() {
+        this.getClientList();
+    },
+    methods: {
+        // 获取委托单位下拉列表
+        getClientList(){
+            getWeituoClientList().then((res) =>{
+                console.log(res)
+                this.weituoClientOptions = res.result.map( res => {
+                return{
+                    value: res,
+                    label: res
+                }
+                })
+            })
+        },
+        // 监听委托单位获取
+        getWeituoClientOptions(value){
+            console.log(value);
+            this.weituoNoOptions = []
+            this.queryParam2.weituoId = ''
+            getWeituoInfoListByClient(this.queryParam2).then((res) =>{
+                this.weituoNoOptions = res.result.map( res => {
+                return{
+                    value: res.id,  //传的值
+                    label: res.weituoNo,  //展示
+                }
+                })
+            })
+        },
+        // 监听选中的委托编号,以此获取日期的下拉列表
+        getWeituoNoOptions(value){
+            this.weituoRqOptions = []
+            this.queryParam.riqi = ''
+            getWeituoRq(this.queryParam2).then((res) =>{
+                console.log(res)
+                this.weituoRqOptions = res.result.map( res => {
+                    return{
+                        value: res,  //传的值
+                        label: res,  //展示
+                    }
+                })
+            })
+        },
+        // 监听选中的日期,以此获取工单号的下拉列表
+        getWeituoRqOptions(value){
+            this.weituoGdOptions = []
+            this.queryParam.woId = ''
+            console.log(this.queryParam)
+            const query ={}
+            query.weituoClient = this.queryParam2.weituoClient
+            query.weituoId = this.queryParam2.weituoId
+            query.riqi = this.queryParam.riqi
+            console.log(query,this.queryParam,this.queryParam2)
+            getWeituoGdh(query).then((res) =>{
+                console.log(res)
+                this.weituoGdOptions = res.result.map( res => {
+                    return{
+                        value: res,  //传的值
+                        label: res,  //展示
+                    }
+                })
+            })
+        },
+        getWoId(){
+            this.queryParam = {...this.queryParam}
+        },
+        getList(){
+            this.loading = true
+            console.log(2222,this.queryParam)
+            listSj(this.queryParam).then((res) => {
+                console.log(res)
+                this.dataSource = res.result
+                this.loading = false
+            })
+        },
+        listReset(){
+            this.queryParam = {}
+            this.queryParam2 = {}
+            this.dataSource = []
+        },
+        // vex-table
+          async insertEvent () {
+            const $table = this.$refs.xTable
+            const record = {
+              sex: '1'
+            }
+            const { row: newRow } = await $table.insertAt(record)
+            await $table.setActiveCell(newRow, 'name')
+          },
+          getInsertEvent () {
+            const $table = this.$refs.xTable
+            const insertRecords = $table.getInsertRecords()
+            VXETable.modal.alert(insertRecords.length)
+          },
+          getSelectionEvent () {
+            const $table = this.$refs.xTable
+            const selectRecords = $table.getCheckboxRecords()
+            VXETable.modal.alert(selectRecords.length)
+          },
+
+            // 提交
+            submitSJ(){
+                console.log(this.dataSource)
+                saveSj(this.dataSource).then((res) => {
+                })
+            },
+        create() {
+
+            var select = this.queryParam
+            select.shiyanKaishitime = this.shiyanKaishitime
+            select.shiyanJieshutime = this.shiyanJieshutime
+            select.pinci = this.pinci
+
+
+
+
+            httpAction('/itdmgomgongdanshuju/ItdmGongdanshuju/create',select, 'post').then((res) => {
+                if (res.success) {
+                console.log(res)
+                this.$message.success(res.message)
+                this.modalFormOk()
+                } else {
+                this.$message.warning(res.message)
+                }
+                this.searchReset()
+            })
+
+        }
+    }
+    
+}
+</script>
+
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 7 - 6
itdmWeb/src/views/module-iTDM/weituochaxun/ItdmWeituoYangpinList.vue

@@ -111,21 +111,22 @@
 
         <span slot="action" slot-scope="text, record">
           <!-- <a @click="handleEdit(record)">编辑</a> -->
+          <a @click="handleDetail(record)">详情</a>
 
-          <!-- <a-divider type="vertical" /> -->
+          <!-- <a-divider type="vertical" />
           <a-dropdown>
-            <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay"> -->
+            <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-menu-item>
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                   <a>删除</a>
                 </a-popconfirm>
               </a-menu-item>
-            </a-menu> -->
-          </a-dropdown>
+            </a-menu>
+          </a-dropdown> -->
         </span>
 
       </a-table>