Commit 05790c15 by lichengming

修改了样品分拨发放高级试验和样品留存有效期展示

parent dd5cf326
......@@ -119,7 +119,7 @@ export default {
this._hideLoading()
this.showEditModal = false
},
_open(ids) {
_open(id, ids) {
this.formObj.receiveLocation = ''
this.formObj.warehouse = ''
this.formObj.keepLimitTime = undefined
......@@ -127,6 +127,13 @@ export default {
this._getLocation()
this.ids = ids
this.showEditModal = true
this._getKeepTime(id)
},
_getKeepTime: async function(id) {
const result = await soilSample.getStayDate({ entrustId: id })
if (result.keepLimitTime) {
this.formObj.keepLimitTime = new Date(result.keepLimitTime)
}
},
_getLocation: async function() {
const result = await soilSample.locationList()
......
......@@ -5,10 +5,10 @@
<Row>
<!--查询-->
<Col span="24" style="padding-bottom: 5px">
<Form v-show="searchOpen" id="search-wait" :label-width="100" inline onsubmit="return false">
<Form id="search-wait" v-show="searchOpen" :label-width="100" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable @on-enter="_formSearch"></Input>
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" 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="请选择是否有试验项目">
......@@ -16,7 +16,7 @@
</Select>
</Form-item>
<Form-item label="试验科室:" class="search-item">
<el-select v-model="formObj.groupId" placeholder="请选择" clearable style="width: 100%" @change="_selGroup">
<el-select v-model="formObj.groupId" @change="_selGroup" placeholder="请选择" clearable style="width: 100%">
<el-option
v-for="(item,index) in groupoptions"
:key="index"
......@@ -29,12 +29,12 @@
<Input v-model="formObj.experimentNames" @on-enter="_formSearch" style="width: 150px;" placeholder="请输入试验项目或试验项目简写" clearable />
</Form-item>
<Form-item class="search-btn" style="margin-left: 10px;">
<Button type="primary" @click="_formSearch">搜索</Button>
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide" @on-result-change="_btnClick">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick" class="contHide">
</btn-list>
</Col>
<Col span="24">
......@@ -43,8 +43,8 @@
:table-height="tableHeight"
:get-page="getPage"
:icon-msg="iconMsg"
select-data
@on-result-change="_tableResultChange">
@on-result-change="_tableResultChange"
select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
......@@ -71,7 +71,7 @@
<storageSelect ref="locationModal" @on-result-change="_page()"></storageSelect>
<SoilSampleItemManage ref="sampleItemManage" @on-result-change="_page"></SoilSampleItemManage>
<KeepAdress ref="keepAdressModal" @on-result-change="_page"></KeepAdress>
<SampleItemSelect ref="sampleItemSelectModal" is-change @on-result-change="_itemImportBack" />
<SampleItemSelect ref="sampleItemSelectModal" @on-result-change="_itemImportBack" is-change />
</div>
</template>
<script>
......@@ -382,7 +382,7 @@ export default {
this.$Message.warning('请至少选中一条样品数据!')
} else {
const ids = id.join(',')
this.$refs.keepAdressModal._open(ids)
this.$refs.keepAdressModal._open(this.entrustId, ids)
}
},
// 样品接收
......
......@@ -29,7 +29,7 @@
<Input v-model="formObj.experimentNames" @on-enter="_formSearch" style="width: 150px;" placeholder="请输入试验项目或试验项目简写" clearable />
</Form-item>
<Form-item class="search-btn" style="margin-left: 10px;">
<Button type="primary" @click="_formSearch">搜索</Button>
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
......@@ -100,6 +100,7 @@ export default {
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '实验室', key: 'groupNames', width: 100 },
{ title: '试验项目', key: 'experimentNames', width: 225 },
{ title: '试验项目简写', key: 'experimentShortNames' },
{ title: '土质描述', key: 'sampleDescribe', width: 185 },
......@@ -109,6 +110,7 @@ export default {
type: '',
contractId: '', // 合同id
selectData: [],
expert: false,
currentComponent: '',
formObj: {
samplingNum: '',
......@@ -438,10 +440,22 @@ export default {
}
},
_send() {
this.expert = false
if (this.selectData.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this._sendToAlone()
for (let i = 0; i < this.selectData.length; i++) {
if (this.selectData[i].groupNames !== '高级实验室') {
this.expert = true
}
}
if (this.expert) {
this.$Message.warning('所选样品中有其他试验样品')
// this._sendToAlone()
} else {
// this.$Message.warning('所选样品中没有其他试验样品')
this._sendToAlone()
}
}
},
_sendToAlone() {
......
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