Explorar o código

数据确认优化

wyh %!s(int64=2) %!d(string=hai) anos
pai
achega
eef085da4f

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

@@ -44,6 +44,10 @@ const getWeituoInfoListByClient = (params)=>getAction("/weituo/itdmWeituoInfo/we
 const getWeituoRq = (params)=>getAction("/gongdandetail/itdmGongdanDetail/gongdanWorkdateList",params);
 // 根据日期获取工单号下拉列表
 const getWeituoGdh = (params)=>getAction("/gongdandetail/itdmGongdanDetail/gongdanWoIdList",params);
+// 根据日期和工单号获取唯一的实验类型,实绩开始时间,实绩结束时间
+const getWeiYi = (params)=>getAction("/gongdandetail/itdmGongdanDetail/gongdanDateListByWoId",params);
+// 根据日期和工单号获取唯一的实验类型,实绩开始时间,实绩结束时间
+const getWeiSj = (params)=>getAction("/gongdandetail/itdmGongdanDetail/gongdanDateListByWoId1",params);
 
 // 部门管理
 const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params);
@@ -219,7 +223,9 @@ export {
   saveSj,
   getWeituoRq,
   getWeituoGdh,
-  listSj
+  listSj,
+  getWeiYi,
+  getWeiSj,
 }
 
 

+ 84 - 34
itdmWeb/src/views/module-iTDM/gongdanshuju/ItdmGongdanShujuList2.vue

@@ -1,4 +1,5 @@
 <template>
+  <div>
     <a-card :bordered="false">
         <!-- 查询区域 -->
         <div class="table-page-search-wrapper">
@@ -31,7 +32,7 @@
                     <a-col :xl="6" :lg="7" :md="8" :sm="24">
                         <a-form-item label="日期">
                             <a-select
-                            v-model="queryParam.riqi"
+                            v-model="queryParam2.riqi"
                             placeholder="请选择日期"
                             show-search
                             allowClear
@@ -54,7 +55,14 @@
                     </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"/>
+                            <!-- <j-dict-select-tag placeholder="请选择试验类型" v-model="queryParam.shiyanType" dictCode="shiiyan_type"/> -->
+                            <a-select
+                            v-model="queryParam2.shiyanType"
+                            placeholder="请选择实验类型"
+                            show-search
+                            allowClear
+                            :options="shiyanTypeOption">
+                            </a-select>
                         </a-form-item>
                     </a-col>
                 <template v-if="toggleSearchStatus">
@@ -91,6 +99,7 @@
                     <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="submitFJ" icon="to-top" 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 ? '收起' : '展开' }}
@@ -156,19 +165,37 @@
         </vxe-table>
     </a-card>
 
+    <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <!-- <itdm-yuzhi-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-yuzhi-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>
 
+  </div>
 </template>
 
 <script>
 import { mixinDevice } from '@/utils/mixin'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil'
-import { getWeituoClientList, getWeituoInfoListByClient, getWeituoRq, getWeituoGdh, listSj, saveSj } from '@/api/api'
+// import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil'
+import { getWeituoClientList, getWeituoInfoListByClient, getWeituoRq, getWeituoGdh, getWeiYi, getWeiSj, listSj, saveSj } from '@/api/api'
 import VXETable from 'vxe-table'
 export default {
     mixins: [JeecgListMixin, mixinDevice],
     data() {
         return {
+            title:"上传附件",
+            width:800,
+            visible: false,
             // 查询
             queryParam2: {},
             queryParam: {},
@@ -181,6 +208,8 @@ export default {
             weituoRqOptions:[],
             // 工单号下拉列表
             weituoGdOptions: [],
+            // 实验类型下拉列表
+            shiyanTypeOption: [],
             shiyanKaishitime: '',
             shiyanJieshutime: '',
             pinci: '',
@@ -199,7 +228,6 @@ export default {
                 ]
                 }
             },
-            // shiiyanTypeOptions: []
 
         }
     },
@@ -237,7 +265,7 @@ export default {
         // 监听选中的委托编号,以此获取日期的下拉列表
         getWeituoNoOptions(value){
             this.weituoRqOptions = []
-            this.queryParam.riqi = ''
+            this.queryParam2.riqi = ''
             getWeituoRq(this.queryParam2).then((res) =>{
                 console.log(res)
                 this.weituoRqOptions = res.result.map( res => {
@@ -253,12 +281,12 @@ export default {
             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) =>{
+            // 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(this.queryParam2).then((res) =>{
                 console.log(res)
                 this.weituoGdOptions = res.result.map( res => {
                     return{
@@ -268,8 +296,40 @@ export default {
                 })
             })
         },
-        getWoId(){
-            this.queryParam = {...this.queryParam}
+        // // 获取字典数据-试验类型
+        // initDictConfig() {
+        //   initDictOptions('shiiyan_type').then((res) => {
+        //     if (res.success) {
+        //         this.shiiyanTypeOptions = res.result;
+        //     }
+        //   });
+        // },
+        // // 试验类型显示
+        // formatShiyanType (value) {
+        //   var typeLabel
+        //   var typeObj = this.shiiyanTypeOptions.find(res => res.value === value)
+        //   if(typeObj){
+        //     typeLabel = typeObj.label
+        //   }
+        //   return typeLabel
+        // },
+        // 获取试验类型
+        getWoId(value){
+            // this.queryParam = {...this.queryParam}
+            const query ={}
+            this.shiyanTypeOption = []
+            query.riqi = this.queryParam2.riqi
+            query.woId = this.queryParam.woId
+            console.log(query,this.queryParam,this.queryParam2)
+            getWeiYi(query).then((res) => {
+                console.log(res)
+                this.shiyanTypeOption = res.result.map( res => {
+                    return{
+                        value: res.type,  //传的值
+                        label: res.name,  //展示
+                    }
+                })
+            })
         },
         getList(){
             this.loading = true
@@ -315,7 +375,14 @@ export default {
             // console.log(this.dataSource)
             saveSj(this.dataSource).then((res) => {
             })
-            
+        },
+        close () {
+            this.$emit('close');
+            this.visible = false;
+        },
+        // 上传附件
+        submitFJ(){
+            this.visible = true
         },
         create() {
 
@@ -323,7 +390,7 @@ export default {
             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)
@@ -336,25 +403,8 @@ export default {
             })
 
         },
-        // // 获取字典数据-试验类型
-        // initDictConfig() {
-        //   initDictOptions('shiiyan_type').then((res) => {
-        //     if (res.success) {
-        //         this.shiiyanTypeOptions = res.result;
-        //     }
-        //   });
-        // },
-        // // 试验类型显示
-        // formatShiyanType (value) {
-        //   var typeLabel
-        //   var typeObj = this.shiiyanTypeOptions.find(res => res.value === value)
-        //   if(typeObj){
-        //     typeLabel = typeObj.label
-        //   }
-        //   return typeLabel
-        // },
     }
-    
+
 }
 </script>