Commit 33aaee24 by wangweidong

证书编制修改

parent d153c171
......@@ -8,6 +8,8 @@ import { https } from '../https'
export default {
// page
page: data => http.post('meter/v1/sub_contract/page', data).then(res => res),
pageSubmit: data =>
http.post('meter/v1/sub_contract/page_have_submit', data).then(res => res),
getById: data => http.get('meter/v1/sub_contract/' + data).then(res => res),
getDTOById: data =>
http.get('meter/v1/sub_contract/dto/' + data).then(res => res),
......@@ -16,6 +18,8 @@ export default {
http.delete('meter/v1/sub_contract/?ids=' + data).then(res => res),
// 保存
save: data => http.post('meter/v1/sub_contract/', data).then(res => res),
submit: data =>
http.post('meter/v1/sub_contract/submit?ids=' + data).then(res => res),
addSubContract: data =>
https
.post('meter/v1/sub_contract/add_sub_contract', JSON.stringify(data))
......
......@@ -95,8 +95,7 @@ export default {
btn: [
{ type: 'success', id: '', name: '添加' },
{ type: 'error', id: '', name: '删除' },
{ type: '', id: '', name: '导入' },
{ type: '', id: '', name: '导出' }
{ type: '', id: '', name: '导入' }
],
iconMsg: [
{ type: 'md-create', id: '', name: '编辑' },
......
......@@ -48,11 +48,7 @@
</div>
</template>
<script>
import {
meterContract,
meterSubContract,
meterSubcontractor
} from '../../../api'
import { meterSubContract, meterSubcontractor } from '../../../api'
import MeterSubcontractorEdit from './MeterCannotSubEdit'
export default {
components: { MeterSubcontractorEdit },
......@@ -79,18 +75,8 @@ export default {
id: '',
name: '编辑'
},
{
type: 'ios-beaker',
id: '',
name: '报价样品'
},
{ type: 'md-cloud', id: '', name: '附件' },
{ type: 'md-remove-circle', id: '', name: '删除' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
{ type: 'md-remove-circle', id: '', name: '删除' }
],
formObj: {
client: undefined
......@@ -183,7 +169,7 @@ export default {
}
},
_submit: async function(ids) {
const result = await meterContract.submitQuoteFirstReview(ids)
const result = await meterSubContract.submit(ids)
if (result) {
this._resultChange('提交成功')
}
......
......@@ -20,12 +20,12 @@
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide"
@on-result-change="_btnClick"></btn-list>
@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" hide-checkbox @on-result-change="_tableResultChange">
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
......@@ -34,7 +34,7 @@
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<div v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</div>
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
......@@ -43,37 +43,33 @@
</Row>
</div>
</div>
<FileManage ref="FileManage"></FileManage>
<MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit>
</div>
</template>
<script>
import { meterContract, meterSubcontractor } from '../../../api'
import { meterSubContract, meterSubcontractor } from '../../../api'
import MeterSubcontractorEdit from './MeterCannotSubEdit'
export default {
components: {},
components: { MeterSubcontractorEdit },
data() {
return {
currentComponent: '',
formId: 'meterQuoteRegisterHis.vueFormId',
formId: 'meterSubcontractorFormId',
searchOpen: true,
btn: [
// {
// type: 'success',
// id: 'meter-subcontractor-add-btn',
// id: '',
// name: '添加'
// },
// {
// type: 'success',
// id: '',
// name: '提交'
// }
],
iconMsg: [
{
type: 'ios-beaker',
id: '',
name: '报检样品查询'
},
{ type: 'md-cloud', id: '', name: '附件' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
],
iconMsg: [{ type: 'md-cloud', id: '', name: '附件' }],
formObj: {
client: undefined
},
......@@ -81,13 +77,13 @@ export default {
getPage: {},
pageColumns: [
{ title: '委托单位', key: 'client', width: 200 },
{ title: '联系人', key: 'person', width: 120 },
{ title: '联系电话', key: 'tel', width: 120 },
{ title: '传真', key: 'fax', width: 120 },
{ title: '委托时间', key: 'edate', width: 120, date: true },
{ title: '要求完成时间', key: 'odate', width: 120, date: true },
{ title: '折扣', key: 'discount', width: 120 },
{ title: '总价', key: 'totalPrice', width: 120 },
{ title: '折扣价', key: 'discountPrice', width: 120 },
{ title: '分包方', key: 'subClient', width: 120 },
{ title: '分包方联系人', key: 'subPerson', width: 120 },
{ title: '分包方联系方式', key: 'subTel', width: 120 },
{ title: '分包费用', key: 'subFee', width: 120 },
{ title: '分包时间', key: 'subTime', width: 120, date: true },
{ title: '备注', key: 'remark' }
]
}
......@@ -105,6 +101,10 @@ export default {
this._page()
},
methods: {
_manageSample(data) {
// 管理样品
this.$refs.meterSampleManageModal._open(data)
},
_btnClick(msg, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
......@@ -112,6 +112,9 @@ export default {
case '添加':
this._editModal(false)
break
case '提交':
this._submitToReview()
break
case 'search':
this.searchOpen = !this.searchOpen
break
......@@ -119,12 +122,16 @@ export default {
})
},
_iconClick(res, data, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (res) {
case '编辑':
this._editModal(true, data.id)
break
case '报检样品查询':
case '报价样品':
this._manageSample(data.id)
break
case '资质项目':
this._itemModal(data.id)
break
case '附件':
......@@ -139,11 +146,38 @@ export default {
}
})
},
_submitToReview() {
const ids = this.selectIds
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定要把这 ' + ids.length + ' 条记录提交?',
onOk: () => {
this._submit(ids)
}
})
}
},
_submit: async function(ids) {
const result = await meterSubContract.submit(ids)
if (result) {
this._resultChange('提交成功')
}
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
},
_record(id) {
this.$refs.meterContractRecordModal._open(id)
this.$refs.operationModal._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
case 'selectIds':
this.selectIds = data
break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
......@@ -154,8 +188,7 @@ export default {
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterContract.pageHis(this.formObj)
const result = await meterSubContract.pageSubmit(this.formObj)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
......@@ -185,18 +218,19 @@ export default {
this.$refs.editSubcontractorModal._open()
}
},
// 追加项目
_itemModal(data) {
this.$refs.meterSampleQuoteManageModal._open(data)
this.$refs.refModal._open(data)
},
_upload(id) {
// 上传文件
this.$refs.refModal._open(id, 'subcontractorId')
this.$refs.FileManage._open(id, 'subcontractorId')
},
_getById: async function(id) {
const result = await meterSubcontractor.getById(id)
const result = await meterSubContract.getDTOById(id)
if (result) {
this.$refs.editSubcontractorModal._open(result)
this.$refs.editSubcontractorModal._openEdit(result)
}
},
_delete: async function(ids) {
......
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