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"> + + - @@ -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 @@ + + + + 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