Commit b81ffddd by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

parents e720d7ce 06524e7b
......@@ -31,8 +31,16 @@ export default {
http.post('soil/v1/entrust/page_sample_receive_his', data).then(res => res),
pageSamplePrepare: data =>
http.post('soil/v1/entrust/page_sample_prepare', data).then(res => res),
pageSamplePrepareCheck: data =>
http
.post('soil/v1/entrust/page_sample_prepare_check', data)
.then(res => res),
pageSamplePrepareHis: data =>
http.post('soil/v1/entrust/page_sample_prepare_his', data).then(res => res),
pageSamplePrepareCheckHis: data =>
http
.post('soil/v1/entrust/page_sample_prepare_check_his', data)
.then(res => res),
getById: data => http.get('soil/v1/entrust/' + data).then(res => res),
getVOById: data => http.get('soil/v1/entrust/vo/' + data).then(res => res),
deleteById: data =>
......@@ -81,6 +89,8 @@ export default {
http.post('soil/v1/sample/send_sample', data).then(res => res),
pagePrepare: data =>
http.post('soil/v1/sample/page_prepare', data).then(res => res),
pagePrepareCheck: data =>
http.post('soil/v1/sample/page_prepare_check', data).then(res => res),
pagePrepareHis: data =>
http.post('soil/v1/sample/page_prepare_his', data).then(res => res),
pagePrepareDetailHis: data =>
......
......@@ -179,5 +179,20 @@ export default {
pageSecondaryHis: data =>
http.post('soil/v1/prepare/page_secondary_his', data).then(res => res),
sampleDeleteById: data =>
http.delete('soil/v1/sample/?ids=' + data).then(res => res)
http.delete('soil/v1/sample/?ids=' + data).then(res => res),
// 制备审核通过
prepareCheckOk: data =>
http.post('soil/v1/sample/prepare_check_ok?ids=' + data).then(res => res),
// 制备审核驳回
prepareCheckBack: data =>
http
.post(
'soil/v1/sample/prepare_check_back?ids=' +
data.ids +
'&remark=' +
data.remark
)
.then(res => res),
sampleBringOut: data =>
http.post('soil/v1/sample/sample_bring_out?ids=' + data).then(res => res)
}
......@@ -14,6 +14,9 @@
<Form-item class="search-item" label="试样编号:">
<Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable/>
</Form-item>
<Form-item class="search-item" label="钻孔名称:">
<Input @on-enter="_formSearch" v-model="formObj.boreholeName" name="boreholeName" placeholder="请输入钻孔名称" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
......@@ -89,9 +92,15 @@ export default {
formObj: {
entrustCode: undefined,
sampleCode: undefined,
name: undefined
name: undefined,
boreholeName: undefined
},
btn: [
{
type: 'success',
id: '',
name: '调出'
}
// {
// type: 'success',
// id: '',
......@@ -107,6 +116,7 @@ export default {
{ title: '委托商', key: 'client', width: 200 },
{ title: '委托编号', key: 'entrustCode', width: 120 },
{ title: '试样编号', key: 'sampleCode', width: 100 },
{ title: '钻孔名称', key: 'boreholeName', width: 100 },
{ title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '接收人', key: 'receiver', width: 120 },
......@@ -188,6 +198,9 @@ export default {
case '导出':
// this._export()
break
case '调出':
this._callout()
break
// 收起搜索
case 'search':
this.searchOpen = !this.searchOpen
......@@ -223,6 +236,27 @@ export default {
}
})
},
_callout() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定调出这' + this.selectIds.length + '条记录?',
onOk: () => {
this._calloutOk()
}
})
}
},
_calloutOk() {
console.log(this.selectIds)
const result = soilSample.sampleBringOut(this.selectIds)
if (result) {
this.$Message.success('调出成功')
this._page()
}
},
_upload(id) {
const obj = {
importUrl: '/soil/v1/standard_annex/upload/' + id
......
......@@ -4,14 +4,7 @@
class="zIndex-900 modal-footer-none">
<p slot="header">管理样品</p>
<div>
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="制备管理" name="prepareManage">
<SoilSampleManage ref="prepareManage"></SoilSampleManage>
</el-tab-pane>
<el-tab-pane label="原始记录填写" name="recordModal">
<RecordWrite ref="recordModal"></RecordWrite>
</el-tab-pane>
</el-tabs>
<SoilSampleManage ref="prepareManage"></SoilSampleManage>
<!-- <keep-alive>-->
<!-- &lt;!&ndash; eslint-disable-next-line vue/require-component-is &ndash;&gt;-->
<!-- <component ref="refModal" :is="currentComponent"></component>-->
......@@ -21,12 +14,10 @@
</div>
</template>
<script>
import SoilSampleManage from '../SoilSampleManageTab'
import RecordWrite from './sample-preparation-record/RecordIndex'
import SoilSampleManage from './SoilSampleManage'
export default {
components: {
SoilSampleManage,
RecordWrite
SoilSampleManage
},
data() {
return {
......@@ -36,9 +27,7 @@ export default {
showSampleModal: false,
modalTitle: '',
selectIds: [],
activeName: 'prepareManage',
name: '',
currentComponent: ''
name: ''
}
},
mounted() {},
......@@ -48,7 +37,6 @@ export default {
this.name = name
this.showSampleModal = true
this.entrustId = entrustId // 委托id
this.activeName = 'prepareManage'
this.selectIds = []
this._preparePage()
},
......@@ -56,23 +44,8 @@ export default {
_preparePage() {
this.$refs.prepareManage._open(this.entrustId)
},
// 原始记录填写
_recordPage() {
this.$refs.recordModal._open(this.entrustId)
},
_changeTabs(tab, event) {
if (tab.name === 'prepareManage') {
// this._issuedPage()
this.$refs.prepareManage._open(this.entrustId)
this.$refs.recordModal._clearTable()
} else {
this.$refs.recordModal._open(this.entrustId)
}
},
// 关闭弹框的时候刷新上个界面
_visibleChange(data) {
if (data === false) {
}
this.$emit('on-result-change')
}
}
}
......
......@@ -60,8 +60,6 @@ import Operation from '../../../components/operation/Operation'
import global from '../../../api/config'
import SampleManage from './SampleManage'
import SamplePreparationEdit from './SamplePreparationEdit'
import SoilSampleItemManageEdit from './SoilSampleItemManageEdit'
import SoilEntrustItemNum from './SoilItemNum'
export default {
components: {
// eslint-disable-next-line vue/no-unused-components
......@@ -69,11 +67,7 @@ export default {
// eslint-disable-next-line vue/no-unused-components
SamplePreparationEdit,
// eslint-disable-next-line vue/no-unused-components
SampleManage,
// eslint-disable-next-line vue/no-unused-components
SoilSampleItemManageEdit,
// eslint-disable-next-line vue/no-unused-components
SoilEntrustItemNum
SampleManage
},
data() {
return {
......@@ -88,16 +82,6 @@ export default {
name: '试样列表'
},
{
type: 'ios-apps',
id: '',
name: '试验项目列表'
},
{
type: 'ios-calculator-outline',
id: '',
name: '项目量统计'
},
{
type: 'ios-download',
id: '',
name: '导出开土制备记录'
......@@ -182,12 +166,6 @@ export default {
case '编辑':
this._editModal(true, data.id)
break
case '试验项目列表':
this._itemManage(data.id)
break
case '项目量统计':
this._itemNumManage(data.id)
break
case '导出开土制备记录':
this._exportPrepare(data.id)
break
......@@ -315,7 +293,7 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await soilEntrust.pageSamplePrepare(
const result = await soilEntrust.pageSamplePrepareCheck(
this.$serializeForm(this.formObj)
)
if (result) {
......@@ -346,20 +324,6 @@ export default {
this.$refs.editModal._open()
}
},
// 追加项目
_itemManage(data) {
this.currentComponent = 'SoilSampleItemManageEdit'
this.$nextTick(() => {
this.$refs.refModal._openByEntrustId(data)
})
// this.$refs.itemManageModal._openByEntrustId(data)
},
_itemNumManage(data) {
this.currentComponent = 'SoilEntrustItemNum'
this.$nextTick(() => {
this.$refs.refModal._open(data)
})
},
_uploadPhoto(data) {
// 上传照片文件
this.currentComponent = 'PhotoManage'
......
......@@ -250,7 +250,7 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await soilEntrust.pageSamplePrepareHis(this.formObj)
const result = await soilEntrust.pageSamplePrepareCheckHis(this.formObj)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
......
......@@ -36,7 +36,7 @@
placeholder="输入或选择制备方式"></AutoComplete>
</div>
<div v-else-if="item.key==='printNum'" @click="_handleRow(scope)">
<el-input v-model="scope.row.printNum" name="printNum" placeholder="输入打印数量">
<el-input v-model="scope.row.printNum" @input="inputChange(scope)" name="printNum" placeholder="输入打印数量">
</el-input>
</div>
<div v-else-if="item.key==='unit'" @click="_handleRow(scope)">
......@@ -149,6 +149,7 @@ export default {
getPage: {
records: []
},
currentIndex: -1,
selectData: [],
selectIds: [],
pageColumns: [
......@@ -206,6 +207,10 @@ export default {
this.$refs.pageTable._showLoading()
},
methods: {
inputChange(data) {
this.$forceUpdate()
this.getPage.records[data.$rowIndex].printNum = data.row.printNum
},
// 获取存储位置
_locationChange(msg, data, handleObj) {
this.currentRow = handleObj
......@@ -332,6 +337,7 @@ export default {
console.log(result[j].prepareDate)
console.log(new Date(result[j].prepareDate))
this.getPage.records[j].prepareDate = new Date(result[j].prepareDate)
this.getPage.records[j].printNum = 1
}
this.$refs.pageTable._hideLoading()
}
......
<!--检测项目编辑列表(添加、导入检测项目)-->
<template>
<div>
<Modal
v-model="showModal"
:mask-closable="false"
:width="690"
title="检测项目管理"
>
<Row>
<Col span="24">
<Form v-model="formObj" :label-width="90" inline onsubmit="return false">
<Form-item class="search-item" label="试验名称:" style="margin-left: -25px">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入试验名称" clearable />
</Form-item>
<!-- <Form-item class="search-item" label="检测依据:">-->
<!-- <Input v-model="formObj.code" placeholder="请输入检测依据名称" clearable @on-enter="_formSearch" />-->
<!-- </Form-item>-->
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--正常界面-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" @on-result-change="_btnClick" />
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span v-if="item.key==='judged'">
{{ scope.row[item.key]===1?'是':'否' }}
</span>
<div v-else-if="item.key==='compareSymbol'" @click.stop="_handleRow(scope)">
<el-input
v-model="scope.row.compareSymbol"
placeholder="请输入比较符"
/>
</div>
<div v-else-if="item.key==='limitValue'" @click.stop="_handleRow(scope)">
<el-input
v-model="scope.row.limitValue"
placeholder="请输入限值"
/>
</div>
<div v-else-if="item.key==='unit'" @click.stop="_handleRow(scope)">
<el-input
v-model="scope.row.unit"
placeholder="请输入单位"
/>
</div>
<div v-else-if="item.key==='code'" @click.stop="_handleRow(scope)">
<el-input
v-model="scope.row.code"
style="width: 130px;"
blur
placeholder="请选择检测依据"
/>
<i @click.stop="_selectjudgeBasis(scope.$index)" style="cursor: pointer;font-size: 14px;" class="icons iconfont pt-search icon-search"></i>
</div>
<span v-else>
{{ scope.row[item.key] }}
</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<div slot="footer">
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult" />
</div>
</Modal>
</div>
</template>
<script>
import { soilAptitude } from '../../../../api'
export default {
components: {},
data() {
return {
formObj: {
catalogueId: '',
name: '',
code: '',
standardCode: '',
standardName: ''
},
showModal: false,
searchOpen: false,
btn: [],
index: '',
iconMsg: [],
footerList: [
{ id: '', name: '取消', type: '' },
{ id: '', name: '保存', type: 'primary' }
],
pageColumns: [
{ title: '试验名称', key: 'name', width: 140 },
{ title: '大类', key: 'mainType', width: 140 },
{ title: '小类', key: 'smallType', width: 140 },
{ title: '方法', key: 'testMethod', width: 180 }
// { title: '设备', key: 'device', width: 180 },
// { title: '检测依据', key: 'code', width: 180 },
// { title: '检测科室', key: 'groupName', width: 110 },
// { title: '比较符', key: 'compareSymbol', width: 120 },
// { title: '限值', key: 'limitValue' },
// { title: '单位', key: 'unit' },
// { title: '是否系统判定', key: 'judged', width: 120, judged: true },
// { title: '备注', key: 'remark' }
],
catalogueId: '',
getPage: {},
selectData: []
}
},
methods: {
_open(catalogueId, label) {
this.formObj = this.$resetFields(this.formObj)
this.showModal = true
this.catalogueId = catalogueId
this.formObj.catalogueId = catalogueId
this.getPage.records = []
this.$refs.pageTable._hideLoading()
this._page()
// if (catalogueId) {
// this._page()
// }
},
_handleRow(scope) {
console.log(scope)
},
_selectjudgeBasis(index) {
console.log(index)
this.index = index
this.$refs.EditModal._open()
},
_backData(data) {
console.log(typeof this.index)
this.getPage.records[this.index].code = data.code
this.$set(
this.getPage.records,
this.index,
this.getPage.records[this.index]
)
console.log(this.getPage.records)
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_footerResult(name) {
switch (name) {
case '取消':
this._cancel()
break
case '保存':
this._ok()
break
}
},
_page: async function() {
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await soilAptitude.page(this.$serializeForm(this.formObj))
if (result) {
console.log(result)
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_btnClick(msg) {
switch (msg) {
case '导入检测项目':
this.$refs.relItemModal._open(this.catalogueId)
break
}
},
// 操作列操作
_iconClick(res, data) {
switch (res) {
case '删除':
this._deleteById(data.relPackageId)
break
}
},
// 删除
_deleteById(id) {
this.$Modal.confirm({
title: '提示',
content: '确定删除该数据?',
onOk: () => {
this._deleteOk(id)
}
})
},
// _deleteOk: async function(id) {
// // const result = await drugCatalogueItem.deleteById(id)
// if (result) {
// this.$Message.success('删除成功')
// this._page()
// }
// },
// table结果 返回整行
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this._page()
break
case 'selectData':
this.selectData = data
break
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
case 'changeSize':
this._page()
break
}
},
_ok() {
const data = this.selectData
if (data.length === 0) {
this._hideLoading()
this.$Message.warning('请选择至少一条数据!')
}
const ids = []
data.forEach(item => {
ids.push(item.id)
})
this._saveCatalogueItem(data)
},
_saveCatalogueItem(data) {
this.showModal = false
this._hideLoading()
this.$emit('on-result-change', data)
console.log('data------', data)
this._hideLoading()
},
_cancel() {
this.selectData = []
this.showModal = false
},
_hideLoading() {
this.$refs.footerModal._hideLoading()
}
}
}
</script>
......@@ -11,13 +11,16 @@
<Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item label="是否有试验项目:" class="search-item">
<Select v-model="formObj.haveExp" clearable name="groupId" style="width:150px" placeholder="请选择检测科室">
<Select v-model="formObj.haveExp" clearable name="groupId" style="width:150px" placeholder="请选择是否有试验项目">
<Option v-for="(item,index) in itemData" :value="item.value" :key="index">{{item.name}}</Option>
</Select>
</Form-item>
<Form-item label="筛选试样:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.experimentNames" name="experimentNames" placeholder="请输入试验项目" clearable></Input>
</Form-item>
<Form-item label="试验科室:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.groupName" name="groupName" placeholder="请输入试验科室" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
......@@ -61,20 +64,28 @@
<SampleReceiveModal ref="locationModal" @on-result-change="_page()"></SampleReceiveModal>
<SoilSampleItemManage ref="sampleItemManage" @on-result-change="_page"></SoilSampleItemManage>
<KeepAdress ref="keepAdressModal" @on-result-change="_page"></KeepAdress>
<SampleItemSelect ref="sampleItemSelectModal" @on-result-change="_itemImportBack" is-change />
</div>
</template>
<script>
import { soilEntrust } from '../../../../api'
import { soilEntrust, soilSample } from '../../../../api'
import SampleReceiveModal from '../SampleReceiveModal'
import SampleItemSelect from './SampleItemSelect'
import SoilSampleItemManage from './SoilSampleItemManage'
import KeepAdress from './KeepAdress'
export default {
components: { SampleReceiveModal, SoilSampleItemManage, KeepAdress },
components: {
SampleReceiveModal,
SoilSampleItemManage,
KeepAdress,
SampleItemSelect
},
data() {
return {
btn: [
{ type: 'primary', id: '', name: '收样室收样' },
{ type: 'primary', id: '', name: '样品留存' }
{ type: 'primary', id: '', name: '样品留存' },
{ type: 'primary', id: '', name: '导入试验项目' }
],
selectIds: [],
getPage: {},
......@@ -102,6 +113,7 @@ export default {
contractId: '', // 合同id
selectData: [],
currentComponent: '',
indexList: [],
formObj: {
samplingNum: '',
name: '',
......@@ -109,7 +121,8 @@ export default {
detectType: '',
standard: '',
samplingLinkList: [],
haveExp: undefined
haveExp: undefined,
groupName: undefined
},
stdList: [],
sampleLinkList: [
......@@ -281,12 +294,6 @@ export default {
this.$refs.refModal._open('扫码接收发放')
}
break
case '导入检测项目':
this._importItem()
break
case '导入检测项目包':
this._importItemPackage()
break
case '复制历史样品检测项目':
this._copyHisItem()
break
......@@ -296,6 +303,9 @@ export default {
case '样品留存':
this._sampleKeep(this.selectIds)
break
case '导入试验项目':
this._importItem()
break
case '打印标签':
this._selectPrinter('print-label')
break
......@@ -312,6 +322,33 @@ export default {
}
})
},
_importItem() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择至少一条数据!')
} else {
this.$refs.sampleItemSelectModal._open()
}
},
_itemImportBack(data) {
console.log(data)
if (data.length > 0) {
const ids = []
for (let i = 0; i < data.length; i++) {
ids.push(data[i].id)
}
this._importItemOk(ids)
}
},
_importItemOk: async function(ids) {
const result = await soilSample.importExperiments({
aptitudeIds: ids,
ids: this.selectIds
})
if (result) {
this.$Message.success('导入成功')
this._page()
}
},
// 1.自定义打印,除检样、备样、留样 增加制备标签,需要单独的查询制备标签的数据,
// 2.样品接收位置的制备用制备的的接口,将当前的保存方式置空,打印出来手动填写
_cusTomePrint() {
......@@ -512,7 +549,7 @@ export default {
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.getPage = this.$store.state.FoodSample.page
this._page()
break
case 'selectData':
this.selectData = data
......@@ -556,27 +593,6 @@ export default {
// })
}
},
// 导入检测项目包
_importItemPackage() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选中一条样品数据!')
} else {
this.$nextTick(() => {
this.$refs.refModal._open(this.selectIds)
})
}
},
// 导入检测项目
_importItem() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选中一条样品数据!')
} else {
this.$nextTick(() => {
this.$refs.refModal._open(this.selectIds, this.selectData[0])
})
}
},
_copyHisItem() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选中一条样品数据!')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment