Commit ca54cfc8 by lichengming
parents ac265aaa 016dbe9c
......@@ -107,6 +107,10 @@ export default {
https
.post('meter/v1/entrust/edit_entrust', JSON.stringify(data))
.then(res => res),
editOnlineDTO: data =>
https
.post('meter/v1/entrust/edit_online_entrust', JSON.stringify(data))
.then(res => res),
// 提交
submit: data =>
https
......
......@@ -5,6 +5,10 @@ import http from '../http'
export default {
// page
page: data => http.post('meter/v1/sample_quote/page', data).then(res => res),
pageInAptitude: data =>
http.post('meter/v1/sample_quote/page_in_aptitude', data).then(res => res),
pageSubSample: data =>
http.post('meter/v1/sample_quote/page_out_sample', data).then(res => res),
getById: data => http.get('meter/v1/sample_quote/' + data).then(res => res),
deleteById: data =>
http.delete('meter/v1/sample_quote/?ids=' + data).then(res => res),
......
......@@ -58,7 +58,7 @@
import { meterContract } from '../../../api'
import Reason from '../../../components/base/Reason'
import MeterSendOperation from '../MeterContractReviewOperation'
import MeterSampleManage from '../MeterSampleQuoteManage'
import MeterSampleManage from './MeterReviewQuoteManage'
import MeterSubcontractorEdit from './MeterContractReviewEdit'
import MeterSubcontractorAddEdit from './MeterContractReviewAddEdit'
export default {
......
......@@ -95,8 +95,8 @@
</Option>
</Select>
</div>
<div v-if="item.key==='sampleType'" @click.stop="_handleRow(scope)">
<Select v-model="scope.row.sampleType">
<div v-if="item.key==='testType'" @click.stop="_handleRow(scope)">
<Select v-model="scope.row.testType">
<Option v-for="(item,index) in typeOptions" :key="item.name" :value="index">
{{ item.name }}
</Option>
......@@ -189,7 +189,7 @@ export default {
pageColumns: [
{ title: '样品名称', key: 'name', width: 160 },
{ title: '型号规格', key: 'spec' },
{ title: '送检/出检', key: 'sampleType', width: 130 },
{ title: '送检/出检', key: 'testType', width: 130 },
{ title: '出厂编号', key: 'factoryNumber' },
{ title: '检测类型', key: 'type' },
{ title: '数量', key: 'quantity' },
......@@ -659,7 +659,7 @@ export default {
}
},
_edit: async function(data) {
const result = await meterEntrust.editDTO(data)
const result = await meterEntrust.editOnlineDTO(data)
if (result) {
this._resultChange('编辑成功!')
}
......
......@@ -58,11 +58,11 @@ export default {
formId: 'meterSubcontractorFormId',
searchOpen: false,
btn: [
{
type: 'success',
id: 'cannot-sub-meter-cannot-sub-add',
name: '添加'
},
// {
// type: 'success',
// id: 'cannot-sub-meter-cannot-sub-add',
// name: '添加'
// },
{
type: 'success',
id: 'cannot-sub-meter-cannot-sub-submit',
......
......@@ -73,56 +73,57 @@
>
<template slot-scope="scope">
<div v-if="item.key==='name'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.name" @click.native="_selectjudgeBasis(scope.$rowIndex)" blur placeholder="请输入或选择样品名称"
></el-input>
</div>
<div v-if="item.key==='spec'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.spec" blur placeholder="请输入或选择型号规格"
></el-input>
</div>
<div v-if="item.key==='factoryNumber'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.factoryNumber" blur placeholder="请输入或选择出厂编号"
></el-input>
</div>
<div v-if="item.key==='technicalParameter'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.technicalParameter" blur placeholder="请输入技术参数"
></el-input>
</div>
<div v-if="item.key==='manufacturer'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.manufacturer" blur placeholder="请输入生产厂家"
></el-input>
</div>
<div v-if="item.key==='type'" @click.stop="_handleRow(scope)">
<Select v-model="scope.row.type">
<Option v-for="(item,index) in options" :key="item.name" :value="index">
{{ item.name }}
</Option>
</Select>
</div>
<div v-if="item.key==='quantity'" @click.stop="_handleRow(scope)" >
<el-input
v-model="scope.row.quantity"
@blur="_quantityChange(scope.$rowIndex)"
@keydown.native="channelInputLimit"
type="number"
placeholder="请输入或选择数量"
/>
</div>
<div v-if="item.key==='unit'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.unit" blur placeholder="请输入收费单位"
></el-input>
</div>
<div v-if="item.key==='remark'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.remark" blur placeholder="请输入备注"
></el-input>
{{ scope.row[item.key] }}
<!-- <el-input v-model="scope.row.name" @click.native="_selectjudgeBasis(scope.$rowIndex)" blur placeholder="请输入或选择样品名称"-->
<!-- ></el-input>-->
</div>
<!-- <div v-if="item.key==='spec'" @click.stop="_handleRow(scope)">-->
<!-- <el-input v-model="scope.row.spec" blur placeholder="请输入或选择型号规格"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- <div v-if="item.key==='factoryNumber'" @click.stop="_handleRow(scope)">-->
<!-- <el-input v-model="scope.row.factoryNumber" blur placeholder="请输入或选择出厂编号"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- <div v-if="item.key==='technicalParameter'" @click.stop="_handleRow(scope)">-->
<!-- <el-input v-model="scope.row.technicalParameter" blur placeholder="请输入技术参数"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- <div v-if="item.key==='manufacturer'" @click.stop="_handleRow(scope)">-->
<!-- <el-input v-model="scope.row.manufacturer" blur placeholder="请输入生产厂家"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- <div v-if="item.key==='type'" @click.stop="_handleRow(scope)">-->
<!-- <Select v-model="scope.row.type">-->
<!-- <Option v-for="(item,index) in options" :key="item.name" :value="index">-->
<!-- {{ item.name }}-->
<!-- </Option>-->
<!-- </Select>-->
<!-- </div>-->
<!-- <div v-if="item.key==='quantity'" @click.stop="_handleRow(scope)" >-->
<!-- <el-input-->
<!-- v-model="scope.row.quantity"-->
<!-- @blur="_quantityChange(scope.$rowIndex)"-->
<!-- @keydown.native="channelInputLimit"-->
<!-- type="number"-->
<!-- placeholder="请输入或选择数量"-->
<!-- />-->
<!-- </div>-->
<!-- <div v-if="item.key==='unit'" @click.stop="_handleRow(scope)">-->
<!-- <el-input v-model="scope.row.unit" blur placeholder="请输入收费单位"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- <div v-if="item.key==='remark'" @click.stop="_handleRow(scope)">-->
<!-- <el-input v-model="scope.row.remark" blur placeholder="请输入备注"-->
<!-- ></el-input>-->
<!-- </div>-->
<div v-else-if="item.date">
{{ scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):'' }}
......@@ -186,11 +187,11 @@ export default {
judgeType: [{ value: 1, name: '是' }, { value: 0, name: '否' }],
iconMsg: [
// { type: 'md-create', id: '', name: '编辑' },
{
type: 'md-trash',
id: 'meter-cannot-sub-edit-remove-o',
name: '删除'
}
// {
// type: 'md-trash',
// id: 'meter-cannot-sub-edit-remove-o',
// name: '删除'
// }
],
pageColumns: [
{ title: '名称', key: 'name', width: 160 },
......@@ -212,16 +213,16 @@ export default {
}
],
btn: [
{
type: 'success',
id: 'cannot-sub-meter-cannot-sub-edit-add',
name: '添加'
},
{
type: 'success',
id: 'cannot-sub-meter-cannot-sub-edit-import',
name: '导入'
}
// {
// type: 'success',
// id: 'cannot-sub-meter-cannot-sub-edit-add',
// name: '添加'
// },
// {
// type: 'success',
// id: 'cannot-sub-meter-cannot-sub-edit-import',
// name: '导入'
// }
],
id: '',
modalTitle: '',
......@@ -639,7 +640,7 @@ export default {
this.formObj = formObj
this._showAddress(formObj)
this._showTime(formObj)
this.getPage.records = formObj.sampleList
this.getPage.records = formObj.subSampleList
},
_getList: async function() {
const result = await meterEntrust.pageList()
......
......@@ -151,7 +151,7 @@ export default {
this._upload(data.id)
break
case '查看样品':
this._sampleManage(data.id)
this._sampleManage(data.contractId)
break
case '删除':
this._deleteByIds([data.id])
......
......@@ -10,24 +10,24 @@
<Form id="formId" :label-width="80" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="样品名称:" class="search-item">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入样品名称" clearable/>
<Input v-model="formObj.name" placeholder="请输入样品名称" clearable @on-enter="_formSearch"/>
</Form-item>
<Form-item label="样品编号:" class="search-item">
<Input v-model="formObj.code" @on-enter="_formSearch" placeholder="请输入样品编号" clearable/>
<Input v-model="formObj.code" placeholder="请输入样品编号" clearable @on-enter="_formSearch"/>
</Form-item>
<Form-item class="search-btn" style="margin-left: -10px">
<Button @click="_formSearch" type="primary">搜索</Button>
<Button type="primary" @click="_formSearch">搜索</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>
<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" :get-page="getPage"
:icon-msg="iconMsg" @on-result-change="_tableResultChange" select-data>
:icon-msg="iconMsg" select-data @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
......@@ -67,7 +67,7 @@
</div>
</template>
<script>
import { meterSample } from '../../../api'
import { meterSample, meterSampleQuote } from '../../../api'
// import importModal from '../contract-tab/ContractTab'
// import MeterSampleManageEdit from './MeterItemManage'
// import MeterSampleHisEdit from './MeterSampleHisEdit'
......@@ -137,18 +137,16 @@ export default {
selectData: [],
getPage: {},
pageColumns: [
{ title: '样品编号', key: 'code', width: 120 },
{ title: '样品名称', key: 'name', width: 140 },
{ title: '型号规格', key: 'spec', width: 140 },
{ title: '检测项目', key: 'itemNames', width: 140 },
{ title: '出厂编号', key: 'factoryNumber', width: 140 },
{ title: '是否分包', key: 'jobOut', width: 110 },
{ title: '检测类型', key: 'type', width: 140 },
{ title: '数量', key: 'quantity', width: 140 }
{ title: '名称', key: 'name', width: 160 },
{ title: '规格型号', key: 'spec' },
{ title: '数量', key: 'quantity', width: 130 },
{ title: '生产厂家', key: 'manufacturer' },
{ title: '出厂编号', key: 'factoryNumber' },
{ title: '备注', key: 'remark' }
],
dateList: [],
formObj: {
subContractId: undefined,
contractId: undefined,
name: undefined,
code: undefined,
type: undefined
......@@ -269,7 +267,7 @@ export default {
}
},
_open(id) {
this.formObj.subContractId = id
this.formObj.contractId = id
this.showModal = true
this._page()
},
......@@ -280,7 +278,7 @@ export default {
this.selectIds = []
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterSample.pageSubSample(this.formObj)
const result = await meterSampleQuote.pageSubSample(this.formObj)
if (result) {
this.getPage = result
this.$refs.pageTable._hideLoading()
......
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