Commit 71c4c857 by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

parents 85b8ffff bbc85f4b
......@@ -8,6 +8,8 @@ import { https } from '../https'
export default {
// page
page: data => http.post('meter/v1/sample/page', data).then(res => res),
pageSubSample: data =>
http.post('/meter/v1/sub_sample/page', data).then(res => res),
pageSampleProgress: data =>
http.post('meter/v1/sample/page_sample_progress', data).then(res => res),
......@@ -178,6 +180,15 @@ export default {
data.reason
)
.then(res => res),
reportIssueBack: data =>
http
.post(
'meter/v1/sample/report_issue_back?ids=' +
data.ids +
'&reason=' +
data.reason
)
.then(res => res),
certificateOk: data =>
http
......
......@@ -47,7 +47,6 @@ export default {
_getProvince: async function(data) {
// 获取省份
const result = await meterEntrust.getProvince()
console.log(result)
// this.$store.dispatch('SysProvince/getProvince').then(() => {
// const result = this.$store.state.SysProvince.list
const casData = []
......
......@@ -140,10 +140,6 @@ export default {
this._loadData(newVal)
}
},
mounted() {
console.log('按钮')
console.log(this.iconMsg)
},
methods: {
_loadData(data) {
// 阻断 vue 对大数组的双向绑定,大数据性能翻倍提升
......
......@@ -58,6 +58,7 @@
</div>
<operationModal ref="operationModal"></operationModal>
<FileManage ref="FileManage"></FileManage>
<Reason ref="reasonModal" @on-result-change="_reasonResult"></Reason>
<!--编辑证书-->
......@@ -67,10 +68,11 @@
</template>
<script>
import { meterSample } from '../../../api'
import Reason from '../../../components/base/Reason'
import operationModal from '../../../components/operation/Operation'
import CertificateMakeLook from '../../meter-certificate/CertificateMakeLook'
export default {
components: { operationModal, CertificateMakeLook },
components: { operationModal, Reason, CertificateMakeLook },
data() {
return {
currentComponent: '',
......@@ -131,6 +133,10 @@ export default {
this._page()
},
methods: {
_resultRecord() {
this._page()
this.$emit('on-result-change')
},
_btnClick(msg, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
......@@ -153,6 +159,31 @@ export default {
}
})
},
_goBack() {
// 退回
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条委托!')
} else {
this.$refs.reasonModal._open('退回原因')
}
},
_reasonResult(data) {
if (undefined !== data && data !== '') {
this._reportIssueBack(data)
}
console.log(data)
},
_reportIssueBack: async function(data) {
const result = await meterSample.reportIssueBack({
ids: this.selectIds,
reason: data
})
if (result) {
this.$Message.success('退回成功!')
await this._page()
}
},
_submitToReview() {
this._submitByContractIds()
},
......
......@@ -6,21 +6,21 @@
<Row>
<!--查询-->
<Col span="24" style="margin-top: 10px">
<Form v-show="searchOpen" id="formId" :label-width="90" inline onsubmit="return false">
<Form id="formId" v-show="searchOpen" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="委托单位:">
<Input v-model="formObj.client" name="client" placeholder="请输入委托单位" clearable @on-enter="_formSearch"/>
<Input v-model="formObj.client" @on-enter="_formSearch" name="client" placeholder="请输入委托单位" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button>
<Button @click="_formSearch" type="primary">搜索</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>
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick"
class="contHide"></btn-list>
</Col>
<!--表格-->
<Col span="24">
......@@ -44,14 +44,16 @@
</div>
</div>
<FileManage ref="FileManage"></FileManage>
<MeterSampleManage ref="meterSampleManageModal" @on-result-change="_page"></MeterSampleManage>
<MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit>
</div>
</template>
<script>
import { meterSubContract, meterSubcontractor } from '../../../api'
import MeterSampleManage from './MeterCannotSubSampleManage'
import MeterSubcontractorEdit from './MeterCannotSubEdit'
export default {
components: { MeterSubcontractorEdit },
components: { MeterSubcontractorEdit, MeterSampleManage },
data() {
return {
currentComponent: '',
......@@ -69,7 +71,14 @@ export default {
// name: '提交'
// }
],
iconMsg: [{ type: 'md-cloud', id: '', name: '附件' }],
iconMsg: [
{
type: 'md-flask',
id: '',
name: '查看样品'
},
{ type: 'md-cloud', id: '', name: '附件' }
],
formObj: {
client: undefined
},
......@@ -137,6 +146,9 @@ export default {
case '附件':
this._upload(data.id)
break
case '查看样品':
this._sampleManage(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
......@@ -146,6 +158,10 @@ export default {
}
})
},
_sampleManage(data) {
// 管理样品
this.$refs.meterSampleManageModal._open(data)
},
_submitToReview() {
const ids = this.selectIds
if (ids.length === 0) {
......
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