Commit 7ffb0e04 by lichengming
parents 6f19fd5f 9c6ca8ef
...@@ -37,7 +37,18 @@ ...@@ -37,7 +37,18 @@
:min-width="item.width?item.width:200" :min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable> :fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row[item.key]}}</span> <span v-if="item.key==='type'">
<span v-if="scope.row[item.key]===0">
检定
</span>
<span v-else-if="scope.row[item.key]===1">
校准
</span>
<span v-else-if="scope.row[item.key]===2">
外观检查
</span>
</span>
<span v-else>{{scope.row[item.key]}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
</PTVXETable> </PTVXETable>
......
...@@ -6,24 +6,24 @@ ...@@ -6,24 +6,24 @@
<Row> <Row>
<!--查询--> <!--查询-->
<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 v-show="searchOpen" id="formId" :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.name" @on-enter="_formSearch" name="name" placeholder="请输入实验室名称" clearable/> <Input v-model="formObj.name" name="name" placeholder="请输入实验室名称" clearable @on-enter="_formSearch"/>
</Form-item> </Form-item>
<Form-item class="search-item" label="资质:"> <Form-item class="search-item" label="资质:">
<Input v-model="formObj.aptitude" @on-enter="_formSearch" name="aptitude" placeholder="请输入资质" clearable/> <Input v-model="formObj.aptitude" name="aptitude" placeholder="请输入资质" clearable @on-enter="_formSearch"/>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button type="primary" @click="_formSearch">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</Col> </Col>
<!--操作--> <!--操作-->
<Col span="24"> <Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick" <btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide"
class="contHide"></btn-list> @on-result-change="_btnClick"></btn-list>
</Col> </Col>
<!--表格--> <!--表格-->
<Col span="24"> <Col span="24">
...@@ -37,7 +37,10 @@ ...@@ -37,7 +37,10 @@
:min-width="item.width?item.width:200" :min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable> :fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row[item.key]}}</span> <span v-if="item.status">
{{scope.row[item.key].display}}
</span>
<span v-else>{{scope.row[item.key]}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
</PTVXETable> </PTVXETable>
...@@ -102,6 +105,7 @@ export default { ...@@ -102,6 +105,7 @@ export default {
{ title: '委托单位', key: 'client', width: 200 }, { title: '委托单位', key: 'client', width: 200 },
{ title: '联系人', key: 'person', width: 120 }, { title: '联系人', key: 'person', width: 120 },
{ title: '联系电话', key: 'tel', width: 120 }, { title: '联系电话', key: 'tel', width: 120 },
{ title: '进度', key: 'progress', width: 200, status: true },
{ title: '传真', key: 'fax', width: 120 }, { title: '传真', key: 'fax', width: 120 },
{ title: '详细地址', key: 'address', width: 250 }, { title: '详细地址', key: 'address', width: 250 },
{ title: '邮编', key: 'postcode' }, { title: '邮编', key: 'postcode' },
...@@ -161,7 +165,8 @@ export default { ...@@ -161,7 +165,8 @@ export default {
onOk: () => { onOk: () => {
const result = meterEntrust.submit(ids) const result = meterEntrust.submit(ids)
if (result) { if (result) {
console.log(result) this.$Message.warning('提交成功!')
this._page()
} }
} }
}) })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="待完成" name="wait"> <el-tab-pane label="待完成" name="wait">
<MeterGoOutEntrust ref="waitTabs"></MeterGoOutEntrust> <MeterGoOutEntrust ref="waitTabs"></MeterGoOutEntrust>
</el-tab-pane> </el-tab-pane>
...@@ -33,6 +33,24 @@ export default { ...@@ -33,6 +33,24 @@ export default {
return { return {
activeName: 'wait' activeName: 'wait'
} }
},
mounted() {
this.activeName = 'wait'
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'wait') {
this._page()
} else if (tab.name === 'finish') {
this.$refs.finishTabs._page()
} else {
this.$refs.hisTabs._page()
}
},
_page() {
this.$refs.waitTabs._page()
}
} }
} }
</script> </script>
......
...@@ -4,19 +4,14 @@ ...@@ -4,19 +4,14 @@
<p slot="header">{{modalTitle}}</p> <p slot="header">{{modalTitle}}</p>
<div> <div>
<Form id="edit-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="90" inline> <Form id="edit-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="90" inline>
<!-- <Form-item label="委托方是否第一次送检" prop="firsted" class="width-48">-->
<!-- <Input v-model="formObj.firsted" name="firsted" placeholder="委托方是否第一次送检"/>-->
<!-- </Form-item>-->
<Form-item label="委托方是否第一次送检" prop="firsted" class="width-48"> <Form-item label="委托方是否第一次送检" prop="firsted" class="width-48">
<Radio-group v-model="formObj.firsted"> <Radio-group v-model="formObj.firsted">
<Radio v-for="item in judgeType" :key="item.value" :label="item.value">{{item.name}}</Radio> <Radio v-for="item in judgeType" :key="item.value" :label="item.value">{{item.name}}</Radio>
</Radio-group> </Radio-group>
</Form-item> </Form-item>
<Form-item label="委托单位" prop="client" class="width-48"> <Form-item label="委托单位" prop="client" class="width-48">
<!-- <Input v-model="formObj.client" name="client" placeholder="请输入委托单位"/>--> <AutoComplete :value="formObj.client" :down-data="customerData" name="client"
<AutoComplete :value="formObj.client" :downData="customerData" @on-result-change="_cusNameChange" placeholder="请输入或选择委托单位" @on-result-change="_cusNameChange"
name="client" placeholder="请输入或选择委托单位"
></AutoComplete> ></AutoComplete>
</Form-item> </Form-item>
<Form-item label="联系人" prop="operation.person" class="width-48"> <Form-item label="联系人" prop="operation.person" class="width-48">
...@@ -30,7 +25,7 @@ ...@@ -30,7 +25,7 @@
</Form-item> </Form-item>
<Form-item label="省、市、区" prop="testedCityData" class="width-48"> <Form-item label="省、市、区" prop="testedCityData" class="width-48">
<!-- <Input v-model="formObj.client" name="name" placeholder="请输入委托单位"/>--> <!-- <Input v-model="formObj.client" name="name" placeholder="请输入委托单位"/>-->
<CityNameCascader v-model="testedCityData" @on-result-change="_cascaderResult" name="tested"> <CityNameCascader v-model="testedCityData" name="tested" @on-result-change="_cascaderResult">
</CityNameCascader> </CityNameCascader>
</Form-item> </Form-item>
<Form-item label="街道" prop="street" class="width-48"> <Form-item label="街道" prop="street" class="width-48">
...@@ -45,8 +40,8 @@ ...@@ -45,8 +40,8 @@
</Form-item> </Form-item>
<Form-item label="委托日期:" prop="edate" class="width-48"> <Form-item label="委托日期:" prop="edate" class="width-48">
<!-- <Input v-model="formObj.edate" name="edate" placeholder="请输入联系人"/>--> <!-- <Input v-model="formObj.edate" name="edate" placeholder="请输入联系人"/>-->
<Date-picker @on-change="_ctimeChange" type="date" split-panels style="width:100%;" <Date-picker type="date" split-panels style="width:100%;" placeholder="请选择委托日期"
placeholder="请选择委托日期"></Date-picker> @on-change="_ctimeChange"></Date-picker>
</Form-item> </Form-item>
<Form-item label="合同号:" prop="contractCode" class="width-48"> <Form-item label="合同号:" prop="contractCode" class="width-48">
<Input v-model="formObj.contractCode" name="contractCode" placeholder="请输入联系人"/> <Input v-model="formObj.contractCode" name="contractCode" placeholder="请输入联系人"/>
...@@ -59,7 +54,7 @@ ...@@ -59,7 +54,7 @@
<Col span="24"> <Col span="24">
<!-- <btn-list :msg="btn" :open="searchOpen" :showSearchBtn="false" @on-result-change="_btnClick"--> <!-- <btn-list :msg="btn" :open="searchOpen" :showSearchBtn="false" @on-result-change="_btnClick"-->
<!-- class="contHide"></btn-list>--> <!-- class="contHide"></btn-list>-->
<Button @click="_add()" type="success">添加</Button> <Button type="success" @click="_add()">添加</Button>
</Col> </Col>
<Col span="24"> <Col span="24">
<PTVXETable <PTVXETable
...@@ -81,7 +76,7 @@ ...@@ -81,7 +76,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="item.key==='name'" @click.stop="_handleRow(scope)"> <div v-if="item.key==='name'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.name" @on-result-change="_judgeBasisChange" @click.native="_selectjudgeBasis(scope.$rowIndex)" blur placeholder="请输入或选择样品名称" <el-input v-model="scope.row.name" blur placeholder="请输入或选择样品名称" @on-result-change="_judgeBasisChange" @click.native="_selectjudgeBasis(scope.$rowIndex)"
></el-input> ></el-input>
</div> </div>
<div v-if="item.key==='spec'" @click.stop="_handleRow(scope)"> <div v-if="item.key==='spec'" @click.stop="_handleRow(scope)">
...@@ -102,9 +97,9 @@ ...@@ -102,9 +97,9 @@
<div v-if="item.key==='quantity'" @click.stop="_handleRow(scope)"> <div v-if="item.key==='quantity'" @click.stop="_handleRow(scope)">
<el-input <el-input
v-model="scope.row.quantity" v-model="scope.row.quantity"
@keydown.native="channelInputLimit"
type="number" type="number"
placeholder="请输入或选择数量" placeholder="请输入或选择数量"
@keydown.native="channelInputLimit"
/> />
</div> </div>
</template> </template>
...@@ -115,7 +110,7 @@ ...@@ -115,7 +110,7 @@
<div slot="footer"> <div slot="footer">
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult"></modal-footer> <modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult"></modal-footer>
</div> </div>
<EditModal ref="EditModal" @on-result-change="_backData" is-change /> <EditModal ref="EditModal" is-change @on-result-change="_backData" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -521,7 +516,6 @@ export default { ...@@ -521,7 +516,6 @@ export default {
this.id = '' this.id = ''
this.modalTitle = '出检委托单登记' this.modalTitle = '出检委托单登记'
this.testedCityData = [] this.testedCityData = []
console.log('098765', this.testedCityData.length)
}, },
_openEdit(formObj) { _openEdit(formObj) {
...@@ -564,6 +558,15 @@ export default { ...@@ -564,6 +558,15 @@ export default {
result[0].city, result[0].city,
result[0].area result[0].area
] ]
if (result[0].province) {
this.formObj.province = result[0].province
}
if (result[0].city) {
this.formObj.city = result[0].city
}
if (result[0].area) {
this.formObj.county = result[0].area
}
} }
}, },
_getAptitudeList: async function() { _getAptitudeList: async function() {
......
...@@ -4,24 +4,24 @@ ...@@ -4,24 +4,24 @@
<p slot="header">仪器领用</p> <p slot="header">仪器领用</p>
<Form :label-width="60" onsubmit="return false" inline> <Form :label-width="60" onsubmit="return false" inline>
<Form-item label="仪器名称"> <Form-item label="仪器名称">
<Input v-model="license" @on-enter="_search" placeholder="请输入仪器名称,回车查询" <Input v-model="name" placeholder="请输入仪器名称,回车查询" icon="ios-search-strong"
icon="ios-search-strong"/> @on-enter="_search"/>
</Form-item> </Form-item>
<Form-item class="search-btn" style="margin-left: -10px"> <Form-item class="search-btn" style="margin-left: -10px">
<Button @click="_search" type="primary">搜索</Button> <Button type="primary" @click="_search">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
<Row> <Row>
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :tableHeight="tableHeight" <PTVXETable ref="pageTable" :table-height="tableHeight"
@on-result-change="_tableResultChange" :getPage="getPage" select-data> :get-page="getPage" select-data @on-result-change="_tableResultChange">
<vxe-table-column <vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key" :field="item.key"
:title="item.title" :title="item.title"
:min-width="item.width?item.width:200" :min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" :fixed="item.fixed?item.fixed:undefined" sortable>
v-for="item in pageColumns"
:key="item.key" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="item.date">{{$dateformat(scope.row[item.key],'yyyy-mm-dd')}}</div> <div v-if="item.date">{{$dateformat(scope.row[item.key],'yyyy-mm-dd')}}</div>
<div v-else>{{scope.row[item.key]}}</div> <div v-else>{{scope.row[item.key]}}</div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</Col> </Col>
</Row> </Row>
<div slot="footer"> <div slot="footer">
<ModalFooter ref="footerModal" @on-result-change="_footerResult" :footer="footerList"></ModalFooter> <ModalFooter ref="footerModal" :footer="footerList" @on-result-change="_footerResult"></ModalFooter>
</div> </div>
</Modal> </Modal>
</template> </template>
...@@ -52,13 +52,15 @@ export default { ...@@ -52,13 +52,15 @@ export default {
selectNames: '', selectNames: '',
selectIds: '', selectIds: '',
getPage: {}, getPage: {},
formObj: {
sampleId: '',
name: ''
},
tableHeight: '300', tableHeight: '300',
pageColumns: [ pageColumns: [
{ title: '仪器名称', key: 'name' }, { title: '仪器名称', key: 'name' },
{ title: '测量范围', key: 'measuringRange' }, { title: '测量范围', key: 'measuringRange' },
{ title: '不确定度/准确度', key: 'uncertaintyAccuray' } { title: '不确定度/准确度', key: 'uncertaintyAccuray' }
// { title: '购买/租用时间', key: 'buyDate' },
// { title: '备注', key: 'remark' }
], ],
footerList: [ footerList: [
{ id: '', name: '取消', type: '' }, { id: '', name: '取消', type: '' },
...@@ -80,21 +82,18 @@ export default { ...@@ -80,21 +82,18 @@ export default {
_hideLoading() { _hideLoading() {
this.$refs.footerModal._hideLoading() this.$refs.footerModal._hideLoading()
}, },
_open() { _open(sampleId) {
this.showModal = true this.showModal = true
this.license = '' this.formObj.sampleId = sampleId
this._page() this._page()
}, },
_page: async function() { _page: async function() {
const data = {} Object.assign(this.formObj, this.$refs.pageTable._searchParams())
if (this.license) { const result = await meterSample.pageInstrutEdit(this.formObj)
data.license = this.license
}
// this.$refs.pageTable._page('search-form-car', 'LmsCarInfo/page', data)
const result = await meterSample.pageInstrutEdit(data)
console.log('result', result) console.log('result', result)
if (result) { if (result) {
this.getPage = result this.getPage = result
this.$refs.pageTable._hideLoading()
} }
}, },
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
......
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
this.$nextTick(function() { this.$nextTick(function() {
switch (res) { switch (res) {
case '仪器领用': case '仪器领用':
this.$refs.InstruEdit._open() this.$refs.InstruEdit._open(data.id)
break break
case '车辆管理': case '车辆管理':
this.$refs.carEdit._open() this.$refs.carEdit._open()
......
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
</Col> </Col>
</Row> </Row>
</div> </div>
<div slot="footer">
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult"></modal-footer>
</div>
</Modal> </Modal>
<fillout ref="fillout"></fillout> <fillout ref="fillout"></fillout>
<decide ref="decide"></decide> <decide ref="decide"></decide>
...@@ -92,6 +95,10 @@ export default { ...@@ -92,6 +95,10 @@ export default {
// {id: '', name: '复制历史样品检测项目', componentName: 'CopyHisItem'}, // {id: '', name: '复制历史样品检测项目', componentName: 'CopyHisItem'},
// {id: '', name: '删除'}, // {id: '', name: '删除'},
// ], // ],
footerList: [
{ name: '取消', type: '' },
{ name: '确定', type: 'primary' }
],
iconMsg: [{ type: 'md-checkmark', id: '', name: '完成' }], iconMsg: [{ type: 'md-checkmark', id: '', name: '完成' }],
btn: [ btn: [
{ {
...@@ -171,6 +178,20 @@ export default { ...@@ -171,6 +178,20 @@ export default {
this.formObj.ctimeBegin = data[0] this.formObj.ctimeBegin = data[0]
this.formObj.ctimeEnd = data[1] this.formObj.ctimeEnd = data[1]
}, },
_footerResult(name) {
switch (name) {
case '取消':
this._cancel()
break
case '确定':
this._cancel()
break
}
},
_cancel() {
this.showModal = false
this.$emit('on-result-change')
},
_btnClick(msg, componentName) { _btnClick(msg, componentName) {
this.currentComponent = componentName this.currentComponent = componentName
this.$nextTick(function() { this.$nextTick(function() {
...@@ -267,7 +288,13 @@ export default { ...@@ -267,7 +288,13 @@ export default {
this.$Message.success('请选择完成检测的项目') this.$Message.success('请选择完成检测的项目')
return false return false
} }
this._testItemEnd(this.selectIds) this.$Modal.confirm({
title: '提示',
content: '确定完成检测数据的填写了吗?',
onOk: () => {
this._testItemEnd(this.selectIds)
}
})
}, },
_testItemEnd: async function() { _testItemEnd: async function() {
const result = await meterItem.testEnd({ const result = await meterItem.testEnd({
......
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