Commit 63b1e867 by wangweidong

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

parents 7c5a61c3 3fff0d1f
......@@ -22,6 +22,8 @@ export default {
// 试验任务按样品分配-试验项目分配操作
allotExp: data =>
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 =>
http.post('soil/v1/experiment/page_allot', data).then(res => res),
......
......@@ -108,6 +108,9 @@
@on-result-change="_soilChange" name="sampleDescribe" placeholder="请输入或选择土质描述"
></AutoComplete>
</div>
<div v-else-if="item.key==='experiments'" @click.stop="_handleRow(scope)">
<span @click="_removeItem(scope.row)">{{scope.row[item.key]}}</span>
</div>
<span v-else> {{ scope.row[item.key] }}</span>
</template>
</vxe-table-column>
......@@ -120,6 +123,8 @@
<importModal ref="importModal" @on-result-change="_inputBack" aptitude-item></importModal>
<SampleItemSelect ref="sampleItemSelectModal" @on-result-change="_itemImportBack" is-change />
<assignPerson ref="userModal" @on-result-change="_userResult"></assignPerson>
<SampleItemRemove ref="sampleItemRemove" @on-result-change = '_removeItemBack'></SampleItemRemove>
<SampleItemEdit ref="sampleItemEdit"></SampleItemEdit>
</div>
</template>
<script>
......@@ -132,12 +137,16 @@ import AutoComplete from '../../../components/base/AutoCompletes'
import SampleItemSelect from '../../meter-aptitude/standard-manage/SampleItemSelect'
import assignPerson from '../../../components/user-info-single/assignPerson'
import Global from '../../../api/config'
import SampleItemRemove from './SampleItemRemove'
import SampleItemEdit from './SampleItemEdit'
export default {
components: {
AutoComplete,
importModal,
SampleItemSelect,
assignPerson
assignPerson,
SampleItemRemove,
SampleItemEdit
},
data() {
const validatefee = (rule, value, callback) => {
......@@ -375,6 +384,27 @@ export default {
this.$forceUpdate()
this.formObj.testType = data
},
_removeItem(itemInfo) {
console.log('试验项目', itemInfo)
this.itemList = itemInfo.experimentList
if (this.edit) {
this.$refs.sampleItemEdit._open(itemInfo.id)
} else {
this.$refs.sampleItemRemove._open(this.itemList)
}
},
_removeItemBack(data) {
if (data) {
this.getPage.records[this.currentIndex].experimentList = data
const itemNames = []
for (let j = 0; j < data.length; j++) {
itemNames.push(data[j].name)
}
this.getPage.records[this.currentIndex].experiments = itemNames.join(
','
)
}
},
_itemImportBack(data) {
this.$forceUpdate()
console.log('传过来的数据', data)
......@@ -507,39 +537,9 @@ export default {
}
},
_inputBack(data) {
console.log(data)
if (data) {
this._getByEntrustId(this.id)
}
// if (undefined !== data) {
// if (this.getPage.records.length > 0) {
// const j = this.getPage.records.length
// for (let i = j; i < data.length + j; i++) {
// console.log(i)
// this.getPage.records.push(data[i - j])
// if (data[i - j].lastTime !== undefined) {
// this.getPage.records[i].lastTime = new Date(data[i - j].lastTime)
// }
// console.log(this.getPage.records)
// // this.getPage.records[i].lastTime = new Date(data[0].lastTime)
// }
// } else {
// for (let i = 0; i < data.length; i++) {
// // if (this.getPage.records[i].lastTime !== undefined) {
// // const t = this.getPage.records[i].lastTime
// // const d = t.valueOf(t)
// // console.log('时间戳', d)
// // this.getPage.records[i].lastTime = d
// // this.getPage.records = []
// // }
// this.getPage.records.push(data[i])
// if (data[i].lastTime !== undefined) {
// this.getPage.records[i].lastTime = new Date(data[i].lastTime)
// }
// console.log(data[i].lastTime)
// }
// }
// }
},
_ctimeChange(data) {
this.formObj.entrustDate = data
......@@ -676,9 +676,6 @@ export default {
case 'iconClick':
this._iconClick(data.name, data.rowData, data.rowIndex)
break
// case 'changeSize':
// this._page()
// break
}
},
allSelect(data) {
......@@ -804,15 +801,11 @@ export default {
if (valid) {
const data = this.$serialize('MeterSendTestEdit')
console.log(this.getPage.records)
// Object.assign(this.formObj, data)
if (this.$string(this.id).isEmpty()) {
// 添加
// const saveData = this.formObj
data.sampleList = this.getPage.records
console.log(data)
this._save(data)
} else {
// const saveData = this.formObj
data.id = this.id
data.sampleList = this.getPage.records
console.log(data)
......@@ -949,12 +942,13 @@ export default {
}
},
_save: async function(data) {
this._hideLoading()
console.log(data)
const result = await soilEntrust.save(data)
console.log(result)
if (result) {
this._resultChange('添加成功!')
} else {
setTimeout(() => {
this._hideLoading()
}, 500)
}
},
_edit: async function(data) {
......
<!--检测项目编辑列表(添加、导入检测项目)-->
<template>
<div>
<Modal
v-model="showModal"
:mask-closable="false"
:width="690"
@on-cancel="_cancel"
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-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 { soilEntrust } from '../../../api'
export default {
components: {},
data() {
return {
formObj: {
catalogueId: '',
name: '',
code: '',
standardCode: '',
standardName: ''
},
showModal: false,
searchOpen: false,
btn: [],
index: '',
iconMsg: [
{
type: 'md-trash',
id: '',
name: '删除'
}
],
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 }
],
catalogueId: '',
itemList: {
records: []
},
getPage: {},
selectData: [],
originalList: []
}
},
methods: {
_open(id) {
this.formObj = this.$resetFields(this.formObj)
this.showModal = true
this.formObj.sampleId = id
this.$refs.pageTable._hideLoading()
// if (catalogueId) {
this._page()
// }
},
_handleRow(scope) {
console.log(scope)
},
_selectjudgeBasis(index) {
console.log(index)
this.index = index
this.$refs.EditModal._open()
},
_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 soilEntrust.pageItem(
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.id)
break
}
},
// 删除
_deleteById(id) {
this.$Modal.confirm({
title: '提示',
content: '确定删除该数据?',
onOk: () => {
this._deleteOk(id)
}
})
},
_deleteOk: async function(id) {
const result = await soilEntrust.deleteById(id)
if (result) {
this.$Message.success('删除成功')
this._page()
}
},
// table结果 返回整行
_tableResultChange(msg, data) {
switch (msg) {
case 'selectData':
this.selectData = data
break
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
case 'changeSize':
this._page()
}
},
_ok() {
const data = this.itemList.records
this._saveCatalogueItem(data)
},
_saveCatalogueItem(data) {
this.showModal = false
this.$emit('on-result-change', data)
this._hideLoading()
},
_cancel() {
this.selectData = []
this.showModal = false
},
_visibleChange() {
const data = this.itemList.records
this._saveCatalogueItem(data)
this.selectData = []
this.showModal = false
},
_hideLoading() {
this.$refs.footerModal._hideLoading()
}
}
}
</script>
<!--检测项目编辑列表(添加、导入检测项目)-->
<template>
<div>
<Modal
v-model="showModal"
:mask-closable="false"
:width="690"
@on-cancel="_cancel"
title="检测项目管理"
>
<Row>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :loading="true"
:get-page="itemList" :icon-msg="iconMsg" @on-result-change="_tableResultChange" hide-page="true" 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: [
{
type: 'md-trash',
id: '',
name: '删除'
}
],
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 }
],
catalogueId: '',
itemList: {
records: []
},
selectData: [],
originalList: []
}
},
methods: {
_open(itemList) {
this.itemList.records = []
this.formObj = this.$resetFields(this.formObj)
this.showModal = true
this.itemList.records = itemList
this.$refs.pageTable._hideLoading()
this.$refs.pageTable._clearSelection()
// if (catalogueId) {
// this._page()
// }
},
_handleRow(scope) {
console.log(scope)
},
_selectjudgeBasis(index) {
console.log(index)
this.index = index
this.$refs.EditModal._open()
},
_formSearch() {
console.log(this.formObj.name)
const searchItem = []
for (let i = 0; i < this.itemList.records.length; i++) {
if (this.itemList.records[i].name === this.formObj.name) {
console.log(this.itemList.records[i])
searchItem.push(this.itemList.records[i])
}
}
this.itemList.records = searchItem
},
_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.itemList.records.splice(data.index, 1)
break
}
},
// 删除
_deleteById(id) {
this.$Modal.confirm({
title: '提示',
content: '确定删除该数据?',
onOk: () => {
this._deleteOk(id)
}
})
},
_deleteOk(id) {
// const result = await drugCatalogueItem.deleteById(id)
this.itemList.splice(id, 1)
this.getPage.records = this.itemList
this.$Message.success('已删除')
},
// table结果 返回整行
_tableResultChange(msg, data) {
switch (msg) {
case 'selectData':
this.selectData = data
break
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
}
},
_ok() {
const data = this.itemList.records
this._saveCatalogueItem(data)
},
_saveCatalogueItem(data) {
this.showModal = false
this.$emit('on-result-change', data)
this._hideLoading()
},
_cancel() {
const data = this.itemList.records
this._saveCatalogueItem(data)
this.selectData = []
this.showModal = false
},
_visibleChange() {
const data = this.itemList.records
this._saveCatalogueItem(data)
this.selectData = []
this.showModal = false
},
_hideLoading() {
this.$refs.footerModal._hideLoading()
}
}
}
</script>
......@@ -39,7 +39,9 @@
:edit-render="item.editCell?{autofocus: 'input'}:null" sortable>
<template v-slot:edit="scope">
<div v-if="item.key==='describeDetail'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.describeDetail" @blur="_page()" @change="_inputChange(scope.row)"></el-input>
<!-- <el-input v-model="scope.row.describeDetail" @change="_inputChange(scope.row)" placeholder="请输入土质描述详情">-->
<!-- </el-input>-->
<Input :value="scope.row.describeDetail" @change.native="_inputChange($event.target.value,scope.row)"></Input>
</div>
<div v-else-if="item.key==='remark'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.remark" @blur="_page()" @change="_remarkChange(scope.row)"></el-input>
......@@ -106,6 +108,7 @@ export default {
],
itemList: [],
indexList: [],
currentIndex: -1,
footerList: [
{ id: '', name: '取消', type: '' },
{ id: '', name: '确定', type: 'primary' }
......@@ -162,14 +165,18 @@ export default {
}
}
},
mounted() {
this.$refs.pageTable._showLoading()
},
methods: {
_inputChange: async function(info) {
_inputChange: async function(info, data) {
this.getPage.records[data.index].describeDetail = info
const result = await soilEntrust.sampleEdit({
id: info.id,
describeDetail: info.describeDetail
id: data.id,
describeDetail: info
})
if (result) {
this._resultChange('修改成功')
this.$Message.success('修改成功')
}
},
......@@ -416,8 +423,8 @@ export default {
this.$serializeForm(this.formObj)
)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_deleteByIds(ids, content) {
......
......@@ -5,7 +5,7 @@
<Row>
<!--操作-->
<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 span="24">
......@@ -14,10 +14,10 @@
:table-height="tableHeight"
:get-page="getPage"
:form-id="formId"
@on-result-change="_tableResultChange"
select-data
is-edit
hide-page
@on-result-change="_tableResultChange">
hide-page>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
......@@ -32,8 +32,8 @@
<template v-slot:edit="scope">
<div v-if="item.key==='prepareWay'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.prepareWay" :down-data="preparationWayData" :way-data="wayData"
:handle-obj="scope" clearable placeholder="输入或选择制备方式"
@on-result-change="_preparationChange"></AutoComplete>
:handle-obj="scope" @on-result-change="_preparationChange" clearable
placeholder="输入或选择制备方式"></AutoComplete>
</div>
<div v-else-if="item.key==='unit'" @click="_handleRow(scope)">
<el-input v-model="scope.row.unit" name="unit" placeholder="输入或选择单位">
......@@ -46,13 +46,13 @@
<span v-else-if="item.key==='type'">{{ scope.row[item.key]===0? '检样':'备样' }}</span>
<div v-else-if="item.key==='keepWay'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.keepWay" :handle-obj="scope" :down-data="saveWayData"
clearable placeholder="输入或选择保存方式"
show-key="name" @on-result-change="_saveChange"></AutoComplete>
@on-result-change="_saveChange" clearable
placeholder="输入或选择保存方式" show-key="name"></AutoComplete>
</div>
<div v-else-if="item.key==='keepContainer'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.keepContainer" :handle-obj="scope" :down-data="packList"
clearable placeholder="输入或选择保存容器"
show-key="name" @on-result-change="_packSaveChange"></AutoComplete>
@on-result-change="_packSaveChange" clearable
placeholder="输入或选择保存容器" show-key="name"></AutoComplete>
</div>
<!-- <div v-else-if="item.key==='prepareDate'" @click="_handleTimeRow(scope)">-->
<!-- <el-date-picker-->
......@@ -62,16 +62,16 @@
<!-- </el-date-picker>-->
<!-- </div>-->
<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="请选择日期"
@change="timeChange(scope.row)"></el-date-picker>
<el-date-picker v-model="scope.row.prepareDate" @change="timeChange(scope.row)" type="datetime" format="yyyy-MM-dd HH:mm" style="width:100%;"
placeholder="请选择日期"></el-date-picker>
</div>
<div v-else-if="item.key==='preparer'" @click="_handleRow(scope)">
<el-input v-model="scope.row.preparer" placeholder="制备人"
size="small" name="preparer" @focus="_handleRow(scope)"></el-input>
<el-input v-model="scope.row.preparer" @focus="_handleRow(scope)"
placeholder="制备人" size="small" name="preparer"></el-input>
</div>
<div v-else-if="item.key==='remark'" @click="_handleRow(scope)">
<el-input v-model="scope.row.remark" placeholder="备注" size="small"
@focus="_handleRow(scope)"></el-input>
<el-input v-model="scope.row.remark" @focus="_handleRow(scope)" placeholder="备注"
size="small"></el-input>
</div>
<span v-else>{{scope.row[item.key]}}</span>
</template>
......@@ -197,6 +197,9 @@ export default {
isAccurate: ''
}
},
mounted() {
this.$refs.pageTable._showLoading()
},
methods: {
// 获取存储位置
_locationChange(msg, data, handleObj) {
......@@ -300,6 +303,7 @@ export default {
this.currentRow.keepContainer = data.name
},
_open(sampleIds) {
this.$refs.pageTable._showLoading()
this.sampleIds = sampleIds
console.log(this.sampleIds)
this.showModal = true
......@@ -318,13 +322,13 @@ export default {
const result = await soilEntrust.preparePage(this.sampleIds)
if (result) {
console.log(result)
this.$refs.pageTable._hideLoading()
this.getPage.records = result
for (let j = 0; j < result.length; j++) {
console.log(result[j].prepareDate)
console.log(new Date(result[j].prepareDate))
this.getPage.records[j].prepareDate = new Date(result[j].prepareDate)
}
this.$refs.pageTable._hideLoading()
}
},
_footerResult(name) {
......
......@@ -15,7 +15,7 @@
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable />
</Form-item>
<Form-item label="是否已添加科室:" class="search-item">
<Select v-model="formObj.haveGroup" clearable name="groupId" style="width:150px" placeholder="请选择是否">
<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>
......@@ -207,7 +207,7 @@ export default {
groupName: undefined,
sampleCode: undefined,
entrustId: undefined,
haveGroup: undefined
grouped: undefined
}
}
},
......
......@@ -59,11 +59,6 @@
</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>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
......
......@@ -6,7 +6,7 @@
<Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></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 class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -51,7 +51,9 @@ export default {
data() {
return {
currentComponent: '',
formObj: {},
formObj: {
name: undefined
},
tableName: 'food-task-assign-item-left',
// 用户自己选中的列
userColumns: [],
......
......@@ -5,22 +5,22 @@
<Col span="24">
<Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:">
<Input v-model="formObj.client" placeholder="请输入检测项目" clearable @on-enter="_formSearch"></Input>
<Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button>
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<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 span="24">
<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
v-for="item in userColumns.length > 0 ?userColumns:pageColumns"
:key="item.key"
......@@ -63,8 +63,10 @@ export default {
entrustId: '',
name: '',
testMethod: '',
testBasis: ''
testBasis: '',
sampleCode: undefined
},
itemName: '',
entrustId: '',
// 用户自己选中的列
userColumns: [],
......@@ -76,7 +78,7 @@ export default {
{ title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '试验人员', key: 'tester', width: 180 },
{ title: '分配人', key: 'alloter', width: 180 },
{ title: '分配时间', key: 'allotTime', width: 180 },
{ title: '分配时间', key: 'allotTime', width: 180, datetime: true },
{ title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '试样包装类型', key: 'samplePack', width: 180 },
{ title: '大类', key: 'mainType', width: 140 },
......@@ -164,6 +166,10 @@ export default {
break
}
},
_clearPage() {
this.formObj.sampleCode = ''
this.getPage = {}
},
_modalResult(data) {
switch (this.currentComponent) {
case 'AssignPerson':
......@@ -237,10 +243,8 @@ export default {
switch (msg) {
case '按人分配':
this._allotByPerson()
// await this._reportDueDate()
// await this._userAssign()
break
case '试验项目分配':
case '调整试验项目检测人':
this._userAssign()
break
case '按组分配':
......@@ -343,13 +347,6 @@ export default {
switch (msg) {
case '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
case 'selectData':
for (let i = 0; i < data.length; i++) {
......@@ -378,7 +375,7 @@ export default {
this._allotItems(tempData)
},
_allotItems: async function(data) {
const result = await soilTest.allotExp(data)
const result = await soilTest.changeExpAllot(data)
if (result) {
this._resultChange('分配成功')
}
......@@ -387,37 +384,6 @@ export default {
const user = Global.getUserInfo('userInfo')
console.log(user)
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() {
......
......@@ -5,8 +5,8 @@
<Col span="24">
<Form id="task-assign-sample-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input>
<Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -51,7 +51,8 @@ export default {
return {
currentComponent: '',
formObj: {
entrustId: undefined
entrustId: undefined,
sampleCode: undefined
},
entrustId: '',
tableName: 'food-task-assign-item-left',
......
......@@ -5,22 +5,22 @@
<Col span="24">
<Form id="task-assign-sample-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.client" placeholder="请输入检测项目" clearable @on-enter="_formSearch"></Input>
<Form-item class="search-item" label="试验名称:">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入试验名称" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button>
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<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 span="24">
<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
v-for="item in userColumns.length > 0 ?userColumns:pageColumns"
:key="item.key"
......@@ -60,7 +60,9 @@ export default {
return {
// 定义表格名称----英文
tableName: 'food-task-assign-item-right',
formObj: {},
formObj: {
sampleCode: undefined
},
// 用户自己选中的列
userColumns: [],
currentComponent: '',
......@@ -85,11 +87,12 @@ export default {
{ key: 'tester', name: '主检人', placeholder: '请输入主检人' },
{ key: 'detectType', name: '样品类别', placeholder: '请输入样品类别' }
],
btn: [{ type: 'success', id: '', name: '试验项目分配' }],
btn: [{ type: 'success', id: '', name: '调整试验项目检测人' }],
getPage: {},
pageColumns: [
{ 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: 'allotTime', width: 160, datetime: true },
{ title: '试验项目英文简写', key: 'shortName', width: 140 },
......@@ -251,7 +254,7 @@ export default {
},
async _btnClick(msg) {
switch (msg) {
case '试验项目分配':
case '调整试验项目检测人':
this._userAssign()
break
case '按组分配':
......@@ -376,37 +379,6 @@ export default {
const user = Global.getUserInfo('userInfo')
console.log(user)
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() {
......@@ -497,7 +469,7 @@ export default {
this._allotItems(tempData)
},
_allotItems: async function(data) {
const result = await soilTest.allotExp(data)
const result = await soilTest.changeExpAllot(data)
if (result) {
this._resultChange('分配成功')
}
......
......@@ -68,9 +68,11 @@ export default {
if (tab.name === 'alreadyIssued') {
// this._issuedPage()
} else if (tab.name === 'waitReceive') {
this.$refs.waitScanModal._clearTab()
// this._waitPage()
this.$refs.waitReceiveModal._open(this.entrustId)
} else if (tab.name === 'waitScan') {
this.$refs.waitReceiveModal._clearTab()
this.$refs.waitScanModal._open(this.entrustId)
// this._waitSend()
}
......
......@@ -6,7 +6,7 @@
<Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></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 class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -51,7 +51,9 @@ export default {
data() {
return {
currentComponent: '',
formObj: {},
formObj: {
name: undefined
},
tableName: 'food-task-assign-item-left',
// 用户自己选中的列
userColumns: [],
......
......@@ -5,8 +5,8 @@
<Col span="24">
<Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input>
<Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -63,7 +63,8 @@ export default {
entrustId: '',
name: '',
testMethod: '',
testBasis: ''
testBasis: '',
sampleCode: undefined
},
entrustId: '',
// 用户自己选中的列
......@@ -414,6 +415,11 @@ export default {
this._resultChange('分配成功')
}
},
_clearPage() {
this.leftSelectData = []
this.formObj.sampleCode = ''
this.getPage = {}
},
_userAssign() {
const user = Global.getUserInfo('userInfo')
console.log(user)
......
......@@ -40,6 +40,9 @@ export default {
console.log(id)
this.$refs.leftModal._open(this.id)
// this.$refs.rightModal._getColumn()
},
_clearTab() {
this.$refs.rightModal._clearPage()
}
}
}
......
......@@ -5,8 +5,8 @@
<Col span="24">
<Form id="task-assign-sample-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input>
<Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -51,7 +51,8 @@ export default {
return {
currentComponent: '',
formObj: {
entrustId: undefined
entrustId: undefined,
sampleCode: undefined
},
entrustId: '',
tableName: 'food-task-assign-item-left',
......
......@@ -5,8 +5,8 @@
<Col span="24">
<Form id="task-assign-sample-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.client" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input>
<Form-item class="search-item" label="试验名称:">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入试验名称" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -60,7 +60,9 @@ export default {
return {
// 定义表格名称----英文
tableName: 'food-task-assign-item-right',
formObj: {},
formObj: {
name: undefined
},
// 用户自己选中的列
userColumns: [],
currentComponent: '',
......@@ -185,6 +187,11 @@ export default {
break
}
},
_clearPage() {
this.formObj.name = ''
this.getPage = {}
this.sampleIds = []
},
_modalResult(data) {
switch (this.currentComponent) {
case 'AssignPerson':
......
......@@ -35,6 +35,9 @@ export default {
_open(id) {
this.$refs.SampleleftModal._open(id)
// this.$refs.rightModal._getColumn()
},
_clearTab() {
this.$refs.SamplerightModal._clearPage()
}
}
}
......
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