Browse Source

fix:[试验管理][物资信息]

master
15881625488@163.com 3 days ago
parent
commit
efd18e65b4
7 changed files with 103 additions and 66 deletions
  1. +3
    -1
      src/lang/en/business/study/study.js
  2. +2
    -1
      src/lang/zh/business/study/study.js
  3. +64
    -36
      src/views/business/comps/select/SelectStudyDialog.vue
  4. +2
    -1
      src/views/business/resource/gyzj/comps/ffjl/Xq.vue
  5. +18
    -14
      src/views/business/resource/gyzj/comps/ffjlList.vue
  6. +11
    -10
      src/views/business/resource/gyzj/comps/gyzj/Ff.vue
  7. +3
    -3
      src/views/business/resource/gyzj/comps/gyzj/Xq.vue

+ 3
- 1
src/lang/en/business/study/study.js View File

@ -71,5 +71,7 @@ export default {
scsy: 'Remove Study',
jysj: 'Checkout Period',
qxzsy: 'Please Select Study'
qxzsy: 'Please Select Study',
other:'Other'
}

+ 2
- 1
src/lang/zh/business/study/study.js View File

@ -71,5 +71,6 @@ export default {
scsy: '删除试验',
jysj: '借阅时间',
qxzsy: '请选择试验'
qxzsy: '请选择试验',
other:'其他'
}

+ 64
- 36
src/views/business/comps/select/SelectStudyDialog.vue View File

@ -8,47 +8,53 @@
<el-input v-model="searchForm.name" :placeholder="$t('form.placeholderInput')" clearable
style="width: 150px" @keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.study.study.sn') + ':'" prop="sn">
<el-input v-model="searchForm.sn" :placeholder="$t('form.placeholderInput')" clearable
style="width: 150px" @keyup.enter.native="search" />
<el-form-item :label="$t('page.business.study.study.sn') + ':'" prop="sn">
<el-input v-model="searchForm.sn" :placeholder="$t('form.placeholderInput')" clearable style="width: 150px"
@keyup.enter.native="search" />
</el-form-item>
<el-form-item :label="$t('page.business.study.study.leader') + ':'" prop="leader">
<SelectDeptUser v-model="searchForm.leader" key="ffr2Id" />
<el-form-item :label="$t('page.business.study.study.leader') + ':'" prop="leader">
<SelectDeptUser v-model="searchForm.leader" key="ffr2Id" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" border :data="list">
<!-- 单选列 -->
<el-table-column width="80" align="center">
<template slot-scope="scope">
<el-radio v-model="selectedId" :label="scope.row.id" class="hide-label" @click.native.stop="handleRadioClick(scope.row)"></el-radio>
</template>
</el-table-column>
<el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" fixed="left" width="55" align="center" />
<el-table-column :label="$t('page.business.study.study.name')" align="center" prop="name" />
<el-table-column :label="$t('page.business.study.study.sn')" align="center" prop="sn" width="150px"/>
<el-table-column :label="$t('page.business.study.study.leader')" align="center" prop="leaderName" width="150px"/>
<el-table-column :label="$t('page.business.study.study.status')" prop="status" width="100">
<el-table-column :label="$t('page.business.study.study.sn')" align="center" prop="sn" width="150px" />
<el-table-column :label="$t('page.business.study.study.leader')" align="center" prop="leaderName"
width="150px" />
<el-table-column :label="$t('page.business.study.study.status')" prop="status" width="100">
<template slot-scope="scope">
<span v-if="scope.row.status===1"><span class="status-circle cg"></span>{{$t('page.business.study.study.statusCg')}}</span>
<span v-if="scope.row.status===3"><span class="status-circle syz"></span>{{$t('page.business.study.study.statusSyz')}}</span>
<span v-if="scope.row.status===5"><span class="status-circle ysd"></span>{{$t('page.business.study.study.statusYsd')}}</span>
<span v-if="scope.row.status===7"><span class="status-circle"></span>{{$t('page.business.study.study.statusDgd')}}</span>
<span v-if="scope.row.status===9"><span class="status-circle"></span>{{$t('page.business.study.study.statusGd')}}</span>
<span v-if="scope.row.status===10"><span class="status-circle"></span>{{$t('page.business.study.study.statusDjd')}}</span>
<span v-if="scope.row.status === 1"><span class="status-circle cg"></span>{{
$t('page.business.study.study.statusCg') }}</span>
<span v-if="scope.row.status === 3"><span class="status-circle syz"></span>{{
$t('page.business.study.study.statusSyz') }}</span>
<span v-if="scope.row.status === 5"><span class="status-circle ysd"></span>{{
$t('page.business.study.study.statusYsd') }}</span>
<span v-if="scope.row.status === 7"><span class="status-circle"></span>{{
$t('page.business.study.study.statusDgd') }}</span>
<span v-if="scope.row.status === 9"><span class="status-circle"></span>{{
$t('page.business.study.study.statusGd') }}</span>
<span v-if="scope.row.status === 10"><span class="status-circle"></span>{{
$t('page.business.study.study.statusDjd') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.study.study.createDate')" align="center" prop="createTime" width="140" />
<el-table-column :label="$t('page.business.study.study.createDate')" align="center" prop="createTime"
width="140" />
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize"
@pagination="getList" />
<el-checkbox v-model="checkedOther" @change="checkedOtherChange">{{
$t('page.business.study.study.other') }}</el-checkbox>
<el-input v-model="others" :disabled="!checkedOther" style="width: 400px;margin-left: 20px;" />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false">{{ $t('form.cancel') }}</el-button>
<el-button type="primary" :disabled="!(this.selectedId && this.selectedId !== '')" @click="handleSelect">{{
<el-button type="primary" :disabled="this.selectList.length == 0 && this.others == ''" @click="handleSelect">{{
$t('form.saveConfirm') }}</el-button>
</div>
</el-dialog>
@ -60,14 +66,18 @@ import { public_studyList } from "@/api/business/public/public";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
export default {
name: "SelectStudyDialog",
components: {SelectDeptUser },
components: { SelectDeptUser },
props: {
},
watch: {
},
data() {
return {
checkedOther: false,
others: '',
selectedId: null,
selectedName: null,
selectList: [],
loading: false,
open: false,
total: 0,
@ -85,18 +95,35 @@ export default {
mounted() {
},
methods: {
handleRadioClick(row) {
this.selectedId = row.id
checkedOtherChange() {
if (!this.checkedOther) {
this.others = ''
}
},
handleSelectionChange(selection) {
this.single = selection.length !== 1
this.multiple = !selection.length
this.selectList = selection
this.selectedId = _.map(this.selectList, 'id').join(',')
this.selectedName = _.map(this.selectList, 'name').join(',')
},
show(val) {
this.searchForm=_.merge({}, this.searchForm, val)
this.selectedId=null
this.searchForm = _.merge({}, this.searchForm, val)
this.selectedId = null
this.selectedName = null
this.checkedOther = false
this.others = null
this.$emit('callback', { id: '', name: '', other: '' })
this.search()
},
search() {
this.searchForm.pageNum = 1;
this.open = true
this.selectedId=null
this.selectedId = null
this.selectedName = null
this.checkedOther = false
this.others = null
this.$emit('callback', { id: '', name: '', other: '' })
this.getList();
},
reset() {
@ -118,10 +145,13 @@ export default {
})
},
handleSelect() {
let that = this
let _index = _.findIndex(this.list, function (item) { return item.id == that.selectedId })
debugger
this.$emit('callback', this.list[_index]);
let name=''
if(this.selectedName!=''&&this.others!=''){
name=this.selectedName+','+this.others
}else{
name=this.selectedName+this.others
}
this.$emit('callback', { id: this.selectedId, name: name, other: this.others })
this.open = false
}
}
@ -129,7 +159,5 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss">
.select-template {
}
.select-template {}
</style>

+ 2
- 1
src/views/business/resource/gyzj/comps/ffjl/Xq.vue View File

@ -75,7 +75,8 @@
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.resource.gyzj.md') }}</div>
<el-input type="text" :value="form.mdMc" maxlength="50" disabled />
<el-input type="text" v-if="form.mdOther&&form.mdOther!=''&&form.mdMcs&&form.mdMcs!=''" :value="form.mdMcs+','+form.mdOther" maxlength="50" disabled />
<el-input type="text" v-else :value="form.mdMcs+form.mdOther" maxlength="50" disabled />
</div>
</div>
<div class="pal">

+ 18
- 14
src/views/business/resource/gyzj/comps/ffjlList.vue View File

@ -86,13 +86,17 @@
</el-row>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" fixed="left" width="55" align="center" :selectable="checkSelectable" />
<el-table-column type="selection" fixed="left" width="55" align="center" :selectable="checkSelectable" />
<el-table-column :label="$t('page.business.resource.gyzj.mc')" align="left" prop="mc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gyzj.bh')" align="center" prop="bh"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gyzj.md')" align="center" prop="mdMc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gyzj.md')" align="center" width="150px">
<template slot-scope="scope">
<span v-if="scope.row.mdOther && scope.row.mdOther != ''&&scope.row.mdMcs && scope.row.mdMcs != ''">{{ scope.row.mdMcs }}{{ scope.row.mdOther }}</span>
<span v-else>{{ scope.row.mdMcs }},{{ scope.row.mdOther }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gyzj.zytj')" align="center" prop="ffzytj"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gyzj.cksj')" align="center" prop="ffrq" width="150px" />
@ -141,9 +145,9 @@
<el-table-column :label="$t('form.operate')" fixed="right" align="center"
class-name="small-padding fixed-width" width="250px">
<template slot-scope="scope">
<!-- 加签 -->
<el-button v-if="scope.row.jlzt == 1 " type="text"
@click="handleJq(scope.row)" v-hasPermi="['business:resource:gyzj:ffjljq']">{{
<!-- 加签 -->
<el-button v-if="scope.row.jlzt == 1" type="text" @click="handleJq(scope.row)"
v-hasPermi="['business:resource:gyzj:ffjljq']">{{
$t('page.business.resource.gyzj.jiaqian') }}</el-button>
<!-- 详情 -->
<el-button v-if="scope.row.jlzt == 1 || scope.row.jlzt == 3 || scope.row.jlzt == 7" type="text"
@ -166,7 +170,7 @@
v-hasPermi="['business:resource:gyzj:ffjljd']">{{
$t('page.business.resource.gyzj.jiedang') }}</el-button>
<!-- 借阅 -->
<el-button type="text" v-if="scope.row.jlzt == 7&&scope.row.jyzt == 1" @click="handleJy(scope.row)"
<el-button type="text" v-if="scope.row.jlzt == 7 && scope.row.jyzt == 1" @click="handleJy(scope.row)"
v-hasPermi="['business:resource:gyzj:ffjljy']">{{
$t('page.business.resource.gyzj.jieyue') }}</el-button>
</template>
@ -186,7 +190,7 @@
<!-- 借阅 -->
<Jy key="Jy" ref="Jy" @callback="handleQuery" />
<!-- 借阅 -->
<Xq key="Xq" v-show="showDetail" ref="Xq" @callback="closeXq"/>
<Xq key="Xq" v-show="showDetail" ref="Xq" @callback="closeXq" />
<!-- 加签 -->
<Jq key="Jq" ref="Jq" @callback="handleQuery" />
</div>
@ -212,7 +216,7 @@ export default {
daterangeCk: [],
daterangeRk: [],
loading: true,
showDetail:false,
showDetail: false,
single: true,
multiple: true,
total: 0,
@ -263,15 +267,15 @@ export default {
handlePlsd() {
this.$refs.Sd.showBatch(this.selectList)
},
closeXq(){
this.showDetail=false
this.$emit('showDetail',this.showDetail)
closeXq() {
this.showDetail = false
this.$emit('showDetail', this.showDetail)
this.handleQuery()
},
//
handleXq(row) {
this.showDetail=true
this.$emit('showDetail',this.showDetail)
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
},
//

+ 11
- 10
src/views/business/resource/gyzj/comps/gyzj/Ff.vue View File

@ -44,7 +44,7 @@
</el-table-column> -->
<el-table-column :label="$t('page.business.resource.gyzj.md')" align="center" width="250px">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.xmIds" maxlength="50"
<el-input type="text" v-model="scope.row.mdIds" maxlength="50"
:placeholder="$t('form.placeholderInput')" />
</template>
</el-table-column>
@ -121,7 +121,7 @@
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.md')" prop="mdIds">
<SelectStudy v-model="form.xmMcs" @change="selectStudyChange" />
<SelectStudy v-model="form.mdIds" @change="selectStudyChange" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
@ -313,8 +313,9 @@ export default {
created() {
},
methods: {
selectStudyChange(){
selectStudyChange(val){
this.form.mdMcs=val.name
this.form.mdOther=val.other
},
handleSc(row) {
const that = this
@ -338,9 +339,9 @@ export default {
a.ckmzdw = a.kcdw
a.zytj = null
a.ckmz = null
a.xmIds = null
a.xmMcs = null
a.xmOthers = null
a.mdIds = null
a.mdMcs = null
a.mdOther = null
a.remark = null
tmp.push(a)
})
@ -358,9 +359,9 @@ export default {
bh: null,
ckmzdw: null,
zytj: null,
xmIds: null,
xmMcs: null,
xmOthers: null,
mdIds: null,
mdMcs: null,
mdOther: null,
ckmz: null,
lqr1Id: null,
lqr1Mc: null,

+ 3
- 3
src/views/business/resource/gyzj/comps/gyzj/Xq.vue View File

@ -76,8 +76,8 @@
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.resource.gyzj.md') }}</div>
<el-input type="text" :value="form.xmMc" maxlength="50" disabled />
<div class="left-title">{{ $t('page.business.resource.gyzj.sssy') }}</div>
<el-input type="text" :value="form.studyMc" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.resource.gyzj.ssbd') }}</div>
@ -87,7 +87,7 @@
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.resource.gyzj.bdssr') }}</div>
<el-input type="text" :value="form.bdssrMc" maxlength="50" disabled />
<el-input type="text" :value="form.bdgsrMc" maxlength="50" disabled />
</div>
</div>
<div class="content-title">

Loading…
Cancel
Save