diff --git a/src/api/base/base.js b/src/api/base/base.js index 0b21d44..0f67109 100644 --- a/src/api/base/base.js +++ b/src/api/base/base.js @@ -165,6 +165,15 @@ export function unitTypeList(query) { params: query }) } + +// 实施单位类型-列表 +export function impUnitTypeList(query) { + return request({ + url: '/system/dept/list', + method: 'get', + params: query + }) +} // 单位类型-列表-下拉 export function unitTypeListAll(query) { return request({ diff --git a/src/api/baseGround/newBuy.js b/src/api/baseGround/newBuy.js new file mode 100644 index 0000000..eb31c5e --- /dev/null +++ b/src/api/baseGround/newBuy.js @@ -0,0 +1,64 @@ +import request from '@/utils/request' + +//机具类型管理列表信息 +export function getListNewBuy(query) { + return request({ + url: '/material/purchase_check_info/list', + method: 'get', + params: query, + }) +} + +//查看机具类型管理列表详细信息 +export function getHouseDetail(id) { + return request({ + url: '/material/wh_house_info/'+ id, + method: 'get', + }) +} + + +// 物资名称下拉框- +export function queryKeeperNameApi(query) { + return request({ + url: '/material/ma_type/selectMaTypeListByTypeId', + method: 'get', + params: query + }) +} + +// 仓库管理--删除 +export function delHouse(id) { + return request({ + url: '/material/wh_house_info/' + id, + method: 'delete', + }) +} + +// 仓库管理--修改 +export function editHouse(data) { + return request({ + url: '/material/wh_house_info', + method: 'put', + data: data, + }) +} + +// 仓库管理--新增 +export function addHouse(data) { + return request({ + url: '/material/wh_house_info', + method: 'post', + data: data, + }) +} + +// 工程项目-列表 +export function getProjectList(query) { + return request({ + url: '/material/base/bmProjectInfo/projectInfoAll', + method: 'get', + params: query + }) +} + diff --git a/src/components/pageHeader/index.vue b/src/components/pageHeader/index.vue new file mode 100644 index 0000000..28ed74b --- /dev/null +++ b/src/components/pageHeader/index.vue @@ -0,0 +1,30 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/views/base/project/index.vue b/src/views/base/project/index.vue index e0410c6..6b48af1 100644 --- a/src/views/base/project/index.vue +++ b/src/views/base/project/index.vue @@ -96,37 +96,41 @@ + prop="isMatchI8" + :show-overflow-tooltip="true"> + + {{ scope.row.isMatchI8 }} + {{ scope.row.isMatchI8 }} + + - - - @@ -201,46 +197,45 @@ maxlength="50" /> - + - + - + + + + + - + - + @@ -276,19 +271,16 @@ maxlength="50" /> - + - + + + + @@ -298,25 +290,22 @@ placeholder="请选择工程性质" style="width: 100%" > - + + + + - + - + @@ -346,7 +335,7 @@ import { updateProject, getProjectUserList, } from '@/api/base/base' -import { unitTypeList } from '@/api/base/base' +import { unitTypeList,impUnitTypeList } from '@/api/base/base' // import { deptTreeSelect } from '@/api/system/user' // import Treeselect from '@riophae/vue-treeselect' // import '@riophae/vue-treeselect/dist/vue-treeselect.css' @@ -374,7 +363,7 @@ export default { projectList: [], //字典数据 typeList: [], - unitList:[], + impUnitList:[], projectStatuses:[], // 部门树选项 deptOptions: undefined, @@ -421,17 +410,40 @@ export default { } }, created() { - // this.getType() + this.getType() // this.getDeptTree() this.getList() }, methods: { - // //获取工程类型 - // getType() { - // unitTypeList({ id: '5' }).then((response) => { - // this.typeList = response.rows - // }) - // }, + //获取工程类型 + getType() { + impUnitTypeList().then((response) => { + let matTypeRes = response.data; + let result=[]; + matTypeRes.forEach(item=>{ + const parts = item.ancestors.split(','); + if(parts.length==2){ + result.push({ + label: item.deptName, + value: item.deptId, + }); + } + }) + + this.impUnitList=result + // this.impUnitList = matTypeRes.map((item) => { + // const parts = item.ancestors.split(','); + // // const extension = parts.pop(); + // if(parts.length==2){ + // return { + // label: item.deptId, + // value: item.deptName, + // }; + // } + // }); + console.log(this.impUnitList) + }) + }, selecType(id) { // this.typeList.forEach(item => { // if(item.id == id){ diff --git a/src/views/base/unit/index.vue b/src/views/base/unit/index.vue index 1baa8af..8a27615 100644 --- a/src/views/base/unit/index.vue +++ b/src/views/base/unit/index.vue @@ -80,20 +80,22 @@ border @selection-change="handleSelectionChange" > - - + + + + + + + + + + @@ -145,7 +147,7 @@ /> - 确 定 取 消 - + --> - - - - - + + + + + - - + + - - + + + + + + + + + + + - - 展开/折叠 - 全选/全不选 - 父子联动 - + + + {{dict.label}} + + + + + @@ -249,6 +235,7 @@ import { statusUnitType, unitTypeDetail, } from '@/api/base/base' +import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data"; export default { name: 'Unit', @@ -298,18 +285,44 @@ export default { }, // 表单校验 rules: { - typeName: [ - { - required: true, - message: '单位类型名称不能为空', - trigger: 'blur', - }, + dictLabel: [ + { required: true, message: "数据标签不能为空", trigger: "blur" } ], - // dictType: [ - // { required: true, message: "字典类型不能为空", trigger: "blur" } - // ] + dictValue: [ + { required: true, message: "数据键值不能为空", trigger: "blur" } + ], + dictSort: [ + { required: true, message: "数据顺序不能为空", trigger: "blur" } + ] }, - roleList:[] + roleList:[], + // 数据标签回显样式 + listClassOptions: [ + { + value: "default", + label: "默认" + }, + { + value: "primary", + label: "主要" + }, + { + value: "success", + label: "成功" + }, + { + value: "info", + label: "信息" + }, + { + value: "warning", + label: "警告" + }, + { + value: "danger", + label: "危险" + } + ], } }, created() { @@ -320,7 +333,7 @@ export default { getList() { this.loading = true unitTypeList(this.queryParams).then((response) => { - this.roleList = response.data.rows + this.roleList = response.data // this.total = response.data.total this.loading = false }) @@ -356,11 +369,19 @@ export default { this.resetForm('queryForm') this.handleQuery() }, - /** 新增按钮操作 */ + // /** 新增按钮操作 */ + // handleAdd() { + // this.reset() + // this.open = true + // this.title = '新增' + // }, + + /** 新增按钮操作 */ handleAdd() { - this.reset() - this.open = true - this.title = '新增' + this.reset(); + this.open = true; + this.title = "添加字典数据"; + this.form.dictType = 'bm_unit_type'; }, // 多选框选中数据 handleSelectionChange(selection) { @@ -368,50 +389,83 @@ export default { this.single = selection.length != 1 this.multiple = !selection.length }, - /** 修改按钮操作 */ + // /** 修改按钮操作 */ + // handleUpdate(row) { + // // this.reset() + // this.form.typeName = row.typeName + // console.log('修改',typeof row.typeId) + // unitTypeDetail(row.typeId).then((response) => { + // // this.form = response.rows[0] + // this.form.typeId=response.data.typeId + // }) + // // this.form = row; + // this.open = true + // this.title = '编辑' + // }, + /** 修改按钮操作 */ handleUpdate(row) { - // this.reset() - this.form.typeName = row.typeName - console.log('修改',typeof row.typeId) - unitTypeDetail(row.typeId).then((response) => { - // this.form = response.rows[0] - this.form.typeId=response.data.typeId - }) - // this.form = row; - this.open = true - this.title = '编辑' + this.reset(); + const dictCode = row.dictCode || this.ids + getData(dictCode).then(response => { + this.form = response.data; + this.open = true; + this.title = "修改"; + }); }, - /** 提交按钮 */ - submitForm: function () { - this.$refs['form'].validate((valid) => { - if (valid) { - this.isLoading = true + // /** 提交按钮 */ + // submitForm: function () { + // this.$refs['form'].validate((valid) => { + // if (valid) { + // this.isLoading = true - if (this.form.typeId != undefined) { - updateUnitType(this.form) - .then((response) => { - this.$modal.msgSuccess('修改成功') - this.open = false - this.isLoading = false - this.getList() - }) - .catch(() => { - this.isLoading = false - }) + // if (this.form.typeId != undefined) { + // updateUnitType(this.form) + // .then((response) => { + // this.$modal.msgSuccess('修改成功') + // this.open = false + // this.isLoading = false + // this.getList() + // }) + // .catch(() => { + // this.isLoading = false + // }) + // } else { + // addUnitType(this.form) + // .then((response) => { + // this.$modal.msgSuccess('新增成功') + // this.open = false + // this.isLoading = false + // this.getList() + // }) + // .catch(() => { + // this.isLoading = false + // }) + // } + // } + // }) + // }, + + /** 提交按钮 */ + submitForm: function() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.dictCode != undefined) { + updateData(this.form).then(response => { + this.$store.dispatch('dict/removeDict', this.queryParams.dictType); + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); } else { - addUnitType(this.form) - .then((response) => { - this.$modal.msgSuccess('新增成功') - this.open = false - this.isLoading = false - this.getList() - }) - .catch(() => { - this.isLoading = false - }) + addData(this.form).then(response => { + this.$store.dispatch('dict/removeDict', this.queryParams.dictType); + this.$modal.msgSuccess("新增成功"); + this.open = false; + this.getList(); + }); } } - }) + }); }, changeStatus(row) { let param = { @@ -422,19 +476,31 @@ export default { this.getList() }) }, - /** 删除按钮操作 */ + // /** 删除按钮操作 */ + // handleDelete(row) { + // const pIds = row.typeId || this.ids + // this.$modal + // .confirm('是否确认删除所选择的数据项?') + // .then(function () { + // return delUnitType(pIds) + // }) + // .then(() => { + // this.getList() + // this.$modal.msgSuccess('删除成功') + // }) + // .catch(() => {}) + // }, + + /** 删除按钮操作 */ handleDelete(row) { - const pIds = row.typeId || this.ids - this.$modal - .confirm('是否确认删除所选择的数据项?') - .then(function () { - return delUnitType(pIds) - }) - .then(() => { - this.getList() - this.$modal.msgSuccess('删除成功') - }) - .catch(() => {}) + const dictCodes = row.dictCode || this.ids; + this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() { + return delData(dictCodes); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("删除成功"); + this.$store.dispatch('dict/removeDict', this.queryParams.dictType); + }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { diff --git a/src/views/newBuy/goodsArrived/component/addTools.vue b/src/views/newBuy/goodsArrived/component/addTools.vue new file mode 100644 index 0000000..423b112 --- /dev/null +++ b/src/views/newBuy/goodsArrived/component/addTools.vue @@ -0,0 +1,822 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 明细 + 删除 + + + + + + + + + + diff --git a/src/views/newBuy/goodsArrived/component/home.vue b/src/views/newBuy/goodsArrived/component/home.vue new file mode 100644 index 0000000..c7800b9 --- /dev/null +++ b/src/views/newBuy/goodsArrived/component/home.vue @@ -0,0 +1,697 @@ + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + 查看 + 编辑 + 验收 + 编码管理 + 验收单 + + 删除 + + + + + + + + + + + + 到货验收单 + + + + 工程名称: + + + 验收单编号:{{ printData.code }} + + + 合同名称: + + + 合同编号: + + + 验收地点: + + + 供应商:{{ + supplierStr + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 接收单位验收意见: + + + 验收人: + + + 接收单位(章): + + + 验收负责人: 年 月 日 + + + + + + 供应商: + + + 供应商(章): + + + 验收负责人: 年 月 日 + + + + + + + + + + + + + diff --git a/src/views/newBuy/goodsArrived/index.vue b/src/views/newBuy/goodsArrived/index.vue new file mode 100644 index 0000000..b926eac --- /dev/null +++ b/src/views/newBuy/goodsArrived/index.vue @@ -0,0 +1,60 @@ + + + + + + + + + \ No newline at end of file