|
@@ -3,50 +3,54 @@
|
|
|
<el-form v-model="params" class="full-width" label-width="120px">
|
|
<el-form v-model="params" class="full-width" label-width="120px">
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
|
<div class="flex flex-center mt-15 mr-10">
|
|
<div class="flex flex-center mt-15 mr-10">
|
|
|
- <el-form-item label="关键字" class="full-width" style="margin-left: -50px">
|
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="关键字"
|
|
|
|
|
+ class="full-width"
|
|
|
|
|
+ style="margin-left: -50px"
|
|
|
|
|
+ >
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="params.name"
|
|
|
|
|
- placeholder="输入合同关键字"
|
|
|
|
|
- prefix-icon="Search"
|
|
|
|
|
- clearable
|
|
|
|
|
|
|
+ v-model="params.name"
|
|
|
|
|
+ placeholder="输入合同关键字"
|
|
|
|
|
+ prefix-icon="Search"
|
|
|
|
|
+ clearable
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="full-width" label="合同类别">
|
|
<el-form-item class="full-width" label="合同类别">
|
|
|
<el-select v-model="params.type" clearable>
|
|
<el-select v-model="params.type" clearable>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in typelist"
|
|
|
|
|
- :key="item.dictKey"
|
|
|
|
|
- :label="item.dictValue"
|
|
|
|
|
- :value="item.dictKey"
|
|
|
|
|
|
|
+ v-for="item in typelist"
|
|
|
|
|
+ :key="item.dictKey"
|
|
|
|
|
+ :label="item.dictValue"
|
|
|
|
|
+ :value="item.dictKey"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="full-width" label="合同状态">
|
|
<el-form-item class="full-width" label="合同状态">
|
|
|
<el-select v-model="params.status" clearable>
|
|
<el-select v-model="params.status" clearable>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in dicList"
|
|
|
|
|
- :key="item.dictKey"
|
|
|
|
|
- :label="item.dictValue"
|
|
|
|
|
- :value="item.dictKey"
|
|
|
|
|
|
|
+ v-for="item in dicList"
|
|
|
|
|
+ :key="item.dictKey"
|
|
|
|
|
+ :label="item.dictValue"
|
|
|
|
|
+ :value="item.dictKey"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex flex-center ml-20">
|
|
<div class="flex flex-center ml-20">
|
|
|
- <base-button type="0" title="重置" icon="Refresh"/>
|
|
|
|
|
- <base-button class="ml-20" @click="onLoad"/>
|
|
|
|
|
|
|
+ <base-button type="0" title="重置" icon="Refresh" />
|
|
|
|
|
+ <base-button class="ml-20" @click="onLoad" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<avue-crud
|
|
<avue-crud
|
|
|
- :option="option"
|
|
|
|
|
- :data="data"
|
|
|
|
|
- ref="crud"
|
|
|
|
|
- v-model="form"
|
|
|
|
|
- :before-open="beforeOpen"
|
|
|
|
|
- @row-del="rowDel"
|
|
|
|
|
- @row-save="rowSave"
|
|
|
|
|
- @row-update="rowUpdate"
|
|
|
|
|
|
|
+ :option="option"
|
|
|
|
|
+ :data="data"
|
|
|
|
|
+ ref="crud"
|
|
|
|
|
+ v-model="form"
|
|
|
|
|
+ :before-open="beforeOpen"
|
|
|
|
|
+ @row-del="rowDel"
|
|
|
|
|
+ @row-save="rowSave"
|
|
|
|
|
+ @row-update="rowUpdate"
|
|
|
>
|
|
>
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
</el-card>
|
|
</el-card>
|
|
@@ -59,17 +63,20 @@ meta: { layout: 'empty'}
|
|
|
}
|
|
}
|
|
|
</route>
|
|
</route>
|
|
|
<script>
|
|
<script>
|
|
|
-import BaseButton from "@/components/base-button.vue";
|
|
|
|
|
|
|
+import BaseButton from '@/components/base-button.vue'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- components: {BaseButton},
|
|
|
|
|
|
|
+ components: { BaseButton },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ projectId: '',
|
|
|
form: {},
|
|
form: {},
|
|
|
- data: [{
|
|
|
|
|
- id: 3,
|
|
|
|
|
- prop: 'ooooo'
|
|
|
|
|
- }],
|
|
|
|
|
|
|
+ data: [
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 3,
|
|
|
|
|
+ prop: 'ooooo'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
option: {
|
|
option: {
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
menuAlign: 'center',
|
|
@@ -123,8 +130,7 @@ export default {
|
|
|
{
|
|
{
|
|
|
label: '到期日期',
|
|
label: '到期日期',
|
|
|
prop: 'noticeType'
|
|
prop: 'noticeType'
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
page: {
|
|
page: {
|
|
@@ -141,47 +147,44 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
|
|
+ this.projectId = this.$route.query.id
|
|
|
this.getDic('contract-status')
|
|
this.getDic('contract-status')
|
|
|
this.getDic('contract-type')
|
|
this.getDic('contract-type')
|
|
|
this.onLoad()
|
|
this.onLoad()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
getDic(code) {
|
|
getDic(code) {
|
|
|
- this.$api.common.dicList({code}).then(res => {
|
|
|
|
|
|
|
+ this.$api.common.dicList({ code }).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
if (code === 'contract-status') {
|
|
if (code === 'contract-status') {
|
|
|
this.dicList = res.data
|
|
this.dicList = res.data
|
|
|
} else if (code === 'contract-type') {
|
|
} else if (code === 'contract-type') {
|
|
|
this.typelist = res.data
|
|
this.typelist = res.data
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
- const data = {
|
|
|
|
|
- name: this.params.name,
|
|
|
|
|
- status: this.params.status,
|
|
|
|
|
- type: this.params.type
|
|
|
|
|
- }
|
|
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
- this.$api.contract.contractList(Object.assign(this.page, data))
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- console.log(res)
|
|
|
|
|
- })
|
|
|
|
|
- .finally(() => {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const data = Object.assign(this.params, { projectId: this.projectId })
|
|
|
|
|
+ this.$api.contract
|
|
|
|
|
+ .contractList(Object.assign(this.page, data))
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ })
|
|
|
|
|
+ .finally(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
beforeOpen(done, type) {
|
|
beforeOpen(done, type) {
|
|
|
if (type === 'view') {
|
|
if (type === 'view') {
|
|
|
const data = this.$router.resolve({
|
|
const data = this.$router.resolve({
|
|
|
path: '/contract/detail',
|
|
path: '/contract/detail',
|
|
|
- query: {id: this.form.id}
|
|
|
|
|
|
|
+ query: { id: this.form.projectId }
|
|
|
})
|
|
})
|
|
|
window.open(data.href, '_blank')
|
|
window.open(data.href, '_blank')
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|