基础、物资模块自测-问题修改
This commit is contained in:
parent
5d91b7d7ef
commit
b021423006
|
|
@ -53,7 +53,7 @@ service.interceptors.request.use(config => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理 GET 请求
|
// 处理 GET 请求
|
||||||
if (config.method === 'get' && config.params) {
|
/* if (config.method === 'get' && config.params) {
|
||||||
let params = tansParams(config.params).slice(0, -1)
|
let params = tansParams(config.params).slice(0, -1)
|
||||||
// 数据完整性校验
|
// 数据完整性校验
|
||||||
if (CONFIG.dataSettings.integrityCheck && checkIntegrity) {
|
if (CONFIG.dataSettings.integrityCheck && checkIntegrity) {
|
||||||
|
|
@ -65,6 +65,14 @@ service.interceptors.request.use(config => {
|
||||||
}
|
}
|
||||||
config.url = `${config.url}?${params}`
|
config.url = `${config.url}?${params}`
|
||||||
config.params = {}
|
config.params = {}
|
||||||
|
} */
|
||||||
|
|
||||||
|
// get请求映射params参数
|
||||||
|
if (config.method === 'get' && config.params) {
|
||||||
|
let url = config.url + '?' + tansParams(config.params);
|
||||||
|
url = url.slice(0, -1);
|
||||||
|
config.params = {};
|
||||||
|
config.url = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,20 @@
|
||||||
<el-row type="flex" justify="space-between" :gutter="24">
|
<el-row type="flex" justify="space-between" :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="租赁单位" prop="customer">
|
<el-form-item label="租赁单位" prop="customer">
|
||||||
<treeselect
|
<!-- <treeselect
|
||||||
v-model="protocolParams.customer"
|
v-model="protocolParams.customer"
|
||||||
:options="unitSelRange"
|
:options="unitSelRange"
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
noOptionsText="没有数据"
|
noOptionsText="没有数据"
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择所属上级"
|
placeholder="请选择所属上级"
|
||||||
|
/>-->
|
||||||
|
<el-cascader
|
||||||
|
v-model="protocolParams.customer"
|
||||||
|
:options="unitSelRange"
|
||||||
|
:show-all-levels="false"
|
||||||
|
@change="customerChange"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -31,7 +38,7 @@
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="租赁工程" prop="project">
|
<el-form-item label="租赁工程" prop="project">
|
||||||
<treeselect
|
<!-- <treeselect
|
||||||
v-model="protocolParams.project"
|
v-model="protocolParams.project"
|
||||||
:options="projSelRange"
|
:options="projSelRange"
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
|
|
@ -39,6 +46,13 @@
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择所属上级"
|
placeholder="请选择所属上级"
|
||||||
@before-select="handleBeforeSelect"
|
@before-select="handleBeforeSelect"
|
||||||
|
/>-->
|
||||||
|
<el-cascader
|
||||||
|
v-model="protocolParams.project"
|
||||||
|
:options="projSelRange"
|
||||||
|
:show-all-levels="false"
|
||||||
|
@change="projChange"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -151,8 +165,14 @@ export default {
|
||||||
this.getRanges()
|
this.getRanges()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
console.log(this.editParams)
|
||||||
if (this.editParams) {
|
if (this.editParams) {
|
||||||
Object.assign(this.protocolParams, this.editParams)
|
Object.assign(this.protocolParams, this.editParams)
|
||||||
|
this.fileList = []
|
||||||
|
this.fileList.push({
|
||||||
|
name: this.protocolParams.url,
|
||||||
|
url: this.protocolParams.url
|
||||||
|
})
|
||||||
this.subSort = 2
|
this.subSort = 2
|
||||||
} else {
|
} else {
|
||||||
this.subSort = 1
|
this.subSort = 1
|
||||||
|
|
@ -207,22 +227,50 @@ export default {
|
||||||
authorizingPhone: [
|
authorizingPhone: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入联系电话',
|
validator: this.validatePhone,
|
||||||
|
message: '请输入正确格式的手机号',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
phoneReg: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 联系电话校验 */
|
||||||
|
validatePhone(rule, value, callback) {
|
||||||
|
if(!this.phoneReg.test(value)) {
|
||||||
|
callback(new Error('请输入正确格式的手机号'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 级联选择器改变 */
|
||||||
|
customerChange(e) {
|
||||||
|
console.log(e)
|
||||||
|
this.protocolParams.customer = e[e.length - 1]
|
||||||
|
},
|
||||||
|
projChange(e) {
|
||||||
|
this.protocolParams.project = e[e.length - 1]
|
||||||
|
},
|
||||||
/** 查询各类下拉框 */
|
/** 查询各类下拉框 */
|
||||||
async getRanges() {
|
async getRanges() {
|
||||||
// 往来单位
|
// 往来单位
|
||||||
let unitRes = await queryleaseUnitApi()
|
let unitRes = await queryleaseUnitApi()
|
||||||
this.unitSelRange = unitRes.data
|
this.unitSelRange = this.changeTree(unitRes.data)
|
||||||
// 租赁工程
|
// 租赁工程
|
||||||
let projRes = await queryleaseProjApi()
|
let projRes = await queryleaseProjApi()
|
||||||
this.projSelRange = projRes.data
|
this.projSelRange = this.changeTree(projRes.data)
|
||||||
|
},
|
||||||
|
/** 改变树结构 */
|
||||||
|
changeTree(leaf) {
|
||||||
|
leaf.map(item => {
|
||||||
|
item.value = item.id
|
||||||
|
if(item.children) {
|
||||||
|
this.changeTree(item.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return leaf
|
||||||
},
|
},
|
||||||
/** 树禁选父级 */
|
/** 树禁选父级 */
|
||||||
changeData(data) { // 存在子集就不让禁止,父级让禁止
|
changeData(data) { // 存在子集就不让禁止,父级让禁止
|
||||||
|
|
@ -236,24 +284,6 @@ export default {
|
||||||
})
|
})
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
handleBeforeSelect(node, isSelected) {
|
|
||||||
if (node.children && node.children.length) {
|
|
||||||
// Prevent parent nodes from being selected
|
|
||||||
return !isSelected;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
/** 树优化 */
|
|
||||||
leadersNormalizer(node) {
|
|
||||||
if (node.children && !node.children.length) {
|
|
||||||
delete node.children;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
id: node.id,
|
|
||||||
label: node.label,
|
|
||||||
children: node.children
|
|
||||||
};
|
|
||||||
},
|
|
||||||
/** 上传图片/文件 */
|
/** 上传图片/文件 */
|
||||||
uploadData(param) {
|
uploadData(param) {
|
||||||
console.log(param)
|
console.log(param)
|
||||||
|
|
@ -289,19 +319,22 @@ export default {
|
||||||
// 1. 表单校验通过后调后台 Api
|
// 1. 表单校验通过后调后台 Api
|
||||||
if(this.subSort === 1) {
|
if(this.subSort === 1) {
|
||||||
addProtocolApi(this.protocolParams).then(res => {
|
addProtocolApi(this.protocolParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
} else if(this.subSort === 2) {
|
} else if(this.subSort === 2) {
|
||||||
editProtocolApi(this.protocolParams).then(res => {
|
editProtocolApi(this.protocolParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
|
||||||
this.$emit('closeDialog', true)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ export const formLabel = [
|
||||||
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
|
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
|
||||||
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
|
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
|
||||||
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
||||||
{ f_label: '状态', f_model: 'isBalance', f_type: 'sel', f_selList: agreementStatus },
|
// { f_label: '状态', f_model: 'isBalance', f_type: 'sel', f_selList: agreementStatus },
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'signDate', t_label: '协议签订时间', },
|
// { t_props: 'signDate', t_label: '协议签订时间', },
|
||||||
{ t_props: 'code', t_label: '协议编号' },
|
{ t_props: 'code', t_label: '协议编号' },
|
||||||
{ t_props: 'contractNumber', t_label: '合同编号' },
|
{ t_props: 'contractNumber', t_label: '合同编号' },
|
||||||
{ t_props: 'unitName', t_label: '租赁单位', },
|
{ t_props: 'unitName', t_label: '租赁单位', },
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,20 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属分公司" prop="companyId">
|
<el-form-item label="所属分公司" prop="companyId">
|
||||||
<treeselect
|
<!-- <treeselect
|
||||||
v-model="contactUnitsParams.companyId"
|
v-model="contactUnitsParams.companyId"
|
||||||
:options="companyRange"
|
:options="companyRange"
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
noOptionsText="没有数据"
|
noOptionsText="没有数据"
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择所属上级"
|
placeholder="请选择所属上级"
|
||||||
|
/>-->
|
||||||
|
<el-cascader
|
||||||
|
v-model="contactUnitsParams.companyId"
|
||||||
|
:options="companyRange"
|
||||||
|
:show-all-levels="false"
|
||||||
|
@change="handleCas"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="材料员" prop="materialClerk">
|
<el-form-item label="材料员" prop="materialClerk">
|
||||||
|
|
@ -146,7 +153,22 @@ export default {
|
||||||
})
|
})
|
||||||
// 获取所属分公司树
|
// 获取所属分公司树
|
||||||
let companyRes = await queryCompanyTreeApi()
|
let companyRes = await queryCompanyTreeApi()
|
||||||
this.companyRange = companyRes.data
|
this.companyRange = this.changeTree(companyRes.data)
|
||||||
|
},
|
||||||
|
/** 改变树结构 */
|
||||||
|
changeTree(leaf) {
|
||||||
|
leaf.map(item => {
|
||||||
|
item.value = item.id
|
||||||
|
if(item.children) {
|
||||||
|
this.changeTree(item.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return leaf
|
||||||
|
},
|
||||||
|
/** 级联选择器改变 */
|
||||||
|
handleCas(e) {
|
||||||
|
console.log(e)
|
||||||
|
this.contactUnitsParams.companyId = e[e.length - 1]
|
||||||
},
|
},
|
||||||
/** 确认按钮 */
|
/** 确认按钮 */
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
|
@ -156,15 +178,17 @@ export default {
|
||||||
// 1. 表单校验通过后调后台 Api
|
// 1. 表单校验通过后调后台 Api
|
||||||
if(this.subSort === 1) {
|
if(this.subSort === 1) {
|
||||||
addContactUnitsApi(this.contactUnitsParams).then(res => {
|
addContactUnitsApi(this.contactUnitsParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
} else if(this.subSort === 2) {
|
} else if(this.subSort === 2) {
|
||||||
editContactUnitsApi(this.contactUnitsParams).then(res => {
|
editContactUnitsApi(this.contactUnitsParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
}).catch(err => {})
|
|
||||||
}
|
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
this.$emit('closeDialog', true)
|
this.$emit('closeDialog', true)
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@
|
||||||
<el-button type="primary" @click="handleAddData()"
|
<el-button type="primary" @click="handleAddData()"
|
||||||
>新建</el-button
|
>新建</el-button
|
||||||
>
|
>
|
||||||
<el-button type="success" @click="isShowComponent = 'person-config'"
|
<!-- <el-button type="success" @click="isShowComponent = 'person-config'"
|
||||||
>人员配置</el-button
|
>人员配置</el-button
|
||||||
>
|
>-->
|
||||||
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,8 @@ export const commonMixin = {
|
||||||
this.$modal.confirm('是否确定删除').then(() => {
|
this.$modal.confirm('是否确定删除').then(() => {
|
||||||
console.log('确定删除--', id)
|
console.log('确定删除--', id)
|
||||||
method(id).then(res => {
|
method(id).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功!')
|
||||||
if(res.code === 200) {
|
|
||||||
// this.$message.msgSuccess('操作成功!')
|
|
||||||
this.$refs.tableRef.getTableList()
|
this.$refs.tableRef.getTableList()
|
||||||
}
|
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,20 @@
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="实施单位" prop="impUnit">
|
<el-form-item label="实施单位" prop="impUnit">
|
||||||
<treeselect
|
<!-- <treeselect
|
||||||
v-model="projectParams.impUnit"
|
v-model="projectParams.impUnit"
|
||||||
:options="proSelRanges.pro_unit_range"
|
:options="proSelRanges.pro_unit_range"
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
noOptionsText="没有数据"
|
noOptionsText="没有数据"
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择所属上级"
|
placeholder="请选择所属上级"
|
||||||
|
/>-->
|
||||||
|
<el-cascader
|
||||||
|
v-model="projectParams.impUnit"
|
||||||
|
:options="proSelRanges.pro_unit_range"
|
||||||
|
:show-all-levels="false"
|
||||||
|
@change="handleCas"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -86,29 +93,37 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="联系电话" prop="phone">
|
<el-form-item label="联系电话" prop="telphone">
|
||||||
<el-input v-model="projectParams.phone" :maxlength="11" />
|
<el-input v-model="projectParams.telphone" :maxlength="11" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="手机" prop="phone">
|
||||||
|
<el-input v-model="projectParams.phone" :maxlength="11" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="合同主体单位" prop="htzt">
|
<el-form-item label="合同主体单位" prop="htzt">
|
||||||
<el-input v-model="projectParams.htzt" />
|
<el-input v-model="projectParams.htzt" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目部" prop="deptName">
|
<el-form-item label="项目部" prop="deptName">
|
||||||
<el-input v-model="projectParams.deptName" />
|
<el-input v-model="projectParams.deptName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="24">
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="i8工程ID" prop="proId">
|
<el-form-item label="i8工程ID" prop="proId">
|
||||||
<el-input v-model="projectParams.proId" />
|
<el-input v-model="projectParams.proId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="关联i8工程" prop="isMatch">
|
<el-form-item label="关联i8工程" prop="isMatch">
|
||||||
<span
|
<span
|
||||||
|
|
@ -124,16 +139,12 @@
|
||||||
</el-switch>-->
|
</el-switch>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="24">
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input type="textarea" v-model="projectParams.remark" :rows="4" />
|
<el-input type="textarea" v-model="projectParams.remark" :rows="4" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12"> </el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="success" @click="onSubmit">确认</el-button>
|
<el-button type="success" @click="onSubmit">确认</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -194,7 +205,8 @@ export default {
|
||||||
stats: undefined, // 工程状态
|
stats: undefined, // 工程状态
|
||||||
nature: undefined, // 工程性质
|
nature: undefined, // 工程性质
|
||||||
manager: undefined, // 项目经理
|
manager: undefined, // 项目经理
|
||||||
phone: undefined, // 联系电话
|
telphone: undefined, // 联系电话
|
||||||
|
phone: undefined, // 手机
|
||||||
htzt: undefined, // 合同主体
|
htzt: undefined, // 合同主体
|
||||||
deptName: undefined, // 项目部
|
deptName: undefined, // 项目部
|
||||||
proId: undefined, // i8工程id
|
proId: undefined, // i8工程id
|
||||||
|
|
@ -246,6 +258,7 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
phoneReg: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -253,7 +266,7 @@ export default {
|
||||||
async getRanges() {
|
async getRanges() {
|
||||||
// 获取实施单位树下拉框
|
// 获取实施单位树下拉框
|
||||||
let unitRes = await queryCompanyTreeApi()
|
let unitRes = await queryCompanyTreeApi()
|
||||||
this.proSelRanges.pro_unit_range = unitRes.data
|
this.proSelRanges.pro_unit_range = this.changeTree(unitRes.data)
|
||||||
// 获取工程类型下拉框
|
// 获取工程类型下拉框
|
||||||
let typeRes = await queryProjectTypeApi()
|
let typeRes = await queryProjectTypeApi()
|
||||||
this.proSelRanges.pro_type_range = typeRes.data.data.map(item => {
|
this.proSelRanges.pro_type_range = typeRes.data.data.map(item => {
|
||||||
|
|
@ -279,37 +292,55 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/** 改变树结构 */
|
||||||
|
changeTree(leaf) {
|
||||||
|
leaf.map(item => {
|
||||||
|
item.value = item.id
|
||||||
|
if(item.children) {
|
||||||
|
this.changeTree(item.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return leaf
|
||||||
|
},
|
||||||
|
/** 级联选择器改变 */
|
||||||
|
handleCas(e) {
|
||||||
|
this.projectParams.impUnit = e[e.length - 1]
|
||||||
|
},
|
||||||
/** 确认按钮 */
|
/** 确认按钮 */
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.$refs.projectParamsRef.validate(valid => {
|
this.$refs.projectParamsRef.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
if(this.projectParams.telphone !== undefined && this.projectParams.telphone !== "" && this.projectParams.telphone !== null) {
|
||||||
|
if(!this.phoneReg.test(this.projectParams.telphone)) {
|
||||||
|
this.$modal.msgError('请填写正确的联系方式')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.projectParams.phone !== undefined && this.projectParams.phone !== "" && this.projectParams.phone !== null) {
|
||||||
|
if(!this.phoneReg.test(this.projectParams.phone)) {
|
||||||
|
this.$modal.msgError('请填写正确的手机号')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
console.log('校验通过', this.projectParams, this.subSort)
|
console.log('校验通过', this.projectParams, this.subSort)
|
||||||
// 1. 表单校验通过后调后台 Api
|
// 1. 表单校验通过后调后台 Api
|
||||||
if(this.subSort === 1) {
|
if(this.subSort === 1) {
|
||||||
addProjectApi(this.projectParams).then(res => {
|
addProjectApi(this.projectParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
/* if(res.code === 200) {
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$emit('closeDialog', true)
|
||||||
} else {
|
|
||||||
this.$modal.msgError(res.msg)
|
|
||||||
} */
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
} else if(this.subSort === 2) {
|
} else if(this.subSort === 2) {
|
||||||
editProjectApi(this.projectParams).then(res => {
|
editProjectApi(this.projectParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
/* if(res.code === 200) {
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$emit('closeDialog', true)
|
||||||
} else {
|
|
||||||
this.$modal.msgError(res.message)
|
|
||||||
} */
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
|
||||||
this.$emit('closeDialog', true)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ export const formLabel = [
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'name', t_label: '工程项目名称', },
|
{ t_props: 'name', t_label: '工程项目名称', },
|
||||||
{ t_props: 'impUnit', t_label: '实施单位' },
|
{ t_props: 'impUnit', t_label: '实施单位', t_slot: 'impUnit' },
|
||||||
{ t_props: 'projectTypeName', t_label: '工程类型' },
|
{ t_props: 'projectTypeName', t_label: '工程类型' },
|
||||||
{ t_props: 'proId', t_label: 'i8工程id', },
|
{ t_props: 'proId', t_label: 'i8工程id', },
|
||||||
{ t_props: 'isMatch', t_label: '是否匹配i8工程', t_slot: 'isMatch' },
|
{ t_props: 'isMatch', t_label: '是否匹配i8工程', t_slot: 'isMatch' },
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,9 @@
|
||||||
<template slot="phone" slot-scope="{ data }">
|
<template slot="phone" slot-scope="{ data }">
|
||||||
{{ phoneCrypto(data.phone) }}
|
{{ phoneCrypto(data.phone) }}
|
||||||
</template>
|
</template>
|
||||||
|
<template slot="impUnit" slot-scope="{ data }">
|
||||||
|
{{ data.impUnitName }}
|
||||||
|
</template>
|
||||||
</TableModel>
|
</TableModel>
|
||||||
|
|
||||||
<!-- 新增以及修改时的弹框 -->
|
<!-- 新增以及修改时的弹框 -->
|
||||||
|
|
|
||||||
|
|
@ -86,19 +86,21 @@ export default {
|
||||||
// 1. 表单校验通过后调后台 Api
|
// 1. 表单校验通过后调后台 Api
|
||||||
if(this.subSort === 1) {
|
if(this.subSort === 1) {
|
||||||
addUnitTypeApi(this.unitsTypeParams).then(res => {
|
addUnitTypeApi(this.unitsTypeParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
} else if(this.subSort === 2) {
|
} else if(this.subSort === 2) {
|
||||||
editUnitTypeApi(this.unitsTypeParams).then(res => {
|
editUnitTypeApi(this.unitsTypeParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
|
||||||
this.$emit('closeDialog', true)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
export const formLabel = [
|
export const formLabel = [
|
||||||
{ f_label: '单位名称', f_model: 'name', f_type: 'ipt' },
|
{ f_label: '类型名称', f_model: 'name', f_type: 'ipt' },
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'name', t_label: '单位类型', },
|
{ t_props: 'name', t_label: '单位类型', },
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,11 @@ export default {
|
||||||
console.log(this.editParams)
|
console.log(this.editParams)
|
||||||
if (this.editParams) {
|
if (this.editParams) {
|
||||||
Object.assign(this.supplierParams, this.editParams)
|
Object.assign(this.supplierParams, this.editParams)
|
||||||
|
this.fileList = []
|
||||||
|
this.fileList.push({
|
||||||
|
name: this.supplierParams.picUrl,
|
||||||
|
url: this.supplierParams.picUrl
|
||||||
|
})
|
||||||
this.subSort = 2
|
this.subSort = 2
|
||||||
} else {
|
} else {
|
||||||
this.subSort = 1
|
this.subSort = 1
|
||||||
|
|
@ -185,20 +190,22 @@ export default {
|
||||||
// 1. 表单校验通过后调后台 Api
|
// 1. 表单校验通过后调后台 Api
|
||||||
if(this.subSort === 1) {
|
if(this.subSort === 1) {
|
||||||
addSupplierListApi(this.supplierParams).then(res => {
|
addSupplierListApi(this.supplierParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
} else if(this.subSort === 2) {
|
} else if(this.subSort === 2) {
|
||||||
console.log(this.supplierParams)
|
|
||||||
updateSupplierListApi(this.supplierParams).then(res => {
|
updateSupplierListApi(this.supplierParams).then(res => {
|
||||||
console.log(res)
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
|
||||||
this.$emit('closeDialog', true)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,18 @@ export const commonMixin = {
|
||||||
},
|
},
|
||||||
/** 编辑 */
|
/** 编辑 */
|
||||||
handleEditData(data) {
|
handleEditData(data) {
|
||||||
|
this.disableForm = false
|
||||||
this.editParams = data
|
this.editParams = data
|
||||||
this.dialogConfig.outerTitle = this.editDialogTitle
|
this.dialogConfig.outerTitle = this.editDialogTitle
|
||||||
this.dialogConfig.outerVisible = true
|
this.dialogConfig.outerVisible = true
|
||||||
},
|
},
|
||||||
|
/** 查看 */
|
||||||
|
handleSee(data) {
|
||||||
|
this.disableForm = true
|
||||||
|
this.editParams = data
|
||||||
|
this.dialogConfig.outerTitle = this.seeDialogTitle
|
||||||
|
this.dialogConfig.outerVisible = true
|
||||||
|
},
|
||||||
/** 导入数据 */
|
/** 导入数据 */
|
||||||
handleImportData() {
|
handleImportData() {
|
||||||
console.log('导入--')
|
console.log('导入--')
|
||||||
|
|
|
||||||
|
|
@ -79,17 +79,17 @@ export default {
|
||||||
// 1. 表单校验通过后调后台 Api
|
// 1. 表单校验通过后调后台 Api
|
||||||
if(this.subSort === 1) {
|
if(this.subSort === 1) {
|
||||||
addStorageListApi(this.storageParams).then(res => {
|
addStorageListApi(this.storageParams).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$modal.msgSuccess('新增成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
} else if(this.subSort === 2) {
|
} else if(this.subSort === 2) {
|
||||||
updateStorageListApi(this.storageParams).then(res => {
|
updateStorageListApi(this.storageParams).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
}).catch(err => {})
|
|
||||||
}
|
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
this.$emit('closeDialog', true)
|
this.$emit('closeDialog', true)
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ export const formLabel = [
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'name', t_label: '仓库名称', },
|
{ t_props: 'name', t_label: '仓库名称', },
|
||||||
{ t_props: 'typeId', t_label: '实物库' },
|
/* { t_props: 'typeId', t_label: '实物库' },
|
||||||
{ t_props: 'companyId', t_label: '地理位置' },
|
{ t_props: 'companyId', t_label: '地理位置' }, */
|
||||||
{ t_props: 'remark', t_label: '备注' },
|
{ t_props: 'remark', t_label: '备注' },
|
||||||
]
|
]
|
||||||
export const dialogConfig = {
|
export const dialogConfig = {
|
||||||
|
|
|
||||||
|
|
@ -12,20 +12,20 @@
|
||||||
<el-button type="primary" @click="handleAddData()"
|
<el-button type="primary" @click="handleAddData()"
|
||||||
>新建</el-button
|
>新建</el-button
|
||||||
>
|
>
|
||||||
<el-button type="success"
|
<!-- <el-button type="success"
|
||||||
>配置</el-button
|
>配置</el-button
|
||||||
>
|
>-->
|
||||||
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
<el-button @click="handleExportData(queryParams, 'base/maHouse/export', '仓库清单')"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="handle" slot-scope="{ data }">
|
<template slot="handle" slot-scope="{ data }">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
size="mini"
|
size="mini"
|
||||||
>解绑</el-button
|
>解绑</el-button
|
||||||
>
|
>-->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,20 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物资名称" prop="typeId">
|
<el-form-item label="物资名称" prop="typeId">
|
||||||
<treeselect
|
<!-- <treeselect
|
||||||
v-model="storageConfigParams.typeId"
|
v-model="storageConfigParams.typeId"
|
||||||
:options="typeRange"
|
:options="typeRange"
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
noOptionsText="没有数据"
|
noOptionsText="没有数据"
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择所属上级"
|
placeholder="请选择所属上级"
|
||||||
|
/>-->
|
||||||
|
<el-cascader
|
||||||
|
v-model="storageConfigParams.typeId"
|
||||||
|
:options="typeRange"
|
||||||
|
:show-all-levels="false"
|
||||||
|
@change="handleCas"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|
@ -120,12 +127,25 @@ export default {
|
||||||
})
|
})
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
},
|
},
|
||||||
|
handleCas(e) {
|
||||||
|
this.storageConfigParams.typeId = e[e.length - 1]
|
||||||
|
},
|
||||||
/** 初始化获取类型下拉 */
|
/** 初始化获取类型下拉 */
|
||||||
getTypeRange() {
|
getTypeRange() {
|
||||||
queryMaTypeTreeListApi().then(res => {
|
queryMaTypeTreeListApi().then(res => {
|
||||||
this.typeRange = res.data
|
this.typeRange = this.changeTree(res.data)
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
},
|
},
|
||||||
|
/** 改变树结构 */
|
||||||
|
changeTree(leaf) {
|
||||||
|
leaf.map(item => {
|
||||||
|
item.value = item.id
|
||||||
|
if(item.children) {
|
||||||
|
this.changeTree(item.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return leaf
|
||||||
|
},
|
||||||
/** 确认按钮 */
|
/** 确认按钮 */
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.$refs.contactUnitsParamsRef.validate((valid) => {
|
this.$refs.contactUnitsParamsRef.validate((valid) => {
|
||||||
|
|
@ -134,17 +154,17 @@ export default {
|
||||||
// 1. 表单校验通过后调后台 Api
|
// 1. 表单校验通过后调后台 Api
|
||||||
if(this.subSort === 1) {
|
if(this.subSort === 1) {
|
||||||
addStorageConfigListApi(this.storageConfigParams).then(res => {
|
addStorageConfigListApi(this.storageConfigParams).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$modal.msgSuccess('新增成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
} else if(this.subSort === 2) {
|
} else if(this.subSort === 2) {
|
||||||
updateStorageConfigListApi(this.storageConfigParams).then(res => {
|
updateStorageConfigListApi(this.storageConfigParams).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
}).catch(err => {})
|
|
||||||
}
|
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
this.$emit('closeDialog', true)
|
this.$emit('closeDialog', true)
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
export const formLabel = [
|
export const formLabel = [
|
||||||
{ f_label: '关键字', f_model: 'houseId', f_type: 'ipt' },
|
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'houseName', t_label: '仓库名称', },
|
{ t_props: 'houseName', t_label: '仓库名称', },
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<el-button type="primary" @click="handleAddData()"
|
<el-button type="primary" @click="handleAddData()"
|
||||||
>新建</el-button
|
>新建</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
<el-button @click="handleExportData(queryParams, 'base/ma_house_set/export', '仓库物资配置清单')"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,7 @@
|
||||||
:model="typeEditParamsLv4"
|
:model="typeEditParamsLv4"
|
||||||
:rules="typeEditParamsLv4Rules"
|
:rules="typeEditParamsLv4Rules"
|
||||||
v-if="subSort === 2 && editParams.level === '4'"
|
v-if="subSort === 2 && editParams.level === '4'"
|
||||||
|
:disabled="ifDisabled"
|
||||||
>
|
>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -330,9 +331,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>-->
|
</el-col>-->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计量单位" prop="unitId">
|
<el-form-item label="计量单位" prop="unitName">
|
||||||
<!-- <el-input v-model="typeEditParamsLv4.unitName" />-->
|
<!-- <el-input v-model="typeEditParamsLv4.unitName" />-->
|
||||||
<el-select v-model="typeEditParamsLv4.unitId">
|
<el-select
|
||||||
|
v-model="typeEditParamsLv4.unitName"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in meterRange"
|
v-for="item in meterRange"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
|
@ -369,7 +372,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 编辑-按钮群 -->
|
<!-- 编辑-按钮群 -->
|
||||||
<div
|
<div
|
||||||
v-if="subSort === 2"
|
v-if="subSort === 2 && ifDisabled === false"
|
||||||
style="display: flex; justify-content: right"
|
style="display: flex; justify-content: right"
|
||||||
>
|
>
|
||||||
<el-button type="success" @click="onSubmitEdit()">确认</el-button>
|
<el-button type="success" @click="onSubmitEdit()">确认</el-button>
|
||||||
|
|
@ -411,6 +414,10 @@ export default {
|
||||||
treeMethod: {
|
treeMethod: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => null
|
default: () => null
|
||||||
|
},
|
||||||
|
ifDisabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -457,15 +464,19 @@ export default {
|
||||||
switch(this.sendData.level) {
|
switch(this.sendData.level) {
|
||||||
case 0:
|
case 0:
|
||||||
this.typeParamsLv0.code = res.data.code
|
this.typeParamsLv0.code = res.data.code
|
||||||
|
this.typeParamsLv0.parentId = this.sendData.id
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.typeParamsLv1.code = res.data.code
|
this.typeParamsLv1.code = res.data.code
|
||||||
|
this.typeParamsLv1.parentId = this.sendData.id
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.typeParamsLv2.code = res.data.code
|
this.typeParamsLv2.code = res.data.code
|
||||||
|
this.typeParamsLv2.parentId = this.sendData.id
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.typeParamsLv3.code = res.data.code
|
this.typeParamsLv3.code = res.data.code
|
||||||
|
this.typeParamsLv3.parentId = this.sendData.id
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
|
|
@ -540,6 +551,7 @@ export default {
|
||||||
manageType: undefined, // 管理方式
|
manageType: undefined, // 管理方式
|
||||||
// checkRate: undefined, // 抽检比例
|
// checkRate: undefined, // 抽检比例
|
||||||
unitId: undefined, // 计量单位
|
unitId: undefined, // 计量单位
|
||||||
|
unitName: undefined
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
// 租赁单位下拉框
|
// 租赁单位下拉框
|
||||||
|
|
@ -703,6 +715,8 @@ export default {
|
||||||
this.typeParamsLv0.level = this.sendData.level
|
this.typeParamsLv0.level = this.sendData.level
|
||||||
submitAddForm(this.typeParamsLv0).then(res => {
|
submitAddForm(this.typeParamsLv0).then(res => {
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$modal.msgSuccess('新增成功')
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
|
this.treeMethod()
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
@ -710,6 +724,8 @@ export default {
|
||||||
this.typeParamsLv1.level = this.sendData.level
|
this.typeParamsLv1.level = this.sendData.level
|
||||||
submitAddForm(this.typeParamsLv1).then(res => {
|
submitAddForm(this.typeParamsLv1).then(res => {
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$modal.msgSuccess('新增成功')
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
|
this.treeMethod()
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
@ -717,6 +733,8 @@ export default {
|
||||||
this.typeParamsLv2.level = this.sendData.level
|
this.typeParamsLv2.level = this.sendData.level
|
||||||
submitAddForm(this.typeParamsLv2).then(res => {
|
submitAddForm(this.typeParamsLv2).then(res => {
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$modal.msgSuccess('新增成功')
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
|
this.treeMethod()
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
@ -729,13 +747,11 @@ export default {
|
||||||
this.typeParamsLv3.storageNum = Number(this.typeParamsLv3.storageNum) * this.storageDex
|
this.typeParamsLv3.storageNum = Number(this.typeParamsLv3.storageNum) * this.storageDex
|
||||||
submitAddForm(this.typeParamsLv3).then(res => {
|
submitAddForm(this.typeParamsLv3).then(res => {
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$modal.msgSuccess('新增成功')
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
|
this.treeMethod()
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
|
||||||
this.$emit('closeDialog', true)
|
|
||||||
// this.$emit('treeMethod')
|
|
||||||
this.treeMethod()
|
|
||||||
/* this.$refs.typeEditParamsRef.validate((valid) => {
|
/* this.$refs.typeEditParamsRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log('校验通过', this.typeEditParams)
|
console.log('校验通过', this.typeEditParams)
|
||||||
|
|
@ -767,6 +783,8 @@ export default {
|
||||||
if(valid) {
|
if(valid) {
|
||||||
submitEditForm(this.typeEditParamsLv1).then(res => {
|
submitEditForm(this.typeEditParamsLv1).then(res => {
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
|
this.treeMethod()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -776,6 +794,8 @@ export default {
|
||||||
if(valid) {
|
if(valid) {
|
||||||
submitEditForm(this.typeEditParamsLv2).then(res => {
|
submitEditForm(this.typeEditParamsLv2).then(res => {
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
|
this.treeMethod()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -785,6 +805,8 @@ export default {
|
||||||
if(valid) {
|
if(valid) {
|
||||||
submitEditForm(this.typeEditParamsLv3).then(res => {
|
submitEditForm(this.typeEditParamsLv3).then(res => {
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
|
this.treeMethod()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -794,18 +816,18 @@ export default {
|
||||||
this.typeEditParamsLv4.buyPrice = Number(this.typeEditParamsLv4.buyPrice) * this.priceDex
|
this.typeEditParamsLv4.buyPrice = Number(this.typeEditParamsLv4.buyPrice) * this.priceDex
|
||||||
this.typeEditParamsLv4.leasePrice = Number(this.typeEditParamsLv4.leasePrice) * this.priceDex
|
this.typeEditParamsLv4.leasePrice = Number(this.typeEditParamsLv4.leasePrice) * this.priceDex
|
||||||
this.typeEditParamsLv4.storageNum = Number(this.typeEditParamsLv4.storageNum) * this.storageDex
|
this.typeEditParamsLv4.storageNum = Number(this.typeEditParamsLv4.storageNum) * this.storageDex
|
||||||
|
this.typeEditParamsLv4.unitId = this.typeEditParamsLv4.unitName
|
||||||
this.$refs.typeEditParamsRefLv4.validate(valid => {
|
this.$refs.typeEditParamsRefLv4.validate(valid => {
|
||||||
if(valid) {
|
if(valid) {
|
||||||
submitEditForm(this.typeEditParamsLv4).then(res => {
|
submitEditForm(this.typeEditParamsLv4).then(res => {
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
|
this.treeMethod()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
|
||||||
this.$emit('closeDialog', true)
|
|
||||||
this.treeMethod()
|
|
||||||
/* this.$refs.typeEditParamsRef.validate((valid) => {
|
/* this.$refs.typeEditParamsRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log('校验通过', this.typeEditParams)
|
console.log('校验通过', this.typeEditParams)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
export const formLabel = [
|
export const formLabel = [
|
||||||
{ f_label: '类型名称', f_model: 'typeName', f_type: 'ipt' },
|
{ f_label: '关键词', f_model: 'keyWord', f_type: 'ipt' },
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'code', t_label: '类型编码', },
|
{ t_props: 'code', t_label: '类型编码', },
|
||||||
{ t_props: 'typeId', t_label: '仓库信息' },
|
// { t_props: 'typeId', t_label: '仓库信息' },
|
||||||
{ t_props: 'constructionType', t_label: '施工类型' },
|
{ t_props: 'constructionType', t_label: '施工类型' },
|
||||||
{ t_props: 'materialType', t_label: '物资类型', },
|
{ t_props: 'materialType', t_label: '物资类型', },
|
||||||
{ t_props: 'materialName', t_label: '物资名称', },
|
{ t_props: 'materialName', t_label: '物资名称', },
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@
|
||||||
type="info"
|
type="info"
|
||||||
size="mini"
|
size="mini"
|
||||||
v-if="data.level === '4'"
|
v-if="data.level === '4'"
|
||||||
|
@click="handleSee(data)"
|
||||||
>查看</el-button
|
>查看</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -87,6 +88,7 @@
|
||||||
:sendData="transData"
|
:sendData="transData"
|
||||||
:sendInfo="transInfo"
|
:sendInfo="transInfo"
|
||||||
:treeMethod="getTreeData"
|
:treeMethod="getTreeData"
|
||||||
|
:if-disabled="disableForm"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</DialogModel>
|
</DialogModel>
|
||||||
|
|
@ -155,11 +157,14 @@ export default {
|
||||||
formLabel,
|
formLabel,
|
||||||
columnsList,
|
columnsList,
|
||||||
dialogConfig,
|
dialogConfig,
|
||||||
|
// 禁用表单
|
||||||
|
disableForm: false,
|
||||||
// 新建时弹框标题
|
// 新建时弹框标题
|
||||||
addDialogTitle: '新增物资类型',
|
addDialogTitle: '新增物资类型',
|
||||||
// 修改时弹框标题
|
// 修改时弹框标题
|
||||||
editDialogTitle: '修改物资类型',
|
editDialogTitle: '修改物资类型',
|
||||||
|
// 查看时弹框标题
|
||||||
|
seeDialogTitle: '查看物资类型',
|
||||||
/** 树形组件数据 */
|
/** 树形组件数据 */
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
|
|
||||||
|
|
@ -9,23 +9,37 @@
|
||||||
:rules="userConfigParamsRules"
|
:rules="userConfigParamsRules"
|
||||||
>
|
>
|
||||||
<el-form-item label="人员名称" prop="userId">
|
<el-form-item label="人员名称" prop="userId">
|
||||||
<treeselect
|
<!-- <treeselect
|
||||||
v-model="userConfigParams.userId"
|
v-model="userConfigParams.userId"
|
||||||
:options="userConfigRange"
|
:options="userConfigRange"
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
noOptionsText="没有数据"
|
noOptionsText="没有数据"
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择所属上级"
|
placeholder="请选择所属上级"
|
||||||
|
/>-->
|
||||||
|
<el-cascader
|
||||||
|
v-model="userConfigParams.userId"
|
||||||
|
:options="userConfigRange"
|
||||||
|
:show-all-levels="false"
|
||||||
|
@change="handleCasUser"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物资名称" prop="typeId">
|
<el-form-item label="物资名称" prop="typeId">
|
||||||
<treeselect
|
<!-- <treeselect
|
||||||
v-model="userConfigParams.typeId"
|
v-model="userConfigParams.typeId"
|
||||||
:options="typeRange"
|
:options="typeRange"
|
||||||
noChildrenText="没有数据了"
|
noChildrenText="没有数据了"
|
||||||
noOptionsText="没有数据"
|
noOptionsText="没有数据"
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
placeholder="请选择所属上级"
|
placeholder="请选择所属上级"
|
||||||
|
/>-->
|
||||||
|
<el-cascader
|
||||||
|
v-model="userConfigParams.typeId"
|
||||||
|
:options="typeRange"
|
||||||
|
:show-all-levels="false"
|
||||||
|
@change="handleCasType"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|
@ -109,10 +123,45 @@ export default {
|
||||||
async getRanges() {
|
async getRanges() {
|
||||||
// 获取物资类型下拉
|
// 获取物资类型下拉
|
||||||
let typeRes = await queryMaTypeTreeListApi()
|
let typeRes = await queryMaTypeTreeListApi()
|
||||||
this.typeRange = typeRes.data
|
this.typeRange = this.changeTree(typeRes.data)
|
||||||
// 获取人员下拉
|
// 获取人员下拉
|
||||||
let userRes = await getUserSelApi()
|
let userRes = await getUserSelApi()
|
||||||
this.userConfigRange = userRes.data
|
// 调整选级
|
||||||
|
userRes.data.forEach(lv1 => {
|
||||||
|
if(!lv1.children) {
|
||||||
|
lv1.disabled = true
|
||||||
|
} else {
|
||||||
|
lv1.children.forEach(lv2 => {
|
||||||
|
if(!lv2.children) {
|
||||||
|
lv2.disabled = true
|
||||||
|
} else {
|
||||||
|
lv2.children.forEach(lv3 => {
|
||||||
|
if(!lv3.children) {
|
||||||
|
lv3.disabled = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.userConfigRange = this.changeTree(userRes.data)
|
||||||
|
},
|
||||||
|
/** 级联选择器改变 */
|
||||||
|
handleCasUser(e) {
|
||||||
|
this.userConfigParams.userId = e[e.length - 1]
|
||||||
|
},
|
||||||
|
handleCasType(e) {
|
||||||
|
this.userConfigParams.typeId = e[e.length - 1]
|
||||||
|
},
|
||||||
|
/** 改变树结构 */
|
||||||
|
changeTree(leaf) {
|
||||||
|
leaf.map(item => {
|
||||||
|
item.value = item.id
|
||||||
|
if(item.children) {
|
||||||
|
this.changeTree(item.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return leaf
|
||||||
},
|
},
|
||||||
/** 树禁选父级 */
|
/** 树禁选父级 */
|
||||||
changeData(data) { // 存在子集就不让禁止,父级让禁止
|
changeData(data) { // 存在子集就不让禁止,父级让禁止
|
||||||
|
|
@ -134,17 +183,18 @@ export default {
|
||||||
// 1. 表单校验通过后调后台 Api
|
// 1. 表单校验通过后调后台 Api
|
||||||
if(this.subSort === 1) {
|
if(this.subSort === 1) {
|
||||||
addUserConfigListApi(this.userConfigParams).then(res => {
|
addUserConfigListApi(this.userConfigParams).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$modal.msgSuccess('新增成功')
|
||||||
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
|
this.$emit('closeDialog', true)
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
} else if(this.subSort === 2) {
|
} else if(this.subSort === 2) {
|
||||||
updateUserConfigListApi(this.userConfigParams).then(res => {
|
updateUserConfigListApi(this.userConfigParams).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
}).catch(err => {})
|
|
||||||
}
|
|
||||||
// 2. 成功之后通知父组件关闭弹框
|
// 2. 成功之后通知父组件关闭弹框
|
||||||
this.$emit('closeDialog', true)
|
this.$emit('closeDialog', true)
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
export const formLabel = [
|
export const formLabel = [
|
||||||
{ f_label: '关键字', f_model: 'houseId', f_type: 'ipt' },
|
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'userName', t_label: '人员名称', },
|
{ t_props: 'userName', t_label: '人员名称', },
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<el-button type="primary" @click="handleAddData()"
|
<el-button type="primary" @click="handleAddData()"
|
||||||
>新建</el-button
|
>新建</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
<el-button @click="handleExportData(queryParams, 'base/ma_user_set/export', '物资人员配置清单')"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue