Commit 7e817ea3 by lichengming

修改了出入库管理

parent 9998aac1
......@@ -155,5 +155,15 @@ export default {
.then(res => res),
// 登记历史记录
pageRegisterHis: data =>
http.post('soil/v1/alone_sample/page_register_his', data).then(res => res)
http.post('soil/v1/alone_sample/page_register_his', data).then(res => res),
// 出库历史记录
pageWaitDeliveryHis: data =>
http
.post('soil/v1/alone_sample/page_wait_delivery_his', data)
.then(res => res),
// 入库历史记录
pageWaitStorageHis: data =>
http
.post('soil/v1/alone_sample/page_wait_storage_his', data)
.then(res => res)
}
......@@ -8,11 +8,8 @@
<Col span="24" style="margin-top: 10px">
<Form id="formId" v-show="searchOpen" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="委托商:">
<Input v-model="formObj.client" @on-enter="_formSearch" name="client" placeholder="请输入委托单位" clearable/>
</Form-item>
<Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.entrustCode" @on-enter="_formSearch" name="entrustCode" placeholder="请输入委托单号" clearable/>
<Form-item class="search-item" label="项目名称:">
<Input v-model="formObj.projectName" @on-enter="_formSearch" name="projectName" placeholder="请输入项目名称" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -56,9 +53,10 @@
<script>
import { soilAptitude, soilEntrust } from '../../api'
import MeterEntrustRecord from '../../components/operation/Operation'
import ViewDetail from './ViewDetail'
export default {
// eslint-disable-next-line vue/no-unused-components
components: { MeterEntrustRecord },
components: { MeterEntrustRecord, ViewDetail },
data() {
return {
currentComponent: '',
......@@ -75,7 +73,7 @@ export default {
{
type: 'ios-list',
id: '',
name: '试样列表'
name: '查看'
},
{
type: 'ios-clock',
......@@ -90,20 +88,11 @@ export default {
selectIds: [],
getPage: {},
pageColumns: [
{ title: '委托商', key: 'client', width: 200 },
{ title: '委托编号', key: 'entrustCode', width: 120 },
{ title: '委托日期', key: 'entrustDate', width: 120, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 120 },
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '项目名称', key: 'projectName', width: 120 },
{ title: '项目负责人', key: 'projectLeader', width: 150, detail: true },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ 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 }
{ title: '箱数', key: 'casesNum', width: 120 },
{ title: '登记日期', key: 'registTime', width: 120, date: true }
]
}
},
......@@ -140,6 +129,9 @@ export default {
case '编辑':
this._editModal(true, data.id)
break
case '查看':
this._viewModal(true, data.id)
break
case '资质项目':
this._itemModal(data.id)
break
......@@ -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) {
// 管理样品
this.currentComponent = 'SoilSampleManage'
......@@ -189,7 +203,9 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await soilEntrust.pageRegHis(this.formObj)
const result = await soilEntrust.pageWaitStorageHis(
this.$serializeForm(this.formObj)
)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
......
......@@ -8,11 +8,8 @@
<Col span="24" style="margin-top: 10px">
<Form id="formId" v-show="searchOpen" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="委托商:">
<Input v-model="formObj.client" @on-enter="_formSearch" name="client" placeholder="请输入委托单位" clearable/>
</Form-item>
<Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.entrustCode" @on-enter="_formSearch" name="entrustCode" placeholder="请输入委托单号" clearable/>
<Form-item class="search-item" label="项目名称:">
<Input v-model="formObj.projectName" @on-enter="_formSearch" name="projectName" placeholder="请输入项目名称" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -56,9 +53,10 @@
<script>
import { soilAptitude, soilEntrust } from '../../../api'
import MeterEntrustRecord from '../../../components/operation/Operation'
import ViewDetail from './ViewDetail'
export default {
// eslint-disable-next-line vue/no-unused-components
components: { MeterEntrustRecord },
components: { MeterEntrustRecord, ViewDetail },
data() {
return {
currentComponent: '',
......@@ -75,7 +73,7 @@ export default {
{
type: 'ios-list',
id: '',
name: '试样列表'
name: '查看'
},
{
type: 'ios-clock',
......@@ -90,20 +88,11 @@ export default {
selectIds: [],
getPage: {},
pageColumns: [
{ title: '委托商', key: 'client', width: 200 },
{ title: '委托编号', key: 'entrustCode', width: 120 },
{ title: '委托日期', key: 'entrustDate', width: 120, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 120 },
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '项目名称', key: 'projectName', width: 120 },
{ title: '项目负责人', key: 'projectLeader', width: 150, detail: true },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ 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 }
{ title: '箱数', key: 'casesNum', width: 120 },
{ title: '登记日期', key: 'registTime', width: 120, date: true }
]
}
},
......@@ -140,6 +129,9 @@ export default {
case '编辑':
this._editModal(true, data.id)
break
case '查看':
this._viewModal(true, data.id)
break
case '资质项目':
this._itemModal(data.id)
break
......@@ -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) {
// 管理样品
this.currentComponent = 'SoilSampleManage'
......@@ -189,7 +203,7 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await soilEntrust.pageRegHis(this.formObj)
const result = await soilEntrust.pageWaitDeliveryHis(this.formObj)
if (result) {
this.$refs.pageTable._hideLoading()
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