Commit 33aaee24 by wangweidong

证书编制修改

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