Browse Source

优化转交单页面

master
李磊 3 years ago
parent
commit
1a0839267a
  1. 111
      src/views/zjd/zjbg_list.vue
  2. 26
      src/views/zjd/zjd_list.vue

111
src/views/zjd/zjbg_list.vue

@ -6,7 +6,7 @@
<el-button type="primary" icon="el-icon-printer" @click="createZjdShow">
生成转交单
</el-button>
<div style="float:right;">
<!-- <div style="float:right;">
<el-badge :value="shoppingSize" :max="99" class="item">
<el-popover placement="bottom" width="800" trigger="click">
<div class="filter-container" style="padding-bottom: 3px;">
@ -34,14 +34,14 @@
</el-button>
</el-popover>
</el-badge>
</div>
</div>-->
</div>
</sticky>
<el-form>
<el-form-item>
<el-input v-model="listQuery.searchYsjl.serialNumber" placeholder="报检单编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.searchYsjl.zhucedaima" placeholder="注册代码" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.searchYsjl.shiyongdanwei" placeholder="使用单位" clearable style="width: 350px" @keyup.enter.native="handleFilter" />
<!-- <el-input v-model="listQuery.serialNumber" placeholder="报检单编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />-->
<el-input v-model="listQuery.zhucedaima" placeholder="注册代码" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.shiyongdanwei" placeholder="使用单位" clearable style="width: 350px" @keyup.enter.native="handleFilter" />
<el-button type="primary" size="small" icon="el-icon-search" @click="handleFilter">
查询
</el-button>
@ -49,13 +49,13 @@
清空
</el-button>
<br>
<el-input v-model="listQuery.searchYsjl.baogaobianhao" placeholder="报告编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.searchYsjl.shiyongdengjibianhao" placeholder="请输入使用登记证编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.searchYsjl.chanpinbianhao" placeholder="请输入产品编号" clearable style="width: 185px" @keyup.enter.native="handleFilter" />
<el-select v-model="listQuery.searchYsjl.jianyanleibie" placeholder="请选择检验类别" style="width: 165px" filterable clearable @change="handleFilter">
<el-option v-for="item in jylbList" :key="item.code" :label="item.name" :value="item.code" />
<el-input v-model="listQuery.baogaobianhao" placeholder="报告编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.shiyongdengjibianhao" placeholder="请输入使用登记证编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.chanpinbianhao" placeholder="请输入产品编号" clearable style="width: 185px" @keyup.enter.native="handleFilter" />
<el-select v-model="listQuery.neibuleibie" placeholder="请选择检验类别" style="width: 165px" filterable clearable @change="handleFilter">
<el-option v-for="item in jylbList" v-show="item.parentId" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
<el-date-picker v-model="listQuery.searchYsjl.xiacijianyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="请选择下次检验日期" style="width:145px" />
<el-date-picker v-model="listQuery.xiacijianyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="请选择下次检验日期" style="width:145px" />
<el-date-picker
v-model="jianyanriqi"
type="daterange"
@ -88,7 +88,7 @@
</template>
</el-table-column>
<el-table-column align="center" label="报告编号" prop="baogaobianhao" width="120" sortable="custom" />
<el-table-column align="center" label="检验类别" prop="jianyanleibie" width="90" />
<el-table-column :formatter="formatter.formatterCategory" align="center" label="检验类别" prop="jianyanleibie" width="90" />
<el-table-column align="center" label="使用登记证号" prop="shiyongdengjibianhao" width="140" sortable="custom" />
<el-table-column align="center" label="注册代码" prop="zhucedaima" width="160" sortable="custom" />
<el-table-column align="center" label="使用单位" prop="shiyongdanwei" width="240" />
@ -100,28 +100,28 @@
<el-table-column align="center" label="监检结束日期" prop="jianyanjieshuriqi" width="130" sortable="custom" />
<el-table-column align="center" label="下次检验日期" prop="xiacijianyanriqi" width="130" sortable="custom" />
<el-table-column align="center" label="检验结论" prop="jianyanjielun" width="80" />
<el-table-column fixed="right" align="center" label="操作" min-width="80">
<!-- <el-table-column fixed="right" align="center" label="操作" min-width="80">
<template slot-scope="scope">
<el-button type="primary" @click="addToCart(scope.$index)">
<svg-icon icon-class="shoppingCard" />
</el-button>
</template>
</el-table-column>
</el-table-column>-->
</el-table>
<pagination v-show="total>0" :total="total" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageRow" @pagination="getList" />
<el-dialog title="生成转交单" :visible.sync="zhuanjiaoVisible" width="30%">
<el-form ref="zhuanjiao" :model="zhuanjiao" :rules="rules" class="el-form" label-position="right" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="转交人" prop="zhuanjiaoren">
<el-input v-model="zhuanjiao.zhuanjiaoren" type="text" />
<el-form-item label="转交人" prop="createBy">
<el-input v-model="zhuanjiao.createBy" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="转交日期" prop="zhuanjiaoriqi">
<el-date-picker v-model="zhuanjiao.zhuanjiaoriqi" type="date" value-format="yyyy-MM-dd" placeholder="转交日期" style="width: 100%;" />
<el-form-item label="转交日期" prop="createTime">
<el-date-picker v-model="zhuanjiao.createTime" type="date" value-format="yyyy-MM-dd" placeholder="转交日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
@ -135,19 +135,19 @@
</el-button>
</div>
</el-dialog>
<el-dialog title="生成转交单" :visible.sync="zhuanjiaoCartVisible" width="30%">
<!-- <el-dialog title="生成转交单" :visible.sync="zhuanjiaoCartVisible" width="30%">
<el-form ref="zhuanjiao" :model="zhuanjiao" :rules="rules" class="el-form" label-position="right" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="转交人" prop="zhuanjiaoren">
<el-input v-model="zhuanjiao.zhuanjiaoren" type="text" />
<el-form-item label="转交人" prop="createBy">
<el-input v-model="zhuanjiao.createBy" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="转交日期" prop="zhuanjiaoriqi">
<el-date-picker v-model="zhuanjiao.zhuanjiaoriqi" type="date" value-format="yyyy-MM-dd" placeholder="转交日期" style="width: 100%;" />
<el-form-item label="转交日期" prop="createTime">
<el-date-picker v-model="zhuanjiao.createTime" type="date" value-format="yyyy-MM-dd" placeholder="转交日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
@ -160,7 +160,7 @@
</el-button>
</div>
</el-dialog>
</el-dialog>-->
</div>
</template>
@ -179,11 +179,7 @@ export default {
listQuery: {
pageNum: 1, //
pageRow: 20, //
order: 'id', //
sort: 'desc',
searchYsjl: {
departmentId: this.$store.getters.departmentId
}
orderBy: 'id desc' //
},
flowUserList: [],
dialogFormVisible: false,
@ -192,33 +188,24 @@ export default {
multipleSelection: [],
multipleCartSelection: [],
jianyanriqi: '',
jylbList: [{
code: '定期检验',
name: '定期检验'
}, {
code: '监督检验',
name: '监督检验'
}, {
code: '首次检验',
name: '首次检验'
}],
jylbList: [],
userList: [],
zhuanjiaoVisible: false,
zhuanjiaoCartVisible: false,
zhuanjiao: {
zhuanjiaoren: '',
zhuanjiaoriqi: '',
createBy: '',
createTime: '',
ysjlId: ''
},
rules: {
zhuanjiaoren: [{ required: true, message: '转交人不能为空', trigger: 'blur', validator: this.validator }],
zhuanjiaoriqi: [{ required: true, message: '转交日期不能为空', trigger: 'blur', validator: this.validator }]
createBy: [{ required: true, message: '转交人不能为空', trigger: 'blur', validator: this.validator }],
createTime: [{ required: true, message: '转交日期不能为空', trigger: 'blur', validator: this.validator }]
}
}
},
created() {
this.getList()
// this.jylbList = this.$store.getters.allCategory
this.jylbList = this.$store.getters.allCategory.filter(row => row.parentId)
this.userList = this.$store.getters.allUser
},
mounted() {
@ -238,14 +225,14 @@ export default {
getList() {
if (this.jianyanriqi) {
//
this.listQuery.searchYsjl.jianyankaishiriqi = this.jianyanriqi[0]
this.listQuery.searchYsjl.jianyanjieshuriqi = this.jianyanriqi[1]
this.listQuery.jianyankaishiriqi = this.jianyanriqi[0]
this.listQuery.jianyanjieshuriqi = this.jianyanriqi[1]
} else {
this.listQuery.searchYsjl.jianyankaishiriqi = ''
this.listQuery.searchYsjl.jianyanjieshuriqi = ''
this.listQuery.jianyankaishiriqi = ''
this.listQuery.jianyanjieshuriqi = ''
}
this.api({
url: '/report/getList',
url: '/ysjl/getListCanZj',
method: 'get',
params: this.listQuery
}).then(data => {
@ -254,8 +241,7 @@ export default {
})
},
sortChange(column) {
this.listQuery.order = column.prop
this.listQuery.sort = column.order.replace('ending', '')
this.listQuery.orderBy = column.prop + ' ' + column.order.replace('ending', '')
this.getList()
},
getIndex($index) {
@ -277,10 +263,10 @@ export default {
this.selection = val
},
clearQuery() {
this.$set(this.listQuery, 'searchYsjl', {
departmentId: this.$store.getters.departmentId,
createBy: this.$store.getters.userId,
printState: 0
this.$set(this, 'listQuery', {
pageNum: 1,
pageRow: 20,
orderBy: 'id desc'
})
this.jianyanriqi = ''
this.getList()
@ -297,9 +283,18 @@ export default {
return false
}
}
this.zhuanjiao.zhuanjiaoriqi = new Date()
this.zhuanjiao.zhuanjiaoren = this.$store.getters.nickname
this.zhuanjiaoVisible = true
this.api({
url: '/zjd',
method: 'post',
data: {
ysjlIds: this.$refs.list.selection.map(row => row.id),
sbzldm: this.$refs.list.selection[0].shebeizhongleidaima,
neibuleibie: this.$refs.list.selection[0].neibuleibie
}
}).then(data => {
this.getList()
Utils.$emit('zjd-list')
})
},
commitZjd() {
if (this.multipleSelection.length === 0) {

26
src/views/zjd/zjd_list.vue

@ -52,10 +52,10 @@
<span v-text="getIndex(scope.$index)" />
</template>
</el-table-column>
<el-table-column align="center" label="转交单编号" prop="bianhao" width="120" sortable="custom" />
<el-table-column align="center" label="转交人" prop="zhuanjiaoren" width="90" />
<el-table-column align="center" label="转交日期" prop="zhuanjiaoriqi" width="140" sortable="custom" />
<el-table-column align="center" label="确认人" prop="querenren" width="160" sortable="custom" />
<el-table-column align="center" label="转交单编号" prop="serialNumber" width="120" sortable="custom" />
<el-table-column :formatter="formatter.getChineseName" align="center" label="转交人" prop="createBy" width="90" />
<el-table-column align="center" label="转交日期" prop="createTime" width="140" sortable="custom" />
<el-table-column :formatter="formatter.getChineseName" align="center" label="确认人" prop="querenren" width="160" sortable="custom" />
<el-table-column align="center" label="确认日期" prop="querenriqi" width="240" />
<el-table-column align="center" label="操作" min-width="60">
<template slot-scope="scope">
@ -103,7 +103,7 @@
<el-table-column align="center" label="区划名称" prop="quhuamingcheng" width="80" />
<el-table-column align="center" label="注册代码" prop="zhucedaima" width="160" />
<el-table-column align="center" label="使用登记编号" prop="shiyongdengjibianhao" width="160" />
<el-table-column align="center" label="检验日期" prop="jianyanriqi" width="160" />
<el-table-column align="center" label="检验日期" prop="jianyanjieshuriqi" width="160" />
</el-table>
</el-dialog>
<iframe :src="printbutton" frameborder="0" scrolling="no" height="0px" aria-disabled="true" />
@ -170,7 +170,7 @@ export default {
},
getList() {
this.api({
url: '/zjd',
url: '/zjd/list',
method: 'get',
params: this.listQuery
}).then(data => {
@ -220,9 +220,15 @@ export default {
return false
}
}
this.zhuanjiao.querenriqi = new Date()
this.zhuanjiao.querenren = this.$store.getters.nickname
this.zhuanjiaoVisible = true
this.api({
url: '/zjd/complete',
method: 'post',
data: {
zjdIds: this.$refs.list.selection.map(row => row.id)
}
}).then(data => {
this.getList()
})
},
commitZjd() {
if (this.multipleSelection.length === 0) {
@ -260,7 +266,7 @@ export default {
zjdId: this.list[$index].id
}
}).then(data => {
this.zjdList = data.list
this.zjdList = data
this.zjdInfoVisible = true
})
},

Loading…
Cancel
Save