Commit 615cdd63 by zhangmengqi

Merge branch 'dev'

parents 6191e020 25871830
...@@ -134,11 +134,26 @@ export default { ...@@ -134,11 +134,26 @@ export default {
http.post('res/v1/dict/dict_query?type=' + data).then(res => res), http.post('res/v1/dict/dict_query?type=' + data).then(res => res),
editBackup: data => editBackup: data =>
http.put('soil/v1/sample_backup/' + data.id, data.obj).then(res => res), http.put('soil/v1/sample_backup/' + data.id, data.obj).then(res => res),
bathUpdateBackupInfo: data =>
http
.post(
'soil/v1/sample_backup/bath_update_backup_info/?ids=' + data.id,
data.obj
)
.then(res => res),
editItem: data => editItem: data =>
http.post('soil/v1/experiment/bath_update_info', data).then(res => res), http.post('soil/v1/experiment/bath_update_info', data).then(res => res),
// 余样编辑 // 余样编辑
editPrepare: data => editPrepare: data =>
http.put('soil/v1/prepare/' + data.id, data.obj).then(res => res), http.put('soil/v1/prepare/' + data.id, data.obj).then(res => res),
// 批量填写余样信息
bathUpdateSurplusInfo: data =>
http
.post(
'soil/v1/prepare/bath_update_surplus_info/?ids=' + data.id,
data.obj
)
.then(res => res),
getUserList: data => http.post('/base/v1/user/page').then(res => res), getUserList: data => http.post('/base/v1/user/page').then(res => res),
scanTakeSample: data => scanTakeSample: data =>
http http
......
...@@ -22,6 +22,8 @@ export default { ...@@ -22,6 +22,8 @@ export default {
// 试验任务按样品分配-试验项目分配操作 // 试验任务按样品分配-试验项目分配操作
allotExp: data => allotExp: data =>
http.post('soil/v1/experiment/allot_exp', data).then(res => res), http.post('soil/v1/experiment/allot_exp', data).then(res => res),
changeExpAllot: data =>
http.post('soil/v1/experiment/change_exp_allot', data).then(res => res),
// 试验任务分配样品对应检测项目分页列表 // 试验任务分配样品对应检测项目分页列表
pageAllot: data => pageAllot: data =>
http.post('soil/v1/experiment/page_allot', data).then(res => res), http.post('soil/v1/experiment/page_allot', data).then(res => res),
......
...@@ -83,6 +83,7 @@ export default { ...@@ -83,6 +83,7 @@ export default {
) )
this.showModal = false this.showModal = false
} else { } else {
this.$refs.footerModal._hideLoading()
this.$Message.error('表单验证失败!') this.$Message.error('表单验证失败!')
} }
}) })
......
...@@ -284,6 +284,7 @@ export default { ...@@ -284,6 +284,7 @@ export default {
title: '提示', title: '提示',
content: '确定要提交 ' + ids.length + ' 条记录?', content: '确定要提交 ' + ids.length + ' 条记录?',
onOk: () => { onOk: () => {
this.$refs.pageTable._showLoading()
this._subToSkipRe(ids) this._subToSkipRe(ids)
} }
}) })
...@@ -299,6 +300,7 @@ export default { ...@@ -299,6 +300,7 @@ export default {
title: '提示', title: '提示',
content: '确定要把这 ' + ids.length + ' 条记录提交到' + cont + '?', content: '确定要把这 ' + ids.length + ' 条记录提交到' + cont + '?',
onOk: () => { onOk: () => {
this.$refs.pageTable._showLoading()
this._subToRe(ids) this._subToRe(ids)
} }
}) })
...@@ -320,6 +322,7 @@ export default { ...@@ -320,6 +322,7 @@ export default {
_resultChange(msg) { _resultChange(msg) {
this.$Message.success(msg) this.$Message.success(msg)
this._page() this._page()
this.$refs.pageTable._hideLoading()
}, },
_record(id) { _record(id) {
this.currentComponent = 'Operation' this.currentComponent = 'Operation'
......
...@@ -185,12 +185,12 @@ export default { ...@@ -185,12 +185,12 @@ export default {
} }
}, },
_reasonResult(data) { _reasonResult(data) {
this.$refs.pageTable._showLoading()
if (undefined !== data && data !== '') { if (undefined !== data && data !== '') {
this._reportCheckBack(data) this._reportCheckBack(data)
} }
}, },
_reportCheckBack: async function(data) { _reportCheckBack: async function(data) {
console.log('开始退回')
const result = await soilEntrust.back({ const result = await soilEntrust.back({
ids: this.selectIds, ids: this.selectIds,
remark: data remark: data
...@@ -198,8 +198,8 @@ export default { ...@@ -198,8 +198,8 @@ export default {
if (result) { if (result) {
this.$Message.success('退回成功!') this.$Message.success('退回成功!')
console.log('退回成功')
await this._page() await this._page()
this.$refs.pageTable._hideLoading()
} }
}, },
_iconClick(res, data) { _iconClick(res, data) {
...@@ -293,6 +293,7 @@ export default { ...@@ -293,6 +293,7 @@ export default {
title: '提示', title: '提示',
content: '确定通过该委托单?', content: '确定通过该委托单?',
onOk: () => { onOk: () => {
this.$refs.pageTable._showLoading()
this._passEntrustReview(this.selectIds) this._passEntrustReview(this.selectIds)
} }
}) })
...@@ -302,6 +303,7 @@ export default { ...@@ -302,6 +303,7 @@ export default {
if (result) { if (result) {
this.$Message.success('提交成功!') this.$Message.success('提交成功!')
await this._page() await this._page()
this.$refs.pageTable._hideLoading()
} }
}, },
......
...@@ -153,6 +153,9 @@ export default { ...@@ -153,6 +153,9 @@ export default {
} }
} }
}, },
mounted() {
this.$refs.pageTable._showLoading()
},
methods: { methods: {
_inputChange: async function(info) { _inputChange: async function(info) {
const result = await soilEntrust.sampleEdit({ const result = await soilEntrust.sampleEdit({
...@@ -396,8 +399,8 @@ export default { ...@@ -396,8 +399,8 @@ export default {
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result this.getPage = result
this.$refs.pageTable._hideLoading()
} }
}, },
_deleteByIds(ids, content) { _deleteByIds(ids, content) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<Modal v-model="showModal" :mask-closable="false"> <Modal v-model="showModal" :mask-closable="false">
<p slot="header">填写存放信息</p> <p slot="header">填写存放信息</p>
<div> <div>
<Form id="storage-location-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="100"> <Form id="storage-location-form" ref="formObj" :model="formObj" :label-width="100">
<Form-item label="存储条件:"> <Form-item label="存储条件:">
<el-select :value="formObj.conditions" @change="selCondi" style="width:100%" size="small"> <el-select :value="formObj.conditions" @change="selCondi" style="width:100%" size="small">
<el-option v-for="item in conditionList" :value="item.name" :key="item.name">{{ item.name }} <el-option v-for="item in conditionList" :value="item.name" :key="item.name">{{ item.name }}
...@@ -88,9 +88,6 @@ export default { ...@@ -88,9 +88,6 @@ export default {
this.getPage.records[this.currentIndex].backupUser = '' this.getPage.records[this.currentIndex].backupUser = ''
} }
this.formObj.backupUserId = data this.formObj.backupUserId = data
// this.$forceUpdate()
// this.getPage.records[this.currentIndex].backupUser = data
// this.getPage.records[this.currentIndex].backupUser = data
}, },
// 存储条件 回调 // 存储条件 回调
_locChangeCondition(msg, data) { _locChangeCondition(msg, data) {
...@@ -150,7 +147,7 @@ export default { ...@@ -150,7 +147,7 @@ export default {
_ok() { _ok() {
this.$refs.formObj.validate(valid => { this.$refs.formObj.validate(valid => {
if (valid) { if (valid) {
const data = this.formObj const data = this.$serializeForm(this.formObj)
this._saveInfo({ id: this.ids.join(','), obj: data }) this._saveInfo({ id: this.ids.join(','), obj: data })
} else { } else {
this.$Message.error('表单验证失败!') this.$Message.error('表单验证失败!')
...@@ -159,9 +156,11 @@ export default { ...@@ -159,9 +156,11 @@ export default {
}) })
}, },
_saveInfo: async function(data) { _saveInfo: async function(data) {
const result = await soilSample.editBackup(data) const result = await soilSample.bathUpdateBackupInfo(data)
if (result) { if (result) {
this.$Message.success('保存成功') this.$Message.success('保存成功')
this.$emit('on-result-change')
this.showModal = false
} }
} }
} }
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</div> </div>
<SampleParpareApply ref="applyModal" @on-result-change="_page"></SampleParpareApply> <SampleParpareApply ref="applyModal" @on-result-change="_page"></SampleParpareApply>
<Operation ref="recordModal"></Operation> <Operation ref="recordModal"></Operation>
<SampleParpareBatchEdit ref="batchEdit"></SampleParpareBatchEdit> <SampleParpareBatchEdit ref="batchEdit" @on-result-change="_page"></SampleParpareBatchEdit>
</div> </div>
</template> </template>
<script> <script>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<Row> <Row>
<!--操作--> <!--操作-->
<Col span="24"> <Col span="24">
<btn-list :msg="btn" class="contHide" @on-result-change="_btnClick"></btn-list> <btn-list :msg="btn" @on-result-change="_btnClick" class="contHide"></btn-list>
</Col> </Col>
<!--内容--> <!--内容-->
<Col span="24"> <Col span="24">
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
:table-height="tableHeight" :table-height="tableHeight"
:get-page="getPage" :get-page="getPage"
:form-id="formId" :form-id="formId"
@on-result-change="_tableResultChange"
select-data select-data
is-edit is-edit
hide-page hide-page>
@on-result-change="_tableResultChange">
<vxe-table-column <vxe-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
<template v-slot:edit="scope"> <template v-slot:edit="scope">
<div v-if="item.key==='prepareWay'" @click="_handleRow(scope)"> <div v-if="item.key==='prepareWay'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.prepareWay" :down-data="preparationWayData" :way-data="wayData" <AutoComplete v-model="scope.row.prepareWay" :down-data="preparationWayData" :way-data="wayData"
:handle-obj="scope" clearable placeholder="输入或选择制备方式" :handle-obj="scope" @on-result-change="_preparationChange" clearable
@on-result-change="_preparationChange"></AutoComplete> placeholder="输入或选择制备方式"></AutoComplete>
</div> </div>
<div v-else-if="item.key==='unit'" @click="_handleRow(scope)"> <div v-else-if="item.key==='unit'" @click="_handleRow(scope)">
<el-input v-model="scope.row.unit" name="unit" placeholder="输入或选择单位"> <el-input v-model="scope.row.unit" name="unit" placeholder="输入或选择单位">
...@@ -46,13 +46,13 @@ ...@@ -46,13 +46,13 @@
<span v-else-if="item.key==='type'">{{ scope.row[item.key]===0? '检样':'备样' }}</span> <span v-else-if="item.key==='type'">{{ scope.row[item.key]===0? '检样':'备样' }}</span>
<div v-else-if="item.key==='keepWay'" @click="_handleRow(scope)"> <div v-else-if="item.key==='keepWay'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.keepWay" :handle-obj="scope" :down-data="saveWayData" <AutoComplete v-model="scope.row.keepWay" :handle-obj="scope" :down-data="saveWayData"
clearable placeholder="输入或选择保存方式" @on-result-change="_saveChange" clearable
show-key="name" @on-result-change="_saveChange"></AutoComplete> placeholder="输入或选择保存方式" show-key="name"></AutoComplete>
</div> </div>
<div v-else-if="item.key==='keepContainer'" @click="_handleRow(scope)"> <div v-else-if="item.key==='keepContainer'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.keepContainer" :handle-obj="scope" :down-data="packList" <AutoComplete v-model="scope.row.keepContainer" :handle-obj="scope" :down-data="packList"
clearable placeholder="输入或选择保存容器" @on-result-change="_packSaveChange" clearable
show-key="name" @on-result-change="_packSaveChange"></AutoComplete> placeholder="输入或选择保存容器" show-key="name"></AutoComplete>
</div> </div>
<!-- <div v-else-if="item.key==='prepareDate'" @click="_handleTimeRow(scope)">--> <!-- <div v-else-if="item.key==='prepareDate'" @click="_handleTimeRow(scope)">-->
<!-- <el-date-picker--> <!-- <el-date-picker-->
...@@ -62,16 +62,16 @@ ...@@ -62,16 +62,16 @@
<!-- </el-date-picker>--> <!-- </el-date-picker>-->
<!-- </div>--> <!-- </div>-->
<div v-else-if="item.key==='prepareDate'" @click="_handleRow(scope)"> <div v-else-if="item.key==='prepareDate'" @click="_handleRow(scope)">
<el-date-picker v-model="scope.row.prepareDate" type="datetime" format="yyyy-MM-dd HH:mm" style="width:100%;" placeholder="请选择日期" <el-date-picker v-model="scope.row.prepareDate" @change="timeChange(scope.row)" type="datetime" format="yyyy-MM-dd HH:mm" style="width:100%;"
@change="timeChange(scope.row)"></el-date-picker> placeholder="请选择日期"></el-date-picker>
</div> </div>
<div v-else-if="item.key==='preparer'" @click="_handleRow(scope)"> <div v-else-if="item.key==='preparer'" @click="_handleRow(scope)">
<el-input v-model="scope.row.preparer" placeholder="制备人" <el-input v-model="scope.row.preparer" @focus="_handleRow(scope)"
size="small" name="preparer" @focus="_handleRow(scope)"></el-input> placeholder="制备人" size="small" name="preparer"></el-input>
</div> </div>
<div v-else-if="item.key==='remark'" @click="_handleRow(scope)"> <div v-else-if="item.key==='remark'" @click="_handleRow(scope)">
<el-input v-model="scope.row.remark" placeholder="备注" size="small" <el-input v-model="scope.row.remark" @focus="_handleRow(scope)" placeholder="备注"
@focus="_handleRow(scope)"></el-input> size="small"></el-input>
</div> </div>
<span v-else>{{scope.row[item.key]}}</span> <span v-else>{{scope.row[item.key]}}</span>
</template> </template>
...@@ -197,6 +197,9 @@ export default { ...@@ -197,6 +197,9 @@ export default {
isAccurate: '' isAccurate: ''
} }
}, },
mounted() {
this.$refs.pageTable._showLoading()
},
methods: { methods: {
// 获取存储位置 // 获取存储位置
_locationChange(msg, data, handleObj) { _locationChange(msg, data, handleObj) {
...@@ -300,6 +303,7 @@ export default { ...@@ -300,6 +303,7 @@ export default {
this.currentRow.keepContainer = data.name this.currentRow.keepContainer = data.name
}, },
_open(sampleIds) { _open(sampleIds) {
this.$refs.pageTable._showLoading()
this.sampleIds = sampleIds this.sampleIds = sampleIds
console.log(this.sampleIds) console.log(this.sampleIds)
this.showModal = true this.showModal = true
...@@ -318,13 +322,13 @@ export default { ...@@ -318,13 +322,13 @@ export default {
const result = await soilEntrust.preparePage(this.sampleIds) const result = await soilEntrust.preparePage(this.sampleIds)
if (result) { if (result) {
console.log(result) console.log(result)
this.$refs.pageTable._hideLoading()
this.getPage.records = result this.getPage.records = result
for (let j = 0; j < result.length; j++) { for (let j = 0; j < result.length; j++) {
console.log(result[j].prepareDate) console.log(result[j].prepareDate)
console.log(new Date(result[j].prepareDate)) console.log(new Date(result[j].prepareDate))
this.getPage.records[j].prepareDate = new Date(result[j].prepareDate) this.getPage.records[j].prepareDate = new Date(result[j].prepareDate)
} }
this.$refs.pageTable._hideLoading()
} }
}, },
_footerResult(name) { _footerResult(name) {
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
import { soilAptitude, soilEntrust } from '../../../api' import { soilAptitude, soilEntrust } from '../../../api'
import MeterEntrustRecord from '../../../components/operation/Operation' import MeterEntrustRecord from '../../../components/operation/Operation'
import SoilSampleManageHis from '../SoilSampleManageHis' import SoilSampleManageHis from '../SoilSampleManageHis'
import global from '../../../api/config'
export default { export default {
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
components: { SoilSampleManageHis, MeterEntrustRecord }, components: { SoilSampleManageHis, MeterEntrustRecord },
...@@ -90,6 +91,11 @@ export default { ...@@ -90,6 +91,11 @@ export default {
name: '试样照片' name: '试样照片'
}, },
{ {
type: 'ios-download',
id: '',
name: '导出开土制备记录'
},
{
type: 'md-cloud', type: 'md-cloud',
id: '', id: '',
name: '附件' name: '附件'
...@@ -160,6 +166,9 @@ export default { ...@@ -160,6 +166,9 @@ export default {
case '资质项目': case '资质项目':
this._itemModal(data.id) this._itemModal(data.id)
break break
case '导出开土制备记录':
this._exportPrepare(data.id)
break
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
...@@ -181,6 +190,20 @@ export default { ...@@ -181,6 +190,20 @@ export default {
} }
}) })
}, },
_exportPrepare(id) {
this.$Modal.confirm({
title: '提示',
content: '确定导出这条记录',
onOk: () => {
window.open(
global.baseURL +
'/soil/v1/entrust/export_soil_prepare_record?ids=' +
id,
'_blank'
)
}
})
},
_componentResult(data, msg) { _componentResult(data, msg) {
switch (this.currentComponent) { switch (this.currentComponent) {
default: default:
......
...@@ -2,14 +2,6 @@ ...@@ -2,14 +2,6 @@
<div> <div>
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="待完成" name="wait">-->
<!-- <MeterSendEntrust ref="waitTabs"></MeterSendEntrust>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="历史记录" name="his">-->
<!-- <MeterSendEntrustHis ref="hisTabs"></MeterSendEntrustHis>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="待完成" name="wait"></el-tab-pane> <el-tab-pane label="待完成" name="wait"></el-tab-pane>
<el-tab-pane label="历史记录" name="his"></el-tab-pane> <el-tab-pane label="历史记录" name="his"></el-tab-pane>
......
...@@ -9,11 +9,16 @@ ...@@ -9,11 +9,16 @@
<Row> <Row>
<!--查询--> <!--查询-->
<Col span="24"> <Col span="24">
<Form id="search-sample-company" v-show="searchOpen" :label-width="90" inline onsubmit="return false"> <Form id="search-sample-company" v-show="searchOpen" :label-width="100" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item label="试验名称:" class="search-item"> <Form-item label="试验名称:" class="search-item">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable /> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable />
</Form-item> </Form-item>
<Form-item label="是否已添加科室:" class="search-item">
<Select v-model="formObj.grouped" 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"> <Form-item label="试验科室:" class="search-item">
<Input v-model="formObj.groupName" @on-enter="_formSearch" placeholder="请输入试验科室" clearable /> <Input v-model="formObj.groupName" @on-enter="_formSearch" placeholder="请输入试验科室" clearable />
</Form-item> </Form-item>
...@@ -139,6 +144,16 @@ export default { ...@@ -139,6 +144,16 @@ export default {
name: '删除' name: '删除'
} }
], ],
itemData: [
{
name: '是',
value: 1
},
{
name: '否',
value: 0
}
],
iconMsg: [{ type: 'pt-a-end', id: '', name: '删除' }], iconMsg: [{ type: 'pt-a-end', id: '', name: '删除' }],
sampleId: '', // 样品id sampleId: '', // 样品id
entrustId: '', entrustId: '',
...@@ -191,7 +206,8 @@ export default { ...@@ -191,7 +206,8 @@ export default {
sampleId: undefined, sampleId: undefined,
groupName: undefined, groupName: undefined,
sampleCode: undefined, sampleCode: undefined,
entrustId: undefined entrustId: undefined,
grouped: undefined
} }
} }
}, },
......
...@@ -114,23 +114,12 @@ export default { ...@@ -114,23 +114,12 @@ export default {
id: 'rel-sample-receive-del-sample', id: 'rel-sample-receive-del-sample',
name: '删除' name: '删除'
}, },
copy: {
type: 'ios-copy',
id: 'rel-sample-receive-copy-sample',
name: '复制'
},
record: { record: {
type: 'ios-clock', type: 'ios-clock',
id: '', id: '',
name: '操作日志', name: '操作日志',
componentName: 'FoodSampleRecord' componentName: 'FoodSampleRecord'
}, },
sampleDownloadContract: {
type: 'share',
id: 'food-sample-receive-sample-download-contract',
name: '导出委托协议'
},
getPage: {}, getPage: {},
pageColumns: [ pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 130 }, { title: '试样编号', key: 'sampleCode', width: 130 },
......
<template> <template>
<div> <div>
<Modal v-model="showSampleModal" @on-visible-change="_visibleChange" <Modal v-model="showSampleModal" width="1100"
width="1100" class="zIndex-900 modal-footer-none"> class="zIndex-900 modal-footer-none" @on-visible-change="_visibleChange">
<div> <div>
<!--内容--> <!--内容-->
<Row> <Row>
<!--查询--> <!--查询-->
<Col span="24" style="padding-bottom: 5px"> <Col span="24" style="padding-bottom: 5px">
<Form id="search-wait" v-show="searchOpen" :label-width="90" inline onsubmit="return false"> <Form v-show="searchOpen" id="search-wait" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item label="试样编号:" class="search-item"> <Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" name="sampleCode" placeholder="请输入样品编号" clearable></Input> <Input v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入样品编号" clearable @on-enter="_formSearch"></Input>
<input name="contractId" type="hidden"> <input name="contractId" type="hidden">
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button type="primary" @click="_formSearch">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</Col> </Col>
<Col span="24"> <Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick" class="contHide"> <btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide" @on-result-change="_btnClick">
<!--<template slot="processTask">--> <!--<template slot="processTask">-->
<!--<div class="fr process-task">--> <!--<div class="fr process-task">-->
<!--<Button @click="_exportReceiveRecord">导出交接记录</Button>--> <!--<Button @click="_exportReceiveRecord">导出交接记录</Button>-->
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
:table-height="tableHeight" :table-height="tableHeight"
:get-page="getPage" :get-page="getPage"
:icon-msg="iconMsg" :icon-msg="iconMsg"
@on-result-change="_tableResultChange" select-data
select-data> @on-result-change="_tableResultChange">
<vxe-table-column <vxe-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
...@@ -76,8 +76,8 @@ export default { ...@@ -76,8 +76,8 @@ export default {
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' }, { title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 }, { title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '检测科室', key: 'groupName', width: 95 }, { title: '检测科室', key: 'groupName', width: 95 },
{ title: '土质描述', key: 'sampleDescribe', width: 185 }, { title: '土质描述', key: 'describeDetail', width: 285 },
{ title: '样品描述', key: 'describeDetail', width: 185 }, { title: '样品描述', key: 'sampleDescribe', width: 130 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }, { title: '样品包装类型', key: 'samplePack', width: 120 },
{ title: '样品制备人', key: 'preparer', width: 120 }, { title: '样品制备人', key: 'preparer', width: 120 },
{ title: '样品制备时间', key: 'prepareDate', width: 135, date: true } { title: '样品制备时间', key: 'prepareDate', width: 135, date: true }
...@@ -213,7 +213,7 @@ export default { ...@@ -213,7 +213,7 @@ export default {
this._editModal(true, data) this._editModal(true, data)
break break
case '试验项目': case '试验项目':
this._itemManage(data.sampleId) this._itemManage(data.sampleId, data.groupId)
break break
case '复制': case '复制':
this._copySample(data) this._copySample(data)
...@@ -230,13 +230,9 @@ export default { ...@@ -230,13 +230,9 @@ export default {
} }
}) })
}, },
_itemManage(data) { _itemManage(sampleId, groupId) {
// 管理检测项目 // 管理检测项目
if (this.recordHis) { this.$refs.ItemManage._open(sampleId, groupId)
this.$refs.sampleItemManage._openRecord(data)
} else {
this.$refs.ItemManage._open(data)
}
}, },
_btnClick(msg, currentComponent) { _btnClick(msg, currentComponent) {
this.currentComponent = currentComponent this.currentComponent = currentComponent
......
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
<div> <div>
<Form id="storage-location-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="100"> <Form id="storage-location-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="100">
<Form-item label="保存容器:" prop="keepContainer"> <Form-item label="保存容器:" prop="keepContainer">
<el-select v-model="formObj.keepContainer" clearable style="width:100%" size="small"> <AutoCompletes v-model="formObj.keepContainer" :downData="containerList"
<el-option v-for="item in containerList" :value="item.name" :key="item.name">{{ item.name }} @on-result-change="_containerChange" name="keepContainer" placeholder="输入或选择保存容器"
</el-option> ></AutoCompletes>
</el-select>
</Form-item> </Form-item>
<Form-item label="制备数量"> <Form-item label="制备数量">
<Input v-model="formObj.quantity" clearable placeholder="请输入备样数量"></Input> <Input v-model="formObj.quantity" clearable placeholder="请输入备样数量"></Input>
...@@ -26,9 +25,10 @@ ...@@ -26,9 +25,10 @@
</template> </template>
<script> <script>
import { soilSample } from '../../../api' import { soilSample } from '../../../api'
import AutoCompletes from '../../../components/base/AutoCompletes'
export default { export default {
components: {}, components: { AutoCompletes },
data() { data() {
return { return {
ids: [], // 委托ids ids: [], // 委托ids
...@@ -56,7 +56,19 @@ export default { ...@@ -56,7 +56,19 @@ export default {
_getContainerList: async function() { _getContainerList: async function() {
const result = await soilSample.getDictList('保存容器') const result = await soilSample.getDictList('保存容器')
if (result) { if (result) {
this.containerList = result for (let i = 0; i < result.length; i++) {
this.containerList.push(result[i].name)
}
}
},
_containerChange(msg, data) {
switch (msg) {
case 'select':
this.formObj.keepContainer = data
break
case 'query':
this.formObj.keepContainer = data
break
} }
}, },
_locChange(msg, data) { _locChange(msg, data) {
...@@ -155,7 +167,7 @@ export default { ...@@ -155,7 +167,7 @@ export default {
}) })
}, },
_saveInfo: async function(data) { _saveInfo: async function(data) {
const result = await soilSample.editPrepare(data) const result = await soilSample.bathUpdateSurplusInfo(data)
if (result) { if (result) {
this.$Message.success('保存成功') this.$Message.success('保存成功')
this.$emit('on-result-change') this.$emit('on-result-change')
......
...@@ -42,11 +42,16 @@ ...@@ -42,11 +42,16 @@
<div v-else-if="item.key==='keepContainer'"> <div v-else-if="item.key==='keepContainer'">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div> <div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else> <div v-else>
<el-select v-model="scope.row.keepContainer" clearable style="width:100%" size="small"> <AutoCompletes v-model="scope.row.keepContainer" :downData="containerList"
<el-option v-for="item in containerList" :value="item.name" :key="item.name">{{ item.name }} @on-result-change="_containerChange" name="keepContainer" placeholder="输入或选择保存容器"
</el-option> ></AutoCompletes>
</el-select>
</div> </div>
<!-- <div v-else>-->
<!-- <el-select v-model="scope.row.keepContainer" clearable style="width:100%" size="small">-->
<!-- <el-option v-for="item in containerList" :value="item.name" :key="item.name">{{ item.name }}-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
</div> </div>
<div v-else-if="item.key==='quantity'"> <div v-else-if="item.key==='quantity'">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div> <div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
...@@ -90,11 +95,13 @@ import SampleSurplusBatchEdit from '../SampleSurplusBatchEdit' ...@@ -90,11 +95,13 @@ import SampleSurplusBatchEdit from '../SampleSurplusBatchEdit'
import http from '../../../../api/http' import http from '../../../../api/http'
import { soilSample } from '../../../../api' import { soilSample } from '../../../../api'
import Operation from '../../../../components/operation/Operation' import Operation from '../../../../components/operation/Operation'
import AutoCompletes from '../../../../components/base/AutoCompletes'
export default { export default {
components: { components: {
SampleParpareApply, SampleParpareApply,
Operation, Operation,
SampleSurplusBatchEdit SampleSurplusBatchEdit,
AutoCompletes
}, },
data() { data() {
return { return {
...@@ -213,7 +220,9 @@ export default { ...@@ -213,7 +220,9 @@ export default {
_getContainerList: async function() { _getContainerList: async function() {
const result = await soilSample.getDictList('保存容器') const result = await soilSample.getDictList('保存容器')
if (result) { if (result) {
this.containerList = result for (let i = 0; i < result.length; i++) {
this.containerList.push(result[i].name)
}
} }
}, },
// 查询卡片备样数量 // 查询卡片备样数量
...@@ -226,6 +235,16 @@ export default { ...@@ -226,6 +235,16 @@ export default {
} }
}) })
}, },
_containerChange(msg, data) {
switch (msg) {
case 'select':
this.getPage.records[this.currentIndex].keepContainer = data
break
case 'query':
this.getPage.records[this.currentIndex].keepContainer = data
break
}
},
// 选择时间 // 选择时间
_endDateChange(data) { _endDateChange(data) {
this.getPage.records[this.currentIndex].endDate = data this.getPage.records[this.currentIndex].endDate = data
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
}, },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.experimentId = this.id this.formObj.expId = this.id
const result = await soilTest.equipPage(this.$serializeForm(this.formObj)) const result = await soilTest.equipPage(this.$serializeForm(this.formObj))
if (result) { if (result) {
console.log(result) console.log(result)
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
}, },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.experimentId = this.id this.formObj.expId = this.id
const result = await soilTest.equipPage(this.$serializeForm(this.formObj)) const result = await soilTest.equipPage(this.$serializeForm(this.formObj))
if (result) { if (result) {
console.log(result) console.log(result)
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
}, },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.experimentId = this.id this.formObj.expId = this.id
const result = await soilTest.equipPage(this.$serializeForm(this.formObj)) const result = await soilTest.equipPage(this.$serializeForm(this.formObj))
if (result) { if (result) {
console.log(result) console.log(result)
......
...@@ -59,11 +59,6 @@ ...@@ -59,11 +59,6 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<!--选择领样人--> <!--选择领样人-->
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>-->
<!-- <ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<keep-alive> <keep-alive>
<!-- eslint-disable-next-line vue/require-component-is --> <!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
......
...@@ -43,12 +43,11 @@ export default { ...@@ -43,12 +43,11 @@ export default {
}, },
methods: { methods: {
_open(contractId, type, name) { _open(contractId, type, name) {
this.type = type // 类型(采样或送样) this.type = type
this.name = name this.name = name
this.showSampleModal = true this.showSampleModal = true
this.entrustId = contractId // 合同id this.entrustId = contractId
this.activeName = 'waitReceive' this.activeName = 'waitReceive'
// this.currentComponent = 'waitScan'
this.selectIds = [] this.selectIds = []
this._waitPage() this._waitPage()
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:"> <Form-item class="search-item" label="检测项目:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -51,7 +51,9 @@ export default { ...@@ -51,7 +51,9 @@ export default {
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
formObj: {}, formObj: {
name: undefined
},
tableName: 'food-task-assign-item-left', tableName: 'food-task-assign-item-left',
// 用户自己选中的列 // 用户自己选中的列
userColumns: [], userColumns: [],
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<Col span="24"> <Col span="24">
<Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:"> <Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input> <Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
</Col> </Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :pageColumns="pageColumns" :tableHeight="tableHeight" <PTVXETable ref="pageTable" :page-columns="pageColumns" :table-height="tableHeight"
@on-result-change="_tableResultChange" :getPage="getPage" :table-name="tableName" is-task select-data> :get-page="getPage" :table-name="tableName" @on-result-change="_tableResultChange" is-task select-data>
<vxe-table-column <vxe-table-column
v-for="item in userColumns.length > 0 ?userColumns:pageColumns" v-for="item in userColumns.length > 0 ?userColumns:pageColumns"
:key="item.key" :key="item.key"
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
<span v-else>{{scope.row[item.key]}}</span> <span v-else>{{scope.row[item.key]}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
<VXESettingCol slot="setting" :pageColumns="pageColumns" :userColumns="userColumns" <VXESettingCol slot="setting" :page-columns="pageColumns" :user-columns="userColumns"
@on-result-change="_resetColumn" :table-name="tableName"></VXESettingCol> :table-name="tableName" @on-result-change="_resetColumn"></VXESettingCol>
</PTVXETable> </PTVXETable>
</Col> </Col>
</Row> </Row>
...@@ -63,47 +63,22 @@ export default { ...@@ -63,47 +63,22 @@ export default {
entrustId: '', entrustId: '',
name: '', name: '',
testMethod: '', testMethod: '',
testBasis: '' testBasis: '',
sampleCode: undefined
}, },
itemName: '',
entrustId: '', entrustId: '',
// 用户自己选中的列 // 用户自己选中的列
userColumns: [], userColumns: [],
currentComponent: '', currentComponent: '',
optionList: [ btn: [{ type: 'success', id: '', name: '调整试验项目检测人' }],
{ key: 'name', name: '检测项目', placeholder: '请输入检测项目' },
{ key: 'code', name: '委托编号', placeholder: '请输入委托编号' },
{ key: 'num', name: '样品编号', placeholder: '请输入样品编号' },
{ key: 'sampleName', name: '样品名称', placeholder: '请输入样品名称' },
{ key: 'testBasis', name: '检测依据', placeholder: '请输入检测依据' },
{
key: 'resultDate',
name: '数据出具日期',
placeholder: '请选择数据出具日期',
date: true
},
{
key: 'receiveDate',
name: '接样日期',
placeholder: '请选择接样日期',
date: true
},
{ key: 'tester', name: '主检人', placeholder: '请输入主检人' },
{ key: 'detectType', name: '样品类别', placeholder: '请输入样品类别' }
],
btn: [
{ type: 'success', id: '', name: '试验项目分配' },
{ type: '', id: 'food-task-assign-adjust-group', name: '调整分组' },
{
type: '',
id: 'food-task-assign-plan-date',
name: '设置计划完成时间'
},
{ type: '', id: 'food-task-assign-maintain-info', name: '信息维护' }
],
getPage: {}, getPage: {},
pageColumns: [ pageColumns: [
{ title: '检测项目', key: 'name', width: 120, fixed: 'left' }, { title: '检测项目', key: 'name', width: 120, fixed: 'left' },
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '试验人员', key: 'tester', width: 180 },
{ title: '分配人', key: 'alloter', width: 180 },
{ title: '分配时间', key: 'allotTime', width: 180, datetime: true },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '试样包装类型', key: 'samplePack', width: 180 }, { title: '试样包装类型', key: 'samplePack', width: 180 },
{ title: '大类', key: 'mainType', width: 140 }, { title: '大类', key: 'mainType', width: 140 },
...@@ -191,6 +166,10 @@ export default { ...@@ -191,6 +166,10 @@ export default {
break break
} }
}, },
_clearPage() {
this.formObj.sampleCode = ''
this.getPage = {}
},
_modalResult(data) { _modalResult(data) {
switch (this.currentComponent) { switch (this.currentComponent) {
case 'AssignPerson': case 'AssignPerson':
...@@ -264,10 +243,8 @@ export default { ...@@ -264,10 +243,8 @@ export default {
switch (msg) { switch (msg) {
case '按人分配': case '按人分配':
this._allotByPerson() this._allotByPerson()
// await this._reportDueDate()
// await this._userAssign()
break break
case '试验项目分配': case '调整试验项目检测人':
this._userAssign() this._userAssign()
break break
case '按组分配': case '按组分配':
...@@ -370,13 +347,6 @@ export default { ...@@ -370,13 +347,6 @@ export default {
switch (msg) { switch (msg) {
case 'page': case 'page':
this._page() this._page()
// this.result = this.getPage.records;
// this.$nextTick(() => {
// this.$refs.pageTable._checkAll()
// })
// if (this.getPage.records.length === 0) {
// this.$emit('on-result-change')
// }
break break
case 'selectData': case 'selectData':
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
...@@ -405,7 +375,7 @@ export default { ...@@ -405,7 +375,7 @@ export default {
this._allotItems(tempData) this._allotItems(tempData)
}, },
_allotItems: async function(data) { _allotItems: async function(data) {
const result = await soilTest.allotExp(data) const result = await soilTest.changeExpAllot(data)
if (result) { if (result) {
this._resultChange('分配成功') this._resultChange('分配成功')
} }
...@@ -414,37 +384,6 @@ export default { ...@@ -414,37 +384,6 @@ export default {
const user = Global.getUserInfo('userInfo') const user = Global.getUserInfo('userInfo')
console.log(user) console.log(user)
this.$refs.personModal._openGoup('分配人员', 'itemTree') this.$refs.personModal._openGoup('分配人员', 'itemTree')
// if (this.defaultPlanDate) {
// // 有字典
// if (this.sampleNames === '') {
// // 有计划完成时间
// const user = Global.getUserInfo('userInfo')
// this.currentComponent = 'AssignPerson'
// this.$nextTick(function() {
// this.$refs.refModal._openGoupByUserId(
// '分配人员',
// user.id,
// 'itemTree'
// )
// })
// } else {
// // 有字典,无计划完成时间的
// this.$Modal.confirm({
// title: '提示',
// content:
// '所选项目中含有未设置计划完成时间的' +
// `${this._reportDueDate()}` +
// '请确认!',
// onOk: () => {}
// })
// }
// } else {
// // 无字典
// this.currentComponent = 'EndDateModal'
// this.$nextTick(() => {
// this._endDate()
// })
// }
}, },
// 遍历出计划时间为空的样品名 // 遍历出计划时间为空的样品名
_reportDueDate() { _reportDueDate() {
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<Col span="24"> <Col span="24">
<Form id="task-assign-sample-left" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-sample-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:"> <Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input> <Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -51,7 +51,8 @@ export default { ...@@ -51,7 +51,8 @@ export default {
return { return {
currentComponent: '', currentComponent: '',
formObj: { formObj: {
entrustId: undefined entrustId: undefined,
sampleCode: undefined
}, },
entrustId: '', entrustId: '',
tableName: 'food-task-assign-item-left', tableName: 'food-task-assign-item-left',
......
...@@ -5,22 +5,22 @@ ...@@ -5,22 +5,22 @@
<Col span="24"> <Col span="24">
<Form id="task-assign-sample-right" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-sample-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:"> <Form-item class="search-item" label="试验名称:">
<Input v-model="formObj.client" placeholder="请输入检测项目" clearable @on-enter="_formSearch"></Input> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入试验名称" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</Col> </Col>
<!--操作--> <!--操作-->
<Col span="24"> <Col span="24">
<btn-list :msg="btn" class="contHide" @on-result-change="_btnClick"></btn-list> <btn-list :msg="btn" @on-result-change="_btnClick" class="contHide"></btn-list>
</Col> </Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :page-columns="pageColumns" :table-height="tableHeight" <PTVXETable ref="pageTable" :page-columns="pageColumns" :table-height="tableHeight"
:get-page="getPage" :table-name="tableName" is-task select-data @on-result-change="_tableResultChange"> :get-page="getPage" :table-name="tableName" @on-result-change="_tableResultChange" is-task select-data>
<vxe-table-column <vxe-table-column
v-for="item in userColumns.length > 0 ?userColumns:pageColumns" v-for="item in userColumns.length > 0 ?userColumns:pageColumns"
:key="item.key" :key="item.key"
...@@ -60,7 +60,9 @@ export default { ...@@ -60,7 +60,9 @@ export default {
return { return {
// 定义表格名称----英文 // 定义表格名称----英文
tableName: 'food-task-assign-item-right', tableName: 'food-task-assign-item-right',
formObj: {}, formObj: {
sampleCode: undefined
},
// 用户自己选中的列 // 用户自己选中的列
userColumns: [], userColumns: [],
currentComponent: '', currentComponent: '',
...@@ -85,11 +87,12 @@ export default { ...@@ -85,11 +87,12 @@ export default {
{ key: 'tester', name: '主检人', placeholder: '请输入主检人' }, { key: 'tester', name: '主检人', placeholder: '请输入主检人' },
{ key: 'detectType', name: '样品类别', placeholder: '请输入样品类别' } { key: 'detectType', name: '样品类别', placeholder: '请输入样品类别' }
], ],
btn: [{ type: 'success', id: '', name: '试验项目分配' }], btn: [{ type: 'success', id: '', name: '调整试验项目检测人' }],
getPage: {}, getPage: {},
pageColumns: [ pageColumns: [
{ title: '试验名称', key: 'name', width: 160 }, { title: '试验名称', key: 'name', width: 160 },
{ title: '样品编号', key: 'sampleCode', width: 160 }, { title: '试样编号', key: 'sampleCode', width: 160 },
{ title: '试验人员', key: 'tester', width: 180 },
{ title: '分配人', key: 'alloter', width: 160 }, { title: '分配人', key: 'alloter', width: 160 },
{ title: '分配时间', key: 'allotTime', width: 160, datetime: true }, { title: '分配时间', key: 'allotTime', width: 160, datetime: true },
{ title: '试验项目英文简写', key: 'shortName', width: 140 }, { title: '试验项目英文简写', key: 'shortName', width: 140 },
...@@ -251,7 +254,7 @@ export default { ...@@ -251,7 +254,7 @@ export default {
}, },
async _btnClick(msg) { async _btnClick(msg) {
switch (msg) { switch (msg) {
case '试验项目分配': case '调整试验项目检测人':
this._userAssign() this._userAssign()
break break
case '按组分配': case '按组分配':
...@@ -376,37 +379,6 @@ export default { ...@@ -376,37 +379,6 @@ export default {
const user = Global.getUserInfo('userInfo') const user = Global.getUserInfo('userInfo')
console.log(user) console.log(user)
this.$refs.personModal._openGoup('分配人员', 'itemTree') this.$refs.personModal._openGoup('分配人员', 'itemTree')
// if (this.defaultPlanDate) {
// // 有字典
// if (this.sampleNames === '') {
// // 有计划完成时间
// const user = Global.getUserInfo('userInfo')
// this.currentComponent = 'AssignPerson'
// this.$nextTick(function() {
// this.$refs.refModal._openGoupByUserId(
// '分配人员',
// user.id,
// 'itemTree'
// )
// })
// } else {
// // 有字典,无计划完成时间的
// this.$Modal.confirm({
// title: '提示',
// content:
// '所选项目中含有未设置计划完成时间的' +
// `${this._reportDueDate()}` +
// '请确认!',
// onOk: () => {}
// })
// }
// } else {
// // 无字典
// this.currentComponent = 'EndDateModal'
// this.$nextTick(() => {
// this._endDate()
// })
// }
}, },
// 遍历出计划时间为空的样品名 // 遍历出计划时间为空的样品名
_reportDueDate() { _reportDueDate() {
...@@ -497,7 +469,7 @@ export default { ...@@ -497,7 +469,7 @@ export default {
this._allotItems(tempData) this._allotItems(tempData)
}, },
_allotItems: async function(data) { _allotItems: async function(data) {
const result = await soilTest.allotExp(data) const result = await soilTest.changeExpAllot(data)
if (result) { if (result) {
this._resultChange('分配成功') this._resultChange('分配成功')
} }
......
...@@ -68,9 +68,11 @@ export default { ...@@ -68,9 +68,11 @@ export default {
if (tab.name === 'alreadyIssued') { if (tab.name === 'alreadyIssued') {
// this._issuedPage() // this._issuedPage()
} else if (tab.name === 'waitReceive') { } else if (tab.name === 'waitReceive') {
this.$refs.waitScanModal._clearTab()
// this._waitPage() // this._waitPage()
this.$refs.waitReceiveModal._open(this.entrustId) this.$refs.waitReceiveModal._open(this.entrustId)
} else if (tab.name === 'waitScan') { } else if (tab.name === 'waitScan') {
this.$refs.waitReceiveModal._clearTab()
this.$refs.waitScanModal._open(this.entrustId) this.$refs.waitScanModal._open(this.entrustId)
// this._waitSend() // this._waitSend()
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:"> <Form-item class="search-item" label="检测项目:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -51,7 +51,9 @@ export default { ...@@ -51,7 +51,9 @@ export default {
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
formObj: {}, formObj: {
name: undefined
},
tableName: 'food-task-assign-item-left', tableName: 'food-task-assign-item-left',
// 用户自己选中的列 // 用户自己选中的列
userColumns: [], userColumns: [],
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<Col span="24"> <Col span="24">
<Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:"> <Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input> <Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -63,7 +63,8 @@ export default { ...@@ -63,7 +63,8 @@ export default {
entrustId: '', entrustId: '',
name: '', name: '',
testMethod: '', testMethod: '',
testBasis: '' testBasis: '',
sampleCode: undefined
}, },
entrustId: '', entrustId: '',
// 用户自己选中的列 // 用户自己选中的列
...@@ -414,6 +415,11 @@ export default { ...@@ -414,6 +415,11 @@ export default {
this._resultChange('分配成功') this._resultChange('分配成功')
} }
}, },
_clearPage() {
this.leftSelectData = []
this.formObj.sampleCode = ''
this.getPage = {}
},
_userAssign() { _userAssign() {
const user = Global.getUserInfo('userInfo') const user = Global.getUserInfo('userInfo')
console.log(user) console.log(user)
......
...@@ -40,6 +40,9 @@ export default { ...@@ -40,6 +40,9 @@ export default {
console.log(id) console.log(id)
this.$refs.leftModal._open(this.id) this.$refs.leftModal._open(this.id)
// this.$refs.rightModal._getColumn() // this.$refs.rightModal._getColumn()
},
_clearTab() {
this.$refs.rightModal._clearPage()
} }
} }
} }
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<Col span="24"> <Col span="24">
<Form id="task-assign-sample-left" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-sample-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:"> <Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input> <Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -51,7 +51,8 @@ export default { ...@@ -51,7 +51,8 @@ export default {
return { return {
currentComponent: '', currentComponent: '',
formObj: { formObj: {
entrustId: undefined entrustId: undefined,
sampleCode: undefined
}, },
entrustId: '', entrustId: '',
tableName: 'food-task-assign-item-left', tableName: 'food-task-assign-item-left',
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<Col span="24"> <Col span="24">
<Form id="task-assign-sample-right" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-sample-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:"> <Form-item class="search-item" label="试验名称:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入试验名称" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -60,7 +60,9 @@ export default { ...@@ -60,7 +60,9 @@ export default {
return { return {
// 定义表格名称----英文 // 定义表格名称----英文
tableName: 'food-task-assign-item-right', tableName: 'food-task-assign-item-right',
formObj: {}, formObj: {
name: undefined
},
// 用户自己选中的列 // 用户自己选中的列
userColumns: [], userColumns: [],
currentComponent: '', currentComponent: '',
...@@ -185,6 +187,11 @@ export default { ...@@ -185,6 +187,11 @@ export default {
break break
} }
}, },
_clearPage() {
this.formObj.name = ''
this.getPage = {}
this.sampleIds = []
},
_modalResult(data) { _modalResult(data) {
switch (this.currentComponent) { switch (this.currentComponent) {
case 'AssignPerson': case 'AssignPerson':
......
...@@ -35,6 +35,9 @@ export default { ...@@ -35,6 +35,9 @@ export default {
_open(id) { _open(id) {
this.$refs.SampleleftModal._open(id) this.$refs.SampleleftModal._open(id)
// this.$refs.rightModal._getColumn() // this.$refs.rightModal._getColumn()
},
_clearTab() {
this.$refs.SamplerightModal._clearPage()
} }
} }
} }
......
...@@ -41,7 +41,7 @@ const Iframe = { ...@@ -41,7 +41,7 @@ const Iframe = {
modalDiv.className = 'record-modal' modalDiv.className = 'record-modal'
// 设置属性 // 设置属性
$(modalDiv).css({ $(modalDiv).css({
'z-index': '3000', 'z-index': '2147483647',
left: '0', left: '0',
top: '0', top: '0',
height: windowHeight, height: windowHeight,
......
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