Commit 8801362f by lichengming

添加了独立预检高级样品分类下拉选项

parent 7c60b997
......@@ -43,6 +43,7 @@ export default {
http.post('soil/v1/standard/list', data).then(res => res),
getGroupList: data =>
http.post('/res/v1/user_group/list', data).then(res => res),
getDictInfo: data => http.post('/res/v1/dict/page', data).then(res => res),
getBasisList: data =>
http.post('soil/v1/standard/list', data).then(res => res),
originalTemplatePage: data =>
......
......@@ -240,5 +240,7 @@ export default {
dataGdsDetail: data =>
http.post('soil/v1/data_gds_detail/page', data).then(res => res),
pageSummaryEnd: data =>
http.post('soil/v1/report/page_summary_report_end', data).then(res => res)
http.post('soil/v1/report/page_summary_report_end', data).then(res => res),
sampleEdit: data =>
http.put('soil/v1/sample/' + data.id, data).then(res => res)
}
......@@ -60,6 +60,16 @@
<div v-else-if="item.date">
{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}
</div>
<div v-else-if="item.key==='seniorType'">
<el-select v-model="scope.row.seniorType" @change="_selSeniorType(scope.row)" placeholder="请选择" clearable style="width: 100%">
<el-option
v-for="(data,index) in seniorTypeArray"
:key="index"
:label="data.name"
:value="data.name"
/>
</el-select>
</div>
<div v-else>{{scope.row[item.key]}}</div>
</template>
</vxe-table-column>
......@@ -76,7 +86,12 @@
</div>
</template>
<script>
import { soilAptitude, soilEntrust, soilSample } from '../../../../api'
import {
soilAptitude,
soilEntrust,
soilSample,
soilTest
} from '../../../../api'
import storageSelect from '../storageSelect'
import global from '../../../../api/config'
// import http from '../../../../api/http'
......@@ -105,6 +120,7 @@ export default {
}
],
groupoptions: [],
seniorTypeArray: [],
selectIds: [],
getPage: {},
itemData: [
......@@ -189,6 +205,16 @@ export default {
console.log(data)
this.formObj.groupId = data
},
async _selSeniorType(data) {
console.log(data)
const result = await soilTest.sampleEdit({
id: data.id,
seniorType: data.seniorType
})
if (result) {
this.$Message.success('保存成功')
}
},
// 组件返回值
_componentResult(data, msg) {
switch (this.currentComponent) {
......@@ -209,6 +235,16 @@ export default {
this.groupoptions = result
}
},
_getSeniorTypeList: async function() {
const result = await soilAptitude.getDictInfo({
type: '高级样品分类',
page: 1,
rows: 50
})
if (result) {
this.seniorTypeArray = result.records
}
},
_open(contractId, type) {
console.log('待接收样品')
this.formObj = this.$resetFields(this.formObj)
......@@ -219,6 +255,7 @@ export default {
this.saveWayList = []
this.saveWayString = ''
this._getGroupList()
this._getSeniorTypeList()
this.$nextTick(() => {
this._page()
})
......
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