Commit c4219da5 by lichengming
parents 58cbfe47 1c2f80f0
...@@ -32,4 +32,5 @@ export { default as meterSample } from './meter/meter-sample' ...@@ -32,4 +32,5 @@ export { default as meterSample } from './meter/meter-sample'
export { default as meterManageItem } from './meter/meter-manage-item' export { default as meterManageItem } from './meter/meter-manage-item'
export { default as meterItem } from './meter/meter-item' export { default as meterItem } from './meter/meter-item'
export { default as meterDevice } from './meter/meter-device' export { default as meterDevice } from './meter/meter-device'
export { default as meterContract } from './meter/meter-contract'
export { default as lmsBaseDict } from './lims/lms-base-dict' export { default as lmsBaseDict } from './lims/lms-base-dict'
/**
* 工作台
*/
import http from '../http'
import { https } from '../https'
export default {
// page
page: data => http.post('meter/v1/contract/page', data).then(res => res),
pageQuoteFirstReview: data =>
http
.post('meter/v1/contract/page_quote_first_review', data)
.then(res => res),
submitQuoteFirstReview: data =>
http
.post('meter/v1/contract/submit_to_review_first?ids=' + data)
.then(res => res),
getById: data => http.get('meter/v1/contract/' + data).then(res => res),
getVOById: data => http.get('meter/v1/contract/vo/' + data).then(res => res),
// 删除
deleteById: data =>
http.delete('meter/v1/contract/?ids=' + data).then(res => res),
// 保存
save: data =>
https
.post('meter/v1/contract/add_aptitude', JSON.stringify(data))
.then(res => res),
// 编辑
edit: data =>
http.put('meter/v1/contract/' + data.id, data.obj).then(res => res),
addQuote: data =>
https
.post('meter/v1/contract/add_quote', JSON.stringify(data))
.then(res => res)
}
<template>
<div>
<!--内容-->
<div class="layout-content-padding">
<div class="layout-content-main">
<Row>
<!--查询-->
<Col span="24" style="margin-top: 10px">
<Form v-show="searchOpen" id="formId" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="实验室名称:">
<Input v-model="formObj.name" name="name" placeholder="请输入实验室名称" clearable @on-enter="_formSearch"/>
</Form-item>
<Form-item class="search-item" label="资质:">
<Input v-model="formObj.aptitude" name="aptitude" placeholder="请输入资质" clearable @on-enter="_formSearch"/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide"
@on-result-change="_btnClick"></btn-list>
</Col>
<!--表格-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<MeterSampleManage ref="meterSampleManageModal" @on-result-change="_componentResult"></MeterSampleManage>
<MeterEntrustDetail ref="meterSampleEdit" @on-result-change="_componentResult"></MeterEntrustDetail>
<Operation ref="operation"></Operation>
</div>
</template>
<script>
import { meterContract, meterEntrust, meterSubcontractor } from '../../../api'
import Operation from '../../../components/operation/Operation'
import MeterSampleManage from './MeterSampleManage'
import MeterEntrustDetail from './MeterContractApprovalDetail'
export default {
components: { MeterSampleManage, MeterEntrustDetail, Operation },
data() {
return {
currentComponent: 'FoodSampleGovern',
formId: 'meterReviewEntrustFormId',
searchOpen: false,
btn: [
{
// meter-review-entrust-pass-btn
type: 'success',
id: '',
name: '通过'
},
// meter-review-entrust-back-btn
{
type: 'success',
id: '',
name: '驳回'
}
],
iconMsg: [
{
type: 'md-paper',
id: '',
name: '详情'
},
{
type: 'ios-beaker',
id: '',
name: '样品管理'
},
{ type: 'md-cloud', id: '', name: '附件' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
],
formObj: {
name: undefined,
aptitude: undefined
},
selectIds: [],
getPage: {},
pageColumns: [
{ title: '委托单位', key: 'client', width: 200 },
{ title: '联系人', key: 'person', width: 120 },
{ title: '联系电话', key: 'tel', width: 120 },
{ title: '传真', key: 'fax', width: 120 },
{ title: '详细地址', key: 'address', width: 250 },
{ title: '邮编', key: 'postcode' },
{ title: 'E-mail', key: 'email', width: 120 },
{ title: '委托日期', key: 'edate', width: 120 },
{ title: '费用合计', key: 'fee', width: 120 },
{ title: '合同号', key: 'contractCode', width: 120 },
{ title: '备注', key: 'remark' }
]
}
},
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('search')
} else {
return this.$tableHeight('noSearch')
}
}
},
mounted() {
this._page()
},
methods: {
_detailModal(data) {
console.log(data)
this.$refs.meterSampleEdit._open(data)
// 查看
// this.$store.dispatch('FoodContract/getById', data.id).then(() => {
// if (data.type === 0) {
// // 企业委托 ’0‘
// this.currentComponent = 'FoodContractCompanyDetail'
// } else {
// // 政府委托 ’1‘
// this.currentComponent = 'FoodContractGovernDetail'
// }
// this.$nextTick(() => {
// this.$refs.refModal._open(this.$store.state.FoodContract.model)
// })
// })
},
_modalResult() {
if (this.currentComponent === 'FoodSubcontracterEdit') {
this._page()
}
},
_btnClick(msg, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '添加':
this._editModal(false)
break
case '通过':
this._passReview()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_iconClick(res, data) {
this.$nextTick(function() {
switch (res) {
case '样品管理':
this._manageSample(data)
break
case '详情':
this._detailModal(data)
break
case '编辑':
this._editModal(true, data.id)
break
case '资质项目':
this._itemModal(data.id)
break
case '附件':
this._upload(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
case '操作日志':
this._record(data.id)
break
}
})
},
_manageSample(data) {
// 管理样品
this.$refs.meterSampleManageModal._open(data.id)
},
_componentResult(data, msg) {
switch (this.currentComponent) {
case 'FoodContractCompanyEdit':
this._page()
break
case 'FoodContractGovernEdit':
this._page()
break
case 'FoodContractCompanyEditByDLTB':
this._page()
break
case 'FoodContractCompanyEditByHES':
this._page()
break
}
},
_record(id) {
this.$refs.operation._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
case 'changeSize':
this._page()
break
case 'selectIds':
this.selectIds = data
break
}
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterContract.pageQuoteFirstReview(this.formObj)
if (result) {
console.log('结果')
console.log(result)
this.$refs.pageTable._hideLoading()
this.getPage = result
}
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
// 删除
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
// 编辑&添加
_editModal(edit, id) {
if (edit) {
// 编辑
// this.$refs.editSubcontractorModal._open(id)
this._getById(id)
} else {
// 添加
this.$refs.editSubcontractorModal._open()
}
},
_passReview() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择要通过评审的委托单!')
return false
}
this.$Modal.confirm({
title: '提示',
content: '确定通过该委托单?',
onOk: () => {
this._passEntrustReview(this.selectIds)
}
})
},
_passEntrustReview: async function(ids) {
const result = await meterEntrust.passReview(ids)
if (result) {
this.$Message.success('提交成功!')
await this._page()
}
},
// 追加项目
_itemModal(data) {
this.$refs.refModal._open(data)
},
_upload(id) {
// 上传文件
this.$refs.refModal._open(id, 'subcontractorId')
},
_getById: async function(id) {
const result = await meterSubcontractor.getById(id)
if (result) {
this.$refs.editSubcontractorModal._open(result)
}
},
_delete: async function(ids) {
const result = await meterSubcontractor.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
}
}
}
</script>
<template>
<div>
<Modal v-model="showDetailModal" :width="1100" title="委托详情" class="modal-footer-none">
<div :style="{height}" style="overflow-y: auto">
<table class="tableClass">
<tbody>
<tr>
<th colspan="6" class="tableClass_back">委托单位信息</th>
</tr>
<tr>
<th>委托单位</th>
<td>{{obj.client}}</td>
<th>联系人</th>
<td>{{obj.person}}</td>
</tr>
<tr>
<th>联系电话</th>
<td>{{obj.tel}}</td>
<th>传真</th>
<td>{{obj.fax}}</td>
</tr>
<tr>
<th>详细地址</th>
<td>{{obj.street}}</td>
<th>E-mail</th>
<td>{{obj.email}}</td>
</tr>
<tr>
<th>是否第一次送检</th>
<td>{{obj.firsted===1? '是':'否'}}</td>
<th>邮编</th>
<td>{{obj.postcode}}</td>
</tr>
<tr>
<th>地址</th>
<td>{{obj.province}}&nbsp;{{obj.city}}&nbsp;{{obj.county}}</td>
<th>委托日期</th>
<td>{{obj.edate}}</td>
</tr>
<tr>
<th>合同号</th>
<td>{{obj.contractCode}}</td>
<th>备注</th>
<td>{{obj.remark}}</td>
</tr>
</tbody>
</table>
</div>
</Modal>
</div>
</template>
<script>
/**
* 政府委托信息表详情
*/
export default {
data() {
return {
obj: {
// detail: {},
// customer: {},
// finance: {},
// tested: {}
firsted: 0,
client: '',
linkman: '',
tel: '',
email: '',
address: '',
remark: '',
province: '',
city: '',
county: '',
street: '',
aptitude: [],
assessFormSn: '',
subArea: '',
personCondition: '',
edate: '',
contractCode: ''
},
showDetailModal: false,
// sampleType:['退样','留样','作废'],
dispose: '',
height: '',
showMoney: false
}
},
methods: {
_open(obj, flag) {
this.showDetailModal = true
this.obj = obj
console.log('传过来的数据')
console.log(this.obj)
// if(obj.dispose !== undefined || ''){
// this.dispose = this.sampleType[obj.dispose];
// }else{
// this.dispose = '';
// }
if (flag === 'showMoney') {
this.showMoney = true
} else {
this.showMoney = false
}
this.height = '550px'
}
}
}
</script>
<template>
<div>
<!--内容-->
<div class="layout-content-padding">
<div class="layout-content-main">
<Row>
<!--查询-->
<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.name" @on-enter="_formSearch" name="name" placeholder="请输入实验室名称" clearable/>
</Form-item>
<Form-item class="search-item" label="资质:">
<Input v-model="formObj.aptitude" @on-enter="_formSearch" name="aptitude" placeholder="请输入资质" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick"
class="contHide"></btn-list>
</Col>
<!--表格-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange" hide-checkbox>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
import { meterEntrust, meterSubcontractor } from '../../../api'
export default {
components: {},
data() {
return {
currentComponent: '',
formId: 'meterSubcontractorFormId',
searchOpen: false,
btn: [
{
type: 'success',
id: 'meter-subcontractor-add-btn',
name: '添加'
}
],
iconMsg: [
{
type: 'ios-clock',
id: '',
name: '编辑'
},
{
type: 'ios-clock',
id: '',
name: '资质项目'
},
{ type: 'ios-clock', id: '', name: '附件' },
{ type: 'ios-clock', id: '', name: '删除' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
],
formObj: {
name: undefined,
aptitude: undefined
},
selectIds: [],
getPage: {},
pageColumns: [
{ title: '委托单位', key: 'client', width: 200 },
{ title: '联系人', key: 'person', width: 120 },
{ title: '联系电话', key: 'tel', width: 120 },
{ title: '传真', key: 'fax', width: 120 },
{ title: '详细地址', key: 'address', width: 250 },
{ title: '邮编', key: 'postcode' },
{ title: 'E-mail', key: 'email', width: 120 },
{ title: '委托日期', key: 'edate', width: 120 },
{ title: '费用合计', key: 'fee', width: 120 },
{ title: '合同号', key: 'contractCode', width: 120 },
{ title: '备注', key: 'remark' }
]
}
},
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('search')
} else {
return this.$tableHeight('noSearch')
}
}
},
mounted() {
this._page()
},
methods: {
_modalResult() {
if (this.currentComponent === 'FoodSubcontracterEdit') {
this._page()
}
},
_btnClick(msg, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '添加':
this._editModal(false)
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_iconClick(res, data, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (res) {
case '编辑':
this._editModal(true, data.id)
break
case '资质项目':
this._itemModal(data.id)
break
case '附件':
this._upload(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
case '操作日志':
this._record(data.id)
break
}
})
},
_record(id) {
this.$refs.refModal._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.getPage = this.$store.state.FoodSubcontracter.page
break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
case 'changeSize':
this._page()
break
}
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterEntrust.pageSendEntrust(this.formObj)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
}
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
// 删除
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
// 编辑&添加
_editModal(edit, id) {
if (edit) {
// 编辑
// this.$refs.editSubcontractorModal._open(id)
this._getById(id)
} else {
// 添加
this.$refs.editSubcontractorModal._open()
}
},
// 追加项目
_itemModal(data) {
this.$refs.refModal._open(data)
},
_upload(id) {
// 上传文件
this.$refs.refModal._open(id, 'subcontractorId')
},
_getById: async function(id) {
const result = await meterSubcontractor.getById(id)
if (result) {
this.$refs.editSubcontractorModal._open(result)
}
},
_delete: async function(ids) {
const result = await meterSubcontractor.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
}
}
}
</script>
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName">
<el-tab-pane label="待完成" name="wait">
<MeterReviewEntrust ref="waitTabs"></MeterReviewEntrust>
</el-tab-pane>
<el-tab-pane label="历史评审" name="his">
<MeterReviewEntrustHis ref="hisTabs"></MeterReviewEntrustHis>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import MeterReviewEntrust from './MeterContractApproval'
import MeterReviewEntrustHis from './MeterContractApprovalHis'
export default {
name: 'MeterSendEntrustIndex',
components: {
MeterReviewEntrust,
MeterReviewEntrustHis
},
data() {
return {
activeName: 'wait'
}
}
}
</script>
<style scoped>
</style>
<template>
<div>
<Modal v-model="showDetailModal" :width="1100" title="委托详情" class="modal-footer-none">
<div :style="{height}" style="overflow-y: auto">
<table class="tableClass">
<tbody>
<tr>
<th colspan="6" class="tableClass_back">委托单位信息</th>
</tr>
<tr>
<th>委托单位</th>
<td>{{obj.client}}</td>
<th>联系人</th>
<td>{{obj.person}}</td>
</tr>
<tr>
<th>联系电话</th>
<td>{{obj.tel}}</td>
<th>传真</th>
<td>{{obj.fax}}</td>
</tr>
<tr>
<th>详细地址</th>
<td>{{obj.street}}</td>
<th>E-mail</th>
<td>{{obj.email}}</td>
</tr>
<tr>
<th>是否第一次送检</th>
<td>{{obj.firsted===1? '是':'否'}}</td>
<th>邮编</th>
<td>{{obj.postcode}}</td>
</tr>
<tr>
<th>地址</th>
<td>{{obj.province}}&nbsp;{{obj.city}}&nbsp;{{obj.county}}</td>
<th>委托日期</th>
<td>{{obj.edate}}</td>
</tr>
<tr>
<th>合同号</th>
<td>{{obj.contractCode}}</td>
<th>备注</th>
<td>{{obj.remark}}</td>
</tr>
</tbody>
</table>
</div>
</Modal>
</div>
</template>
<script>
/**
* 政府委托信息表详情
*/
export default {
data() {
return {
obj: {
// detail: {},
// customer: {},
// finance: {},
// tested: {}
firsted: 0,
client: '',
linkman: '',
tel: '',
email: '',
address: '',
remark: '',
province: '',
city: '',
county: '',
street: '',
aptitude: [],
assessFormSn: '',
subArea: '',
personCondition: '',
edate: '',
contractCode: ''
},
showDetailModal: false,
// sampleType:['退样','留样','作废'],
dispose: '',
height: '',
showMoney: false
}
},
methods: {
_open(obj, flag) {
this.showDetailModal = true
this.obj = obj
console.log('传过来的数据')
console.log(this.obj)
// if(obj.dispose !== undefined || ''){
// this.dispose = this.sampleType[obj.dispose];
// }else{
// this.dispose = '';
// }
if (flag === 'showMoney') {
this.showMoney = true
} else {
this.showMoney = false
}
this.height = '550px'
}
}
}
</script>
<template>
<div>
<!--内容-->
<div class="layout-content-padding">
<div class="layout-content-main">
<Row>
<!--查询-->
<Col span="24" style="margin-top: 10px">
<Form v-show="searchOpen" id="formId" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="实验室名称:">
<Input v-model="formObj.name" name="name" placeholder="请输入实验室名称" clearable @on-enter="_formSearch"/>
</Form-item>
<Form-item class="search-item" label="资质:">
<Input v-model="formObj.aptitude" name="aptitude" placeholder="请输入资质" clearable @on-enter="_formSearch"/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide"
@on-result-change="_btnClick"></btn-list>
</Col>
<!--表格-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<MeterSampleManage ref="meterSampleManageModal" @on-result-change="_componentResult"></MeterSampleManage>
<MeterEntrustDetail ref="meterSampleEdit" @on-result-change="_componentResult"></MeterEntrustDetail>
<Operation ref="operation"></Operation>
</div>
</template>
<script>
import { meterContract, meterEntrust, meterSubcontractor } from '../../../api'
import Operation from '../../../components/operation/Operation'
import MeterSampleManage from './MeterSampleManage'
import MeterEntrustDetail from './MeterContractCheckDetail'
export default {
components: { MeterSampleManage, MeterEntrustDetail, Operation },
data() {
return {
currentComponent: 'FoodSampleGovern',
formId: 'meterReviewEntrustFormId',
searchOpen: false,
btn: [
{
// meter-review-entrust-pass-btn
type: 'success',
id: '',
name: '通过'
},
// meter-review-entrust-back-btn
{
type: 'success',
id: '',
name: '驳回'
}
],
iconMsg: [
{
type: 'md-paper',
id: '',
name: '详情'
},
{
type: 'ios-beaker',
id: '',
name: '样品管理'
},
{ type: 'md-cloud', id: '', name: '附件' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
],
formObj: {
name: undefined,
aptitude: undefined
},
selectIds: [],
getPage: {},
pageColumns: [
{ title: '委托单位', key: 'client', width: 200 },
{ title: '联系人', key: 'person', width: 120 },
{ title: '联系电话', key: 'tel', width: 120 },
{ title: '传真', key: 'fax', width: 120 },
{ title: '详细地址', key: 'address', width: 250 },
{ title: '邮编', key: 'postcode' },
{ title: 'E-mail', key: 'email', width: 120 },
{ title: '委托日期', key: 'edate', width: 120 },
{ title: '费用合计', key: 'fee', width: 120 },
{ title: '合同号', key: 'contractCode', width: 120 },
{ title: '备注', key: 'remark' }
]
}
},
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('search')
} else {
return this.$tableHeight('noSearch')
}
}
},
mounted() {
this._page()
},
methods: {
_detailModal(data) {
console.log(data)
this.$refs.meterSampleEdit._open(data)
// 查看
// this.$store.dispatch('FoodContract/getById', data.id).then(() => {
// if (data.type === 0) {
// // 企业委托 ’0‘
// this.currentComponent = 'FoodContractCompanyDetail'
// } else {
// // 政府委托 ’1‘
// this.currentComponent = 'FoodContractGovernDetail'
// }
// this.$nextTick(() => {
// this.$refs.refModal._open(this.$store.state.FoodContract.model)
// })
// })
},
_modalResult() {
if (this.currentComponent === 'FoodSubcontracterEdit') {
this._page()
}
},
_btnClick(msg, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '添加':
this._editModal(false)
break
case '通过':
this._passReview()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_iconClick(res, data) {
this.$nextTick(function() {
switch (res) {
case '样品管理':
this._manageSample(data)
break
case '详情':
this._detailModal(data)
break
case '编辑':
this._editModal(true, data.id)
break
case '资质项目':
this._itemModal(data.id)
break
case '附件':
this._upload(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
case '操作日志':
this._record(data.id)
break
}
})
},
_manageSample(data) {
// 管理样品
this.$refs.meterSampleManageModal._open(data.id)
},
_componentResult(data, msg) {
switch (this.currentComponent) {
case 'FoodContractCompanyEdit':
this._page()
break
case 'FoodContractGovernEdit':
this._page()
break
case 'FoodContractCompanyEditByDLTB':
this._page()
break
case 'FoodContractCompanyEditByHES':
this._page()
break
}
},
_record(id) {
this.$refs.operation._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
case 'changeSize':
this._page()
break
case 'selectIds':
this.selectIds = data
break
}
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterContract.pageQuoteFirstReview(this.formObj)
if (result) {
console.log('结果')
console.log(result)
this.$refs.pageTable._hideLoading()
this.getPage = result
}
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
// 删除
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
// 编辑&添加
_editModal(edit, id) {
if (edit) {
// 编辑
// this.$refs.editSubcontractorModal._open(id)
this._getById(id)
} else {
// 添加
this.$refs.editSubcontractorModal._open()
}
},
_passReview() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择要通过评审的委托单!')
return false
}
this.$Modal.confirm({
title: '提示',
content: '确定通过该委托单?',
onOk: () => {
this._passEntrustReview(this.selectIds)
}
})
},
_passEntrustReview: async function(ids) {
const result = await meterEntrust.passReview(ids)
if (result) {
this.$Message.success('提交成功!')
await this._page()
}
},
// 追加项目
_itemModal(data) {
this.$refs.refModal._open(data)
},
_upload(id) {
// 上传文件
this.$refs.refModal._open(id, 'subcontractorId')
},
_getById: async function(id) {
const result = await meterSubcontractor.getById(id)
if (result) {
this.$refs.editSubcontractorModal._open(result)
}
},
_delete: async function(ids) {
const result = await meterSubcontractor.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
}
}
}
</script>
<template>
<div>
<!--内容-->
<div class="layout-content-padding">
<div class="layout-content-main">
<Row>
<!--查询-->
<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.name" @on-enter="_formSearch" name="name" placeholder="请输入实验室名称" clearable/>
</Form-item>
<Form-item class="search-item" label="资质:">
<Input v-model="formObj.aptitude" @on-enter="_formSearch" name="aptitude" placeholder="请输入资质" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick"
class="contHide"></btn-list>
</Col>
<!--表格-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange" hide-checkbox>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
import { meterEntrust, meterSubcontractor } from '../../../api'
export default {
components: {},
data() {
return {
currentComponent: '',
formId: 'meterSubcontractorFormId',
searchOpen: false,
btn: [
{
type: 'success',
id: 'meter-subcontractor-add-btn',
name: '添加'
}
],
iconMsg: [
{
type: 'ios-clock',
id: '',
name: '编辑'
},
{
type: 'ios-clock',
id: '',
name: '资质项目'
},
{ type: 'ios-clock', id: '', name: '附件' },
{ type: 'ios-clock', id: '', name: '删除' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
],
formObj: {
name: undefined,
aptitude: undefined
},
selectIds: [],
getPage: {},
pageColumns: [
{ title: '委托单位', key: 'client', width: 200 },
{ title: '联系人', key: 'person', width: 120 },
{ title: '联系电话', key: 'tel', width: 120 },
{ title: '传真', key: 'fax', width: 120 },
{ title: '详细地址', key: 'address', width: 250 },
{ title: '邮编', key: 'postcode' },
{ title: 'E-mail', key: 'email', width: 120 },
{ title: '委托日期', key: 'edate', width: 120 },
{ title: '费用合计', key: 'fee', width: 120 },
{ title: '合同号', key: 'contractCode', width: 120 },
{ title: '备注', key: 'remark' }
]
}
},
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('search')
} else {
return this.$tableHeight('noSearch')
}
}
},
mounted() {
this._page()
},
methods: {
_modalResult() {
if (this.currentComponent === 'FoodSubcontracterEdit') {
this._page()
}
},
_btnClick(msg, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '添加':
this._editModal(false)
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_iconClick(res, data, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (res) {
case '编辑':
this._editModal(true, data.id)
break
case '资质项目':
this._itemModal(data.id)
break
case '附件':
this._upload(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
case '操作日志':
this._record(data.id)
break
}
})
},
_record(id) {
this.$refs.refModal._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.getPage = this.$store.state.FoodSubcontracter.page
break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
case 'changeSize':
this._page()
break
}
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterEntrust.pageSendEntrust(this.formObj)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
}
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
// 删除
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
// 编辑&添加
_editModal(edit, id) {
if (edit) {
// 编辑
// this.$refs.editSubcontractorModal._open(id)
this._getById(id)
} else {
// 添加
this.$refs.editSubcontractorModal._open()
}
},
// 追加项目
_itemModal(data) {
this.$refs.refModal._open(data)
},
_upload(id) {
// 上传文件
this.$refs.refModal._open(id, 'subcontractorId')
},
_getById: async function(id) {
const result = await meterSubcontractor.getById(id)
if (result) {
this.$refs.editSubcontractorModal._open(result)
}
},
_delete: async function(ids) {
const result = await meterSubcontractor.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
}
}
}
</script>
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName">
<el-tab-pane label="待完成" name="wait">
<MeterReviewEntrust ref="waitTabs"></MeterReviewEntrust>
</el-tab-pane>
<el-tab-pane label="历史评审" name="his">
<MeterReviewEntrustHis ref="hisTabs"></MeterReviewEntrustHis>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import MeterReviewEntrust from './MeterContractCheckSecond'
import MeterReviewEntrustHis from './MeterContractCheckSecondHis'
export default {
name: 'MeterSendEntrustIndex',
components: {
MeterReviewEntrust,
MeterReviewEntrustHis
},
data() {
return {
activeName: 'wait'
}
}
}
</script>
<style scoped>
</style>
<template>
<div>
<!--内容-->
<div class="layout-content-padding">
<div class="layout-content-main">
<Row>
<!--查询-->
<Col span="24" style="margin-top: 10px">
<Form v-show="searchOpen" id="formId" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="实验室名称:">
<Input v-model="formObj.name" name="name" placeholder="请输入实验室名称" clearable @on-enter="_formSearch"/>
</Form-item>
<Form-item class="search-item" label="资质:">
<Input v-model="formObj.aptitude" name="aptitude" placeholder="请输入资质" clearable @on-enter="_formSearch"/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide"
@on-result-change="_btnClick"></btn-list>
</Col>
<!--表格-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<MeterSampleManage ref="meterSampleManageModal" @on-result-change="_componentResult"></MeterSampleManage>
<MeterEntrustDetail ref="meterSampleEdit" @on-result-change="_componentResult"></MeterEntrustDetail>
<Operation ref="operation"></Operation>
</div>
</template>
<script>
import { meterContract, meterEntrust, meterSubcontractor } from '../../../api'
import Operation from '../../../components/operation/Operation'
import MeterSampleManage from './MeterSampleManage'
import MeterEntrustDetail from './MeterContractCheckDetail'
export default {
components: { MeterSampleManage, MeterEntrustDetail, Operation },
data() {
return {
currentComponent: 'FoodSampleGovern',
formId: 'meterReviewEntrustFormId',
searchOpen: false,
btn: [
{
// meter-review-entrust-pass-btn
type: 'success',
id: '',
name: '通过'
},
// meter-review-entrust-back-btn
{
type: 'success',
id: '',
name: '驳回'
}
],
iconMsg: [
{
type: 'md-paper',
id: '',
name: '详情'
},
{
type: 'ios-beaker',
id: '',
name: '样品管理'
},
{ type: 'md-cloud', id: '', name: '附件' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
],
formObj: {
name: undefined,
aptitude: undefined
},
selectIds: [],
getPage: {},
pageColumns: [
{ title: '委托单位', key: 'client', width: 200 },
{ title: '联系人', key: 'person', width: 120 },
{ title: '联系电话', key: 'tel', width: 120 },
{ title: '传真', key: 'fax', width: 120 },
{ title: '详细地址', key: 'address', width: 250 },
{ title: '邮编', key: 'postcode' },
{ title: 'E-mail', key: 'email', width: 120 },
{ title: '委托日期', key: 'edate', width: 120 },
{ title: '费用合计', key: 'fee', width: 120 },
{ title: '合同号', key: 'contractCode', width: 120 },
{ title: '备注', key: 'remark' }
]
}
},
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('search')
} else {
return this.$tableHeight('noSearch')
}
}
},
mounted() {
this._page()
},
methods: {
_detailModal(data) {
console.log(data)
this.$refs.meterSampleEdit._open(data)
// 查看
// this.$store.dispatch('FoodContract/getById', data.id).then(() => {
// if (data.type === 0) {
// // 企业委托 ’0‘
// this.currentComponent = 'FoodContractCompanyDetail'
// } else {
// // 政府委托 ’1‘
// this.currentComponent = 'FoodContractGovernDetail'
// }
// this.$nextTick(() => {
// this.$refs.refModal._open(this.$store.state.FoodContract.model)
// })
// })
},
_modalResult() {
if (this.currentComponent === 'FoodSubcontracterEdit') {
this._page()
}
},
_btnClick(msg, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '添加':
this._editModal(false)
break
case '通过':
this._passReview()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_iconClick(res, data) {
this.$nextTick(function() {
switch (res) {
case '样品管理':
this._manageSample(data)
break
case '详情':
this._detailModal(data)
break
case '编辑':
this._editModal(true, data.id)
break
case '资质项目':
this._itemModal(data.id)
break
case '附件':
this._upload(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
case '操作日志':
this._record(data.id)
break
}
})
},
_manageSample(data) {
// 管理样品
this.$refs.meterSampleManageModal._open(data.id)
},
_componentResult(data, msg) {
switch (this.currentComponent) {
case 'FoodContractCompanyEdit':
this._page()
break
case 'FoodContractGovernEdit':
this._page()
break
case 'FoodContractCompanyEditByDLTB':
this._page()
break
case 'FoodContractCompanyEditByHES':
this._page()
break
}
},
_record(id) {
this.$refs.operation._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
case 'changeSize':
this._page()
break
case 'selectIds':
this.selectIds = data
break
}
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterContract.pageQuoteFirstReview(this.formObj)
if (result) {
console.log('结果')
console.log(result)
this.$refs.pageTable._hideLoading()
this.getPage = result
}
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
// 删除
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
// 编辑&添加
_editModal(edit, id) {
if (edit) {
// 编辑
// this.$refs.editSubcontractorModal._open(id)
this._getById(id)
} else {
// 添加
this.$refs.editSubcontractorModal._open()
}
},
_passReview() {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择要通过评审的委托单!')
return false
}
this.$Modal.confirm({
title: '提示',
content: '确定通过该委托单?',
onOk: () => {
this._passEntrustReview(this.selectIds)
}
})
},
_passEntrustReview: async function(ids) {
const result = await meterEntrust.passReview(ids)
if (result) {
this.$Message.success('提交成功!')
await this._page()
}
},
// 追加项目
_itemModal(data) {
this.$refs.refModal._open(data)
},
_upload(id) {
// 上传文件
this.$refs.refModal._open(id, 'subcontractorId')
},
_getById: async function(id) {
const result = await meterSubcontractor.getById(id)
if (result) {
this.$refs.editSubcontractorModal._open(result)
}
},
_delete: async function(ids) {
const result = await meterSubcontractor.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
}
}
}
</script>
<template>
<div>
<Modal v-model="showDetailModal" :width="1100" title="委托详情" class="modal-footer-none">
<div :style="{height}" style="overflow-y: auto">
<table class="tableClass">
<tbody>
<tr>
<th colspan="6" class="tableClass_back">委托单位信息</th>
</tr>
<tr>
<th>委托单位</th>
<td>{{obj.client}}</td>
<th>联系人</th>
<td>{{obj.person}}</td>
</tr>
<tr>
<th>联系电话</th>
<td>{{obj.tel}}</td>
<th>传真</th>
<td>{{obj.fax}}</td>
</tr>
<tr>
<th>详细地址</th>
<td>{{obj.street}}</td>
<th>E-mail</th>
<td>{{obj.email}}</td>
</tr>
<tr>
<th>是否第一次送检</th>
<td>{{obj.firsted===1? '是':'否'}}</td>
<th>邮编</th>
<td>{{obj.postcode}}</td>
</tr>
<tr>
<th>地址</th>
<td>{{obj.province}}&nbsp;{{obj.city}}&nbsp;{{obj.county}}</td>
<th>委托日期</th>
<td>{{obj.edate}}</td>
</tr>
<tr>
<th>合同号</th>
<td>{{obj.contractCode}}</td>
<th>备注</th>
<td>{{obj.remark}}</td>
</tr>
</tbody>
</table>
</div>
</Modal>
</div>
</template>
<script>
/**
* 政府委托信息表详情
*/
export default {
data() {
return {
obj: {
// detail: {},
// customer: {},
// finance: {},
// tested: {}
firsted: 0,
client: '',
linkman: '',
tel: '',
email: '',
address: '',
remark: '',
province: '',
city: '',
county: '',
street: '',
aptitude: [],
assessFormSn: '',
subArea: '',
personCondition: '',
edate: '',
contractCode: ''
},
showDetailModal: false,
// sampleType:['退样','留样','作废'],
dispose: '',
height: '',
showMoney: false
}
},
methods: {
_open(obj, flag) {
this.showDetailModal = true
this.obj = obj
console.log('传过来的数据')
console.log(this.obj)
// if(obj.dispose !== undefined || ''){
// this.dispose = this.sampleType[obj.dispose];
// }else{
// this.dispose = '';
// }
if (flag === 'showMoney') {
this.showMoney = true
} else {
this.showMoney = false
}
this.height = '550px'
}
}
}
</script>
<template>
<div>
<!--内容-->
<div class="layout-content-padding">
<div class="layout-content-main">
<Row>
<!--查询-->
<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.name" @on-enter="_formSearch" name="name" placeholder="请输入实验室名称" clearable/>
</Form-item>
<Form-item class="search-item" label="资质:">
<Input v-model="formObj.aptitude" @on-enter="_formSearch" name="aptitude" placeholder="请输入资质" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick"
class="contHide"></btn-list>
</Col>
<!--表格-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange" hide-checkbox>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
import { meterEntrust, meterSubcontractor } from '../../../api'
export default {
components: {},
data() {
return {
currentComponent: '',
formId: 'meterSubcontractorFormId',
searchOpen: false,
btn: [
{
type: 'success',
id: 'meter-subcontractor-add-btn',
name: '添加'
}
],
iconMsg: [
{
type: 'ios-clock',
id: '',
name: '编辑'
},
{
type: 'ios-clock',
id: '',
name: '资质项目'
},
{ type: 'ios-clock', id: '', name: '附件' },
{ type: 'ios-clock', id: '', name: '删除' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
],
formObj: {
name: undefined,
aptitude: undefined
},
selectIds: [],
getPage: {},
pageColumns: [
{ title: '委托单位', key: 'client', width: 200 },
{ title: '联系人', key: 'person', width: 120 },
{ title: '联系电话', key: 'tel', width: 120 },
{ title: '传真', key: 'fax', width: 120 },
{ title: '详细地址', key: 'address', width: 250 },
{ title: '邮编', key: 'postcode' },
{ title: 'E-mail', key: 'email', width: 120 },
{ title: '委托日期', key: 'edate', width: 120 },
{ title: '费用合计', key: 'fee', width: 120 },
{ title: '合同号', key: 'contractCode', width: 120 },
{ title: '备注', key: 'remark' }
]
}
},
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('search')
} else {
return this.$tableHeight('noSearch')
}
}
},
mounted() {
this._page()
},
methods: {
_modalResult() {
if (this.currentComponent === 'FoodSubcontracterEdit') {
this._page()
}
},
_btnClick(msg, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '添加':
this._editModal(false)
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_iconClick(res, data, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (res) {
case '编辑':
this._editModal(true, data.id)
break
case '资质项目':
this._itemModal(data.id)
break
case '附件':
this._upload(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
case '操作日志':
this._record(data.id)
break
}
})
},
_record(id) {
this.$refs.refModal._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.getPage = this.$store.state.FoodSubcontracter.page
break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
case 'changeSize':
this._page()
break
}
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterEntrust.pageSendEntrust(this.formObj)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
}
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
// 删除
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
// 编辑&添加
_editModal(edit, id) {
if (edit) {
// 编辑
// this.$refs.editSubcontractorModal._open(id)
this._getById(id)
} else {
// 添加
this.$refs.editSubcontractorModal._open()
}
},
// 追加项目
_itemModal(data) {
this.$refs.refModal._open(data)
},
_upload(id) {
// 上传文件
this.$refs.refModal._open(id, 'subcontractorId')
},
_getById: async function(id) {
const result = await meterSubcontractor.getById(id)
if (result) {
this.$refs.editSubcontractorModal._open(result)
}
},
_delete: async function(ids) {
const result = await meterSubcontractor.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
}
}
}
</script>
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName">
<el-tab-pane label="待完成" name="wait">
<MeterReviewEntrust ref="waitTabs"></MeterReviewEntrust>
</el-tab-pane>
<el-tab-pane label="历史评审" name="his">
<MeterReviewEntrustHis ref="hisTabs"></MeterReviewEntrustHis>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import MeterReviewEntrust from './MeterContractCheck'
import MeterReviewEntrustHis from './MeterContractCheckHis'
export default {
name: 'MeterSendEntrustIndex',
components: {
MeterReviewEntrust,
MeterReviewEntrustHis
},
data() {
return {
activeName: 'wait'
}
}
}
</script>
<style scoped>
</style>
...@@ -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">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</div> </div>
</template> </template>
<script> <script>
import { meterEntrust, meterSubcontractor } from '../../../api' import { meterContract, meterSubcontractor } from '../../../api'
import MeterSubcontractorEdit from './MeterQuoteRegisterEdit' import MeterSubcontractorEdit from './MeterQuoteRegisterEdit'
import MeterSendOperation from './MeterQuoteRegisterOperation' import MeterSendOperation from './MeterQuoteRegisterOperation'
export default { export default {
...@@ -105,11 +105,10 @@ export default { ...@@ -105,11 +105,10 @@ export default {
{ title: '联系电话', key: 'tel', width: 120 }, { title: '联系电话', key: 'tel', width: 120 },
{ 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: 'odate', width: 120 },
{ title: 'E-mail', key: 'email', width: 120 }, { title: '折扣', key: 'discount', width: 120 },
{ title: '委托日期', key: 'edate', width: 120 }, { title: '总价', key: 'totalPrice', width: 120 },
{ title: '费用合计', key: 'fee', width: 120 }, { title: '折扣价', key: 'discountPrice', width: 120 },
{ title: '合同号', key: 'contractCode', width: 120 },
{ title: '备注', key: 'remark' } { title: '备注', key: 'remark' }
] ]
} }
...@@ -171,7 +170,7 @@ export default { ...@@ -171,7 +170,7 @@ export default {
}) })
}, },
_submitToReview() { _submitToReview() {
this._submitByContractIds('委托评审') this._submitByContractIds('报价单初审')
}, },
_submitByContractIds(cont) { _submitByContractIds(cont) {
const ids = this.selectIds const ids = this.selectIds
...@@ -182,9 +181,7 @@ export default { ...@@ -182,9 +181,7 @@ export default {
title: '提示', title: '提示',
content: '确定要把这 ' + ids.length + ' 条记录提交到' + cont + '?', content: '确定要把这 ' + ids.length + ' 条记录提交到' + cont + '?',
onOk: () => { onOk: () => {
// this.$store.dispatch(url, { ids: ids.join(',') }).then(() => { const result = meterContract.submitQuoteFirstReview(ids)
// this._resultChange('提交成功')
const result = meterEntrust.submit(ids)
if (result) { if (result) {
this._resultChange('提交成功') this._resultChange('提交成功')
console.log(result) console.log(result)
...@@ -203,9 +200,6 @@ export default { ...@@ -203,9 +200,6 @@ export default {
}, },
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
case 'page':
this.getPage = this.$store.state.FoodSubcontracter.page
break
case 'selectIds': case 'selectIds':
this.selectIds = data this.selectIds = data
break break
...@@ -220,7 +214,7 @@ export default { ...@@ -220,7 +214,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())
console.log('this.formObj', this.formObj) console.log('this.formObj', this.formObj)
const result = await meterEntrust.pageSendEntrust(this.formObj) const result = await meterContract.page(this.formObj)
if (result) { if (result) {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.getPage = result this.getPage = result
...@@ -260,7 +254,7 @@ export default { ...@@ -260,7 +254,7 @@ export default {
this.$refs.FileManage._open(id, 'subcontractorId') this.$refs.FileManage._open(id, 'subcontractorId')
}, },
_getById: async function(id) { _getById: async function(id) {
const result = await meterEntrust.getVOById(id) const result = await meterContract.getVOById(id)
if (result) { if (result) {
this.$refs.editSubcontractorModal._openEdit(result) this.$refs.editSubcontractorModal._openEdit(result)
} }
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
placeholder="请输入或选择委托单位" @on-result-change="_cusNameChange" placeholder="请输入或选择委托单位" @on-result-change="_cusNameChange"
></AutoComplete> ></AutoComplete>
</Form-item> </Form-item>
<Form-item label="联系人" prop="operation.person" class="width-48"> <Form-item label="联系人" prop="person" class="width-48">
<Input v-model="formObj.operation.person" name="operation.person" placeholder="请输入委托单位"/> <Input v-model="formObj.person" name="person" placeholder="请输入联系人"/>
</Form-item> </Form-item>
<Form-item label="联系电话" prop="operation.tel" class="width-48"> <Form-item label="联系电话" prop="tel" class="width-48">
<Input v-model="formObj.operation.tel" name="operation.tel" placeholder="请输入委托单位"/> <Input v-model="formObj.tel" name="tel" placeholder="请输入联系电话"/>
</Form-item> </Form-item>
<Form-item label="传真" prop="operation.fax" class="width-48"> <Form-item label="传真" prop="fax" class="width-48">
<Input v-model="formObj.operation.fax" name="operation.fax" placeholder="请输入委托单位"/> <Input v-model="formObj.fax" name="fax" placeholder="请输入传真"/>
</Form-item> </Form-item>
<Form-item label="省、市、区" prop="testedCityData" class="width-48"> <Form-item label="省、市、区" prop="testedCityData" class="width-48">
<CityNameCascader :value="testedCityData" name="tested" @on-result-change="_cascaderResult"> <CityNameCascader :value="testedCityData" name="tested" @on-result-change="_cascaderResult">
...@@ -25,27 +25,25 @@ ...@@ -25,27 +25,25 @@
</Form-item> </Form-item>
<Form-item label="街道" prop="street" class="width-48"> <Form-item label="街道" prop="street" class="width-48">
<Input v-model="formObj.street" name="street" placeholder="请输入委托单位"/> <Input v-model="formObj.street" name="street" placeholder="请输入街道"/>
</Form-item> </Form-item>
<Form-item label="邮编" prop="operation.postcode" class="width-48"> <Form-item label="要求完成时间:" prop="odate" class="width-48">
<Input v-model="formObj.operation.postcode" name="operation.postcode" placeholder="请输入委托单位"/> <Date-picker type="date" split-panels style="width:100%;" placeholder="请选择要求完成时间"
@on-change="_ctimeChange"></Date-picker>
</Form-item> </Form-item>
<Form-item label="折扣:" prop="discount" class="width-48">
<Form-item label="E-mail" prop="operation.email" class="width-48"> <Input v-model="formObj.discount" name="discount" placeholder="折扣"/>
<Input v-model="formObj.operation.email" name="operation.email" placeholder="请输入实验室名称"/>
</Form-item> </Form-item>
<Form-item label="委托日期:" prop="edate" class="width-48">
<Date-picker type="date" split-panels style="width:100%;" placeholder="请选择委托日期" <Form-item label="检定/校准执行规程/规范:" prop="requirements" style="width: 99.8%">
@on-change="_ctimeChange"></Date-picker> <Input v-model="formObj.requirements" :rows="3" name="requirements" type="textarea"
placeholder="请输入检定/校准执行规程/规范"/>
</Form-item> </Form-item>
<Form-item label="备注:" prop="remark" style="width: 99.8%"> <Form-item label="备注:" prop="remark" style="width: 99.8%">
<Input v-model="formObj.remark" :rows="3" name="remark" type="textarea" <Input v-model="formObj.remark" :rows="3" name="remark" type="textarea"
placeholder="请输入备注"/> placeholder="请输入备注"/>
</Form-item> </Form-item>
</Form> </Form>
<!-- <Col span="24">-->
<!-- <Button @click="_add()" type="success">添加</Button>-->
<!-- </Col>-->
<!--操作--> <!--操作-->
<Col span="24"> <Col span="24">
...@@ -99,6 +97,12 @@ ...@@ -99,6 +97,12 @@
@keydown.native="channelInputLimit" @keydown.native="channelInputLimit"
/> />
</div> </div>
<div v-else-if="item.date">
{{ scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):'' }}
</div>
<div v-else @click.stop="_handleRow(scope)">
<span> {{ scope.row[item.key] }}</span>
</div>
</template> </template>
</vxe-table-column> </vxe-table-column>
</PTVXETable> </PTVXETable>
...@@ -116,7 +120,7 @@ ...@@ -116,7 +120,7 @@
/** /**
* 添加编辑分包商 * 添加编辑分包商
*/ */
import { lmsBaseDict, meterEntrust } from '../../../api' import { lmsBaseDict, meterEntrust, meterContract } from '../../../api'
import CityNameCascader from '../../../components/base/CityNameCascader' import CityNameCascader from '../../../components/base/CityNameCascader'
import AutoComplete from '../../../components/base/AutoCompletes' import AutoComplete from '../../../components/base/AutoCompletes'
import importModal from '../../../components/import/DownloadTemplateImport' import importModal from '../../../components/import/DownloadTemplateImport'
...@@ -157,14 +161,14 @@ export default { ...@@ -157,14 +161,14 @@ export default {
{ title: '名称', key: 'name', width: 160 }, { title: '名称', key: 'name', width: 160 },
{ title: '型号', key: 'spec' }, { title: '型号', key: 'spec' },
{ title: '数量', key: 'quantity' }, { title: '数量', key: 'quantity' },
{ title: '技术参数', key: 'quantity' }, { title: '技术参数', key: 'technicalParameter' },
{ title: '生产厂家', key: 'quantity' }, { title: '生产厂家', key: 'manufacturer' },
{ title: '出厂编号', key: 'factoryNumber' }, { title: '出厂编号', key: 'factoryNumber' },
{ title: '上次检定校准日期', key: 'factoryNumber' }, { title: '上次检定校准日期', key: 'lastTime', date: true },
{ title: '收费单位', key: 'factoryNumber' }, { title: '收费单位', key: 'unit' },
{ title: '单价/元', key: 'factoryNumber' }, { title: '单价/元', key: 'price' },
{ title: '总价/元', key: 'factoryNumber' }, { title: '总价/元', key: 'totalPrice' },
{ title: '备注', key: 'type' } { title: '备注', key: 'remark' }
// {title: '限制范围或说明', key: 'limitDescription'}, // {title: '限制范围或说明', key: 'limitDescription'},
], ],
...@@ -195,7 +199,6 @@ export default { ...@@ -195,7 +199,6 @@ export default {
modalTitle: '', modalTitle: '',
subcontractorId: '', subcontractorId: '',
formObj: { formObj: {
firsted: 1,
client: '', client: '',
linkman: '', linkman: '',
tel: '', tel: '',
...@@ -205,26 +208,14 @@ export default { ...@@ -205,26 +208,14 @@ export default {
province: '', province: '',
city: '', city: '',
county: '', county: '',
requirements: '',
discount: '',
street: '', street: '',
aptitude: [],
assessFormSn: '',
subArea: '',
personCondition: '',
edate: '', edate: '',
contractCode: '', odate: '',
operation: { person: '',
person: '', fax: '',
tel: '',
fax: '',
postcode: '',
email: '',
fee: ''
},
testedTemp: { testedTemp: {
testedName: '',
testedContactor: '',
testedContactorTel: '',
testedTel: '',
testedProvince: '', testedProvince: '',
testedCity: '', testedCity: '',
testedCounty: '', testedCounty: '',
...@@ -241,12 +232,10 @@ export default { ...@@ -241,12 +232,10 @@ export default {
trigger: 'blur' trigger: 'blur'
} }
], ],
'operation.person': [ person: [
{ required: true, message: '联系人不能为空', trigger: 'blur' } { required: true, message: '联系人不能为空', trigger: 'blur' }
], ],
'operation.tel': [ tel: [{ required: true, message: '联系电话不能为空', trigger: 'blur' }],
{ required: true, message: '联系电话不能为空', trigger: 'blur' }
],
testedCityData: [ testedCityData: [
{ {
required: true, required: true,
...@@ -305,7 +294,7 @@ export default { ...@@ -305,7 +294,7 @@ export default {
}, },
_ctimeChange(data) { _ctimeChange(data) {
console.log('时间', data) console.log('时间', data)
this.formObj.edate = data this.formObj.odate = data
// this.formObj.ctimeBegin = data[0] // this.formObj.ctimeBegin = data[0]
// this.formObj.ctimeEnd = data[1] // this.formObj.ctimeEnd = data[1]
}, },
...@@ -511,6 +500,7 @@ export default { ...@@ -511,6 +500,7 @@ export default {
// 添加 // 添加
const saveData = this.formObj const saveData = this.formObj
saveData.sampleList = this.getPage.records saveData.sampleList = this.getPage.records
console.log('saveData-------', saveData)
this._save(saveData) this._save(saveData)
} else { } else {
// 编辑 // 编辑
...@@ -554,16 +544,14 @@ export default { ...@@ -554,16 +544,14 @@ export default {
this.$refs.formObj.resetFields() this.$refs.formObj.resetFields()
this._emptyProvince() this._emptyProvince()
this._hideLoading() this._hideLoading()
this._getAptitudeList()
if (this.$string(formObj).isEmpty()) { if (this.$string(formObj).isEmpty()) {
this.getPage.records = [] this.getPage.records = []
this.id = '' this.id = ''
this.formObj.aptitude = [] this.modalTitle = '报价单新增'
this.modalTitle = '分包商管理新增'
} else { } else {
this.id = formObj.id this.id = formObj.id
this.formObj = formObj this.formObj = formObj
this.modalTitle = '分包商管理编辑' this.modalTitle = '报价单编辑'
this._showTime(formObj) this._showTime(formObj)
} }
}, },
...@@ -574,7 +562,7 @@ export default { ...@@ -574,7 +562,7 @@ export default {
this.$refs.formObj.resetFields() this.$refs.formObj.resetFields()
this._hideLoading() this._hideLoading()
this.id = '' this.id = ''
this.modalTitle = '送检委托单编辑' this.modalTitle = '报价单编辑'
this.id = formObj.id this.id = formObj.id
this.formObj = formObj this.formObj = formObj
this._showAddress(formObj) this._showAddress(formObj)
...@@ -610,9 +598,9 @@ export default { ...@@ -610,9 +598,9 @@ export default {
console.log(result) console.log(result)
if (result) { if (result) {
this.formObj.client = data this.formObj.client = data
this.formObj.operation.person = result[0].contact this.formObj.person = result[0].contact
this.formObj.operation.tel = result[0].mobile this.formObj.tel = result[0].mobile
this.formObj.operation.fax = result[0].fax this.formObj.fax = result[0].fax
this.testedCityData = [ this.testedCityData = [
result[0].province, result[0].province,
result[0].city, result[0].city,
...@@ -630,7 +618,7 @@ export default { ...@@ -630,7 +618,7 @@ export default {
// 回显资质类型 // 回显资质类型
}, },
_save: async function(data) { _save: async function(data) {
const result = await meterEntrust.save(data) const result = await meterContract.addQuote(data)
console.log(result) console.log(result)
if (result) { if (result) {
this._resultChange('添加成功!') this._resultChange('添加成功!')
......
...@@ -25,6 +25,9 @@ import MeterTaskDistributeIndex from '../pages/meter-send/task-distribute/MeterT ...@@ -25,6 +25,9 @@ import MeterTaskDistributeIndex from '../pages/meter-send/task-distribute/MeterT
import MeterSampleFlowIndex from '../pages/meter-send/sample-flow/MeterSampleFlowIndex' import MeterSampleFlowIndex from '../pages/meter-send/sample-flow/MeterSampleFlowIndex'
import MeterSampleInputIndex from '../pages/meter-send/sample-input/MeterSampleInputIndex' import MeterSampleInputIndex from '../pages/meter-send/sample-input/MeterSampleInputIndex'
import MeterQuoteRegisterIndex from '../pages/meter-business/quote-register/MeterQuoteRegisterIndex' import MeterQuoteRegisterIndex from '../pages/meter-business/quote-register/MeterQuoteRegisterIndex'
import MeterContractCheckIndex from '../pages/meter-business/quote-check/MeterContractCheckIndex'
import MeterContractCheckSecondIndex from '../pages/meter-business/quote-check-second/MeterContractCheckSecondIndex'
import MeterContractApprovalIndex from '../pages/meter-business/quote-approval/MeterContractApprovalIndex'
import Blank from '~/pages/blank' import Blank from '~/pages/blank'
export default [ export default [
{ {
...@@ -155,6 +158,21 @@ export default [ ...@@ -155,6 +158,21 @@ export default [
path: 'quote_register', path: 'quote_register',
component: MeterQuoteRegisterIndex, component: MeterQuoteRegisterIndex,
meta: { title: '报价登记' } meta: { title: '报价登记' }
},
{
path: 'quote_check',
component: MeterContractCheckIndex,
meta: { title: '报价单初审' }
},
{
path: 'quote_check_second',
component: MeterContractCheckSecondIndex,
meta: { title: '报价单复审' }
},
{
path: 'quote_approval',
component: MeterContractApprovalIndex,
meta: { title: '报价单批准' }
} }
] ]
} }
......
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