Commit b1104649 by lichengming

修改了样品管理

parent f6ba9718
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
viewUri: '/soil/v1/standard_annex/preview/' viewUri: '/soil/v1/standard_annex/preview/'
} }
break break
case 'sampleId': case 'aloneSampleId':
// 样品 // 样品
this.entrustId = id this.entrustId = id
this.urlData = { this.urlData = {
......
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
}, },
methods: { methods: {
_batchUpload() { _batchUpload() {
if (this.formObj.sampleId) { if (this.formObj.aloneSampleId) {
this.$refs.batchUploadSample._open(this.id) this.$refs.batchUploadSample._open(this.id)
} else { } else {
this.$refs.batchUpload._open(this.id) this.$refs.batchUpload._open(this.id)
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<!--搜索表单--> <!--搜索表单-->
<Form id="search-form" :label-width="90" v-show="searchOpen" inline onsubmit="return false"> <Form id="search-form" :label-width="90" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="钻孔名称:">
<Input @on-enter="_formSearch" v-model="formObj.boreholeName" name="boreholeName" placeholder="请输入钻孔名称" clearable/>
</Form-item>
<Form-item class="search-item" label="库房号:"> <Form-item class="search-item" label="库房号:">
<Input @on-enter="_formSearch" v-model="formObj.warehouse" name="warehouse" placeholder="请输入库房号" clearable/> <Input @on-enter="_formSearch" v-model="formObj.warehouse" name="warehouse" placeholder="请输入库房号" clearable/>
</Form-item> </Form-item>
...@@ -60,18 +63,22 @@ ...@@ -60,18 +63,22 @@
</div> </div>
<!--组件加载--> <!--组件加载-->
<ViewSample ref="viewSample"></ViewSample> <ViewSample ref="viewSample"></ViewSample>
<StandardsManageEdit ref="editModal" @on-result-change="_page"></StandardsManageEdit> <ViewDetail ref="viewDetail"></ViewDetail>
<FileManage ref="FileManage" @on-result-change="_page"></FileManage>
<stockSampleEdit ref="editModal" @on-result-change="_page"></stockSampleEdit>
</div> </div>
</template> </template>
<script> <script>
import { soilSample } from '../../../api' import { soilEntrust, soilSample } from '../../../api'
import StandardsManageEdit from './AddressManageEdit' // 添加、编辑 import ViewDetail from '../../soil-alone-sample/ViewDetail'
import ViewSample from './ViewLocationEntrust' import ViewSample from './ViewLocationEntrust'
import stockSampleEdit from './stockSampleEdit'
export default { export default {
components: { components: {
StandardsManageEdit, stockSampleEdit,
ViewSample ViewSample,
ViewDetail
}, },
data() { data() {
return { return {
...@@ -84,10 +91,9 @@ export default { ...@@ -84,10 +91,9 @@ export default {
{ {
type: 'success', type: 'success',
id: '', id: '',
name: '添加', name: '出库'
componentName: 'StandardsManageEdit'
}, },
{ type: 'error', id: '', name: '删除' } { type: 'success', id: '', name: '批量填写' }
], ],
// 表格 // 表格
pageColumns: [ pageColumns: [
...@@ -107,10 +113,20 @@ export default { ...@@ -107,10 +113,20 @@ export default {
componentName: 'StandardsManageEdit' componentName: 'StandardsManageEdit'
}, },
{ {
type: 'ios-list',
id: '',
name: '查看'
},
{
type: 'md-apps', type: 'md-apps',
id: '', id: '',
name: '查看试样' name: '查看试样'
}, },
{
type: 'md-cloud',
id: '',
name: '附件'
},
{ type: 'md-remove-circle', id: '', name: '删除' } { type: 'md-remove-circle', id: '', name: '删除' }
], ],
searchOpen: false, searchOpen: false,
...@@ -170,24 +186,65 @@ export default { ...@@ -170,24 +186,65 @@ export default {
case '查看试样': case '查看试样':
this._viewSample(data.name) this._viewSample(data.name)
break break
case '查看':
this._viewModal(true, data.id)
break
case '附件':
this._upload(data.id)
break
case '删除': case '删除':
this._deleteById(data.id) this._deleteById(data.id)
break break
} }
}) })
}, },
_upload(id) {
// 上传文件
this.$refs.FileManage._open(id, 'aloneSampleId')
},
_viewModal(edit, id) {
if (edit) {
this.$refs.pageTable._showLoading()
// 编辑
this._getDetailById(id)
} else {
// 添加
this.$nextTick(() => {
this.$refs.refModal._open()
})
}
},
_getDetailById: async function(id) {
const result = await soilEntrust.aloneSampleGetById(id)
if (result) {
this.$refs.viewDetail._open(result)
this.$refs.pageTable._hideLoading()
} else {
this.$refs.pageTable._hideLoading()
}
},
_viewSample(data) { _viewSample(data) {
this.$refs.viewSample._open(data) this.$refs.viewSample._open(data)
}, },
_editModal: async function(edit, id) { _editModal(edit, id) {
if (edit) { if (edit) {
const result = await soilSample.aloneWarehouseLocationGetById(id) this.$refs.pageTable._showLoading()
if (result) { // 编辑
this.$refs.editModal._open(result) this._getById(id)
}
} else { } else {
// 添加 // 添加
this.$refs.editModal._open() this.$nextTick(() => {
this.$refs.refModal._open()
})
}
},
_getById: async function(id) {
const result = await soilEntrust.aloneSampleGetById(id)
if (result) {
this.$refs.editModal._openEdit(result)
this.$refs.pageTable._hideLoading()
} else {
this.$refs.pageTable._hideLoading()
} }
}, },
// 获取数据 // 获取数据
......
...@@ -376,7 +376,7 @@ export default { ...@@ -376,7 +376,7 @@ export default {
// 上传文件 // 上传文件
this.currentComponent = 'FileManage' this.currentComponent = 'FileManage'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.refModal._open(id, 'sampleId') this.$refs.refModal._open(id, 'aloneSampleId')
}) })
}, },
_getById: async function(id) { _getById: async function(id) {
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
contractId: '', contractId: '',
// //
page: 0, page: 0,
rows: 30, rows: 10,
formObj: {}, formObj: {},
processObj: { processObj: {
height: document.documentElement.clientHeight - 300 + 'px' height: document.documentElement.clientHeight - 300 + 'px'
......
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