Commit 9998aac1 by lichengming

修改了样品管理

parent 23ecb272
...@@ -152,5 +152,8 @@ export default { ...@@ -152,5 +152,8 @@ export default {
submitToInstock: data => submitToInstock: data =>
http http
.post('soil/v1/alone_sample/submit_to_out_storage', data) .post('soil/v1/alone_sample/submit_to_out_storage', data)
.then(res => res) .then(res => res),
// 登记历史记录
pageRegisterHis: data =>
http.post('soil/v1/alone_sample/page_register_his', data).then(res => res)
} }
...@@ -254,5 +254,9 @@ export default { ...@@ -254,5 +254,9 @@ export default {
pageWaitDelivery: data => pageWaitDelivery: data =>
http.post('soil/v1/alone_sample/page_wait_delivery', data).then(res => res), http.post('soil/v1/alone_sample/page_wait_delivery', data).then(res => res),
outStorageSubmit: data => outStorageSubmit: data =>
http.post('soil/v1/alone_sample/out_storage_submit', data).then(res => res) http.post('soil/v1/alone_sample/out_storage_submit', data).then(res => res),
pageStorehouseSample: data =>
http
.post('soil/v1/alone_sample/page_storehouse_sample', data)
.then(res => res)
} }
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
<div v-else-if="item.key==='classify'"> <div v-else-if="item.key==='classify'">
{{scope.row[item.key]===0?'判定依据':scope.row[item.key]===1?'检测依据':scope.row[item.key]===2?'其他':''}} {{scope.row[item.key]===0?'判定依据':scope.row[item.key]===1?'检测依据':scope.row[item.key]===2?'其他':''}}
</div> </div>
<div v-else-if="item.key==='type'"> <div v-else-if="item.key==='type'">
{{scope.row[item.key]===0?'待检':scope.row[item.key]===1?'备样':scope.row[item.key]===2?'备用': ''}} {{scope.row[item.key]===0?'待检':scope.row[item.key]===1?'备样':scope.row[item.key]===2?'备用': ''}}
</div> </div>
...@@ -92,11 +91,12 @@ export default { ...@@ -92,11 +91,12 @@ export default {
], ],
// 表格 // 表格
pageColumns: [ pageColumns: [
{ title: '库房号', key: 'warehouse' }, { title: '钻孔名称', key: 'boreholeName' },
{ title: '货架号', key: 'name' }, { title: '项目负责人', key: 'projectLeader' },
{ title: '位置分类', key: 'type' }, { title: '入库日期', key: 'instockTime', date: true },
{ title: '位置管理人', key: 'manager' }, { title: '留存有效期', key: 'keepLimitTime', date: true },
{ title: '备注说明', key: 'remark' } { title: '库房号', key: 'storehouse' },
{ title: '架位号', key: 'shelfCode' }
], ],
// 操作 // 操作
iconMsg: [ iconMsg: [
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,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())
const result = await soilSample.aloneWarehouseLocation( const result = await soilSample.pageStorehouseSample(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -8,9 +8,6 @@ ...@@ -8,9 +8,6 @@
<Col span="24" style="margin-top: 10px"> <Col span="24" style="margin-top: 10px">
<Form id="formId" v-show="searchOpen" :label-width="90" inline onsubmit="return false"> <Form id="formId" v-show="searchOpen" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.entrustCode" @on-enter="_formSearch" name="entrustCode" placeholder="请输入委托编号" clearable/>
</Form-item>
<Form-item class="search-item" label="项目名称:"> <Form-item class="search-item" label="项目名称:">
<Input v-model="formObj.projectName" @on-enter="_formSearch" name="projectName" placeholder="请输入项目名称" clearable/> <Input v-model="formObj.projectName" @on-enter="_formSearch" name="projectName" placeholder="请输入项目名称" clearable/>
</Form-item> </Form-item>
......
...@@ -8,11 +8,8 @@ ...@@ -8,11 +8,8 @@
<Col span="24" style="margin-top: 10px"> <Col span="24" style="margin-top: 10px">
<Form id="formId" v-show="searchOpen" :label-width="90" inline onsubmit="return false"> <Form id="formId" v-show="searchOpen" :label-width="90" 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" name="client" placeholder="请输入委托单位" clearable/> <Input v-model="formObj.projectName" @on-enter="_formSearch" name="projectName" placeholder="请输入项目名称" clearable/>
</Form-item>
<Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.entrustCode" @on-enter="_formSearch" name="entrustCode" placeholder="请输入委托单号" clearable/>
</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>
...@@ -56,9 +53,10 @@ ...@@ -56,9 +53,10 @@
<script> <script>
import { soilAptitude, soilEntrust } from '../../api' import { soilAptitude, soilEntrust } from '../../api'
import MeterEntrustRecord from '../../components/operation/Operation' import MeterEntrustRecord from '../../components/operation/Operation'
import ViewDetail from './ViewDetail'
export default { export default {
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
components: { MeterEntrustRecord }, components: { MeterEntrustRecord, ViewDetail },
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
...@@ -75,7 +73,7 @@ export default { ...@@ -75,7 +73,7 @@ export default {
{ {
type: 'ios-list', type: 'ios-list',
id: '', id: '',
name: '试样列表' name: '查看'
}, },
{ {
type: 'ios-clock', type: 'ios-clock',
...@@ -90,20 +88,11 @@ export default { ...@@ -90,20 +88,11 @@ export default {
selectIds: [], selectIds: [],
getPage: {}, getPage: {},
pageColumns: [ pageColumns: [
{ title: '委托商', key: 'client', width: 200 }, { title: '项目名称', key: 'projectName', width: 120 },
{ title: '委托编号', key: 'entrustCode', width: 120 }, { title: '项目负责人', key: 'projectLeader', width: 150, detail: true },
{ title: '委托日期', key: 'entrustDate', width: 120, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 120 },
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 }, { title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true }, { title: '箱数', key: 'casesNum', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 }, { title: '登记日期', key: 'registTime', width: 120, date: true }
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
{ title: '批准日期', key: 'approveDate', width: 120, date: true },
{ title: '批准人', key: 'approver', width: 120 },
{ title: '检验类别', key: 'testType', width: 120 }
] ]
} }
}, },
...@@ -140,6 +129,9 @@ export default { ...@@ -140,6 +129,9 @@ export default {
case '编辑': case '编辑':
this._editModal(true, data.id) this._editModal(true, data.id)
break break
case '查看':
this._viewModal(true, data.id)
break
case '资质项目': case '资质项目':
this._itemModal(data.id) this._itemModal(data.id)
break break
...@@ -161,6 +153,28 @@ export default { ...@@ -161,6 +153,28 @@ export default {
} }
}) })
}, },
_viewModal(edit, id) {
this.currentComponent = 'ViewDetail'
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.refModal._open(result)
this.$refs.pageTable._hideLoading()
} else {
this.$refs.pageTable._hideLoading()
}
},
_sampleManage(data) { _sampleManage(data) {
// 管理样品 // 管理样品
this.currentComponent = 'SoilSampleManage' this.currentComponent = 'SoilSampleManage'
...@@ -189,7 +203,9 @@ export default { ...@@ -189,7 +203,9 @@ export default {
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj) console.log('this.formObj', this.formObj)
const result = await soilEntrust.pageRegHis(this.formObj) const result = await soilEntrust.pageRegisterHis(
this.$serializeForm(this.formObj)
)
if (result) { if (result) {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.getPage = result this.getPage = result
......
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