首页模块修改-查询部分修改
This commit is contained in:
parent
8117affa71
commit
266edb37e6
|
|
@ -21,3 +21,9 @@ export const queryContactUnitsListApi = (data) => {
|
|||
params: data
|
||||
})
|
||||
}
|
||||
/** 往来单位列表查询-下拉选 */
|
||||
export const queryContactUnitsSelApi = (data) => {
|
||||
return request.get('/base/customer/getUnitInfoSelect', {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,3 +21,9 @@ export const queryProjectListApi = (data) => {
|
|||
params: data
|
||||
})
|
||||
}
|
||||
/** 工程列表查询-下拉选 */
|
||||
export const queryProjectSelApi = (data) => {
|
||||
return request.get('/base/project/getProjectSelect', {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,10 +52,7 @@
|
|||
v-model="queryParams[item.f_model]"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
type="date"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ export const constantRoutes = [
|
|||
name: 'Index',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
/* {
|
||||
path: 'ProjectManage',
|
||||
component: () => import('@/views/base/project'),
|
||||
component: () => import('@/views/base/project'),
|
||||
name: 'ProjectManage',
|
||||
meta: { title: '工程管理', icon: 'dashboard', affix: true }
|
||||
},
|
||||
|
|
@ -95,7 +95,7 @@ export const constantRoutes = [
|
|||
component: () => import('@/views/base/agreement'),
|
||||
name: 'ProtocolManage',
|
||||
meta: { title: '协议管理', icon: 'dashboard', affix: true }
|
||||
}
|
||||
} */
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,9 +13,15 @@ export const commonMixin = {
|
|||
this.dialogConfig.outerVisible = true
|
||||
},
|
||||
/** 删除 */
|
||||
handleDeleteData(data) {
|
||||
handleDeleteData(id) {
|
||||
this.$modal.confirm('是否确定删除').then(() => {
|
||||
console.log('确定删除--')
|
||||
console.log('确定删除--', id)
|
||||
/* deleteProjectApi(id).then(res => {
|
||||
console.log(res)
|
||||
history.go(0)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
}) */
|
||||
})
|
||||
},
|
||||
/** 编辑 */
|
||||
|
|
@ -46,4 +52,4 @@ export const commonMixin = {
|
|||
this.dialogConfig.outerVisible = false
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,17 @@
|
|||
<el-row type="flex" justify="space-between" :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="租赁单位" prop="customer">
|
||||
<el-input v-model="protocolParams.customer" />
|
||||
<el-select
|
||||
v-model="protocolParams.customer"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitSelRange"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -26,7 +36,15 @@
|
|||
<el-form-item label="租赁工程" prop="project">
|
||||
<el-select
|
||||
v-model="protocolParams.project"
|
||||
></el-select>
|
||||
>
|
||||
<el-option
|
||||
v-for="item in projSelRange"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -38,9 +56,7 @@
|
|||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同编号" prop="contractNumber">
|
||||
<el-select
|
||||
v-model="protocolParams.contractNumber"
|
||||
></el-select>
|
||||
<el-input v-model="protocolParams.contractNumber" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
|
|
@ -92,6 +108,12 @@ import {
|
|||
addProtocolApi,
|
||||
editProtocolApi
|
||||
} from '@/api/base/agreement'
|
||||
import {
|
||||
queryContactUnitsSelApi
|
||||
} from '@/api/base/customer'
|
||||
import {
|
||||
queryProjectSelApi
|
||||
} from '@/api/base/project'
|
||||
import { addProjectApi, editProjectApi } from '@/api/base/project'
|
||||
export default {
|
||||
name: 'FormProtocol',
|
||||
|
|
@ -101,6 +123,10 @@ export default {
|
|||
default: () => null,
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.queryUnitSel()
|
||||
this.queryProjSel()
|
||||
},
|
||||
mounted() {
|
||||
if (this.editParams) {
|
||||
Object.assign(this.protocolParams, this.editParams)
|
||||
|
|
@ -122,6 +148,10 @@ export default {
|
|||
remark: '', // 备注
|
||||
url: '', // 合同附件
|
||||
},
|
||||
// 租赁单位下拉框
|
||||
unitSelRange: [],
|
||||
// 租赁工程下拉框
|
||||
projSelRange: [],
|
||||
// 校验规则
|
||||
protocolParamsRules: {
|
||||
/* scrapNum: [
|
||||
|
|
@ -156,6 +186,30 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询往来单位下拉框 */
|
||||
queryUnitSel() {
|
||||
queryContactUnitsSelApi().then(res => {
|
||||
console.log(res)
|
||||
this.unitSelRange = res.data.map(item => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id
|
||||
}
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
/** 查询租赁工程下拉框 */
|
||||
queryProjSel() {
|
||||
queryProjectSelApi().then(res => {
|
||||
console.log(res)
|
||||
this.projSelRange = res.data.map(item => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id
|
||||
}
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
/** 确认按钮 */
|
||||
onSubmit() {
|
||||
this.$refs.protocolParamsRef.validate((valid) => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
let agreementStatus = [
|
||||
{ label: '已结算', value: 0 },
|
||||
{ label: '未结算', value: 1 },
|
||||
]
|
||||
|
||||
export const formLabel = [
|
||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'date' },
|
||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
|
||||
{ f_label: '状态', f_model: 'keywords', f_type: 'sel' },
|
||||
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
|
||||
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
|
||||
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
||||
{ f_label: '状态', f_model: 'isBalance', f_type: 'sel', f_selList: agreementStatus },
|
||||
]
|
||||
export const columnsList = [
|
||||
{ t_props: 'signDate', t_label: '协议签订时间', },
|
||||
|
|
|
|||
Loading…
Reference in New Issue