From 6f7dee5d5b8d0b62d31f755f9727d2420842b17e Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Thu, 30 May 2024 16:23:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=9F=A5=E8=AF=A2=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yxt-as-ui/src/api/Common/dictcommons.js | 20 + yxt-as-ui/src/api/storage/adjustment.js | 44 +++ .../storage/adjustment/adjustmentAdd.vue | 265 +++++++++++++ .../storage/adjustment/adjustmentInfo.vue | 155 ++++++++ .../src/views/storage/adjustment/index.vue | 361 +++++++++++++++++- .../adjustment/relation/choosecategory.vue | 181 +++++++++ .../adjustment/relation/editPriceStrategy.vue | 176 +++++++++ .../views/storage/receivingGoods/index.vue | 12 +- .../receivingGoods/receivingGoodsAdd.vue | 32 +- 9 files changed, 1235 insertions(+), 11 deletions(-) create mode 100644 yxt-as-ui/src/api/storage/adjustment.js create mode 100644 yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue create mode 100644 yxt-as-ui/src/views/storage/adjustment/adjustmentInfo.vue create mode 100644 yxt-as-ui/src/views/storage/adjustment/relation/choosecategory.vue create mode 100644 yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue diff --git a/yxt-as-ui/src/api/Common/dictcommons.js b/yxt-as-ui/src/api/Common/dictcommons.js index 4392f2ae9b..e7c9d3ad71 100644 --- a/yxt-as-ui/src/api/Common/dictcommons.js +++ b/yxt-as-ui/src/api/Common/dictcommons.js @@ -8,6 +8,15 @@ export function typeValues(data) { }) } +// 获取数据字典(根据分组) +export function getTypeValueList(data) { + return request({ + url: '/portal/v1/dictcommons/getTypeValueList', + method: 'get', + params: data + }) +} + // 根据当前登录人orgSidPath(全路径sid)查询分公司 export function getOrgSidByPath(data) { return request({ @@ -182,3 +191,14 @@ export function getAsBusrepairBill(params) { } }) } +// 查询分页列表 --商品类别列表 +export function getGoodsCategory(params) { + return request({ + url: '/as/v1/AsBusrepairBill/listPage', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) +} diff --git a/yxt-as-ui/src/api/storage/adjustment.js b/yxt-as-ui/src/api/storage/adjustment.js new file mode 100644 index 0000000000..e13a9ad43d --- /dev/null +++ b/yxt-as-ui/src/api/storage/adjustment.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +export default { + +// 查询分页列表 + listPage: function(params) { + return request({ + url: '/wms/apiadmin/WmsShelfBill/listPage', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + + // 初始化 + init: function(data) { + return request({ + url: '/wms/apiadmin/WmsShelfBill/details?sid='+data, + method: 'get' + }); + }, + + + // 新增、保存 + save: function(data) { + return request({ + url: '/wms/apiadmin/WmsShelfBill/saveOrUpdate', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }); + }, + + + deleteBySids: function(data) { + return request({ + url: '/wms/apiadmin/WmsShelfBill/delBySids', + method: 'DELETE', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + +} diff --git a/yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue b/yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue new file mode 100644 index 0000000000..3421b499bb --- /dev/null +++ b/yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue @@ -0,0 +1,265 @@ + + + + diff --git a/yxt-as-ui/src/views/storage/adjustment/adjustmentInfo.vue b/yxt-as-ui/src/views/storage/adjustment/adjustmentInfo.vue new file mode 100644 index 0000000000..5723181132 --- /dev/null +++ b/yxt-as-ui/src/views/storage/adjustment/adjustmentInfo.vue @@ -0,0 +1,155 @@ + + + + diff --git a/yxt-as-ui/src/views/storage/adjustment/index.vue b/yxt-as-ui/src/views/storage/adjustment/index.vue index 02409e35d2..32668945f7 100644 --- a/yxt-as-ui/src/views/storage/adjustment/index.vue +++ b/yxt-as-ui/src/views/storage/adjustment/index.vue @@ -1,8 +1,363 @@ + import Pagination from '@/components/pagination' + import pageye from '@/components/pagination/pageye' + import ButtonBar from '@/components/ButtonBar' + import req from '@/api/storage/adjustment.js' + import { + typeValues + } from '@/api/Common/dictcommons' + import { + getStorage + } from '@/utils/auth' + import adjustmentAdd from './adjustmentAdd' + import adjustmentInfo from './adjustmentInfo' - \ No newline at end of file + export default { + name: 'Procurement', + components: { + Pagination, + pageye, + ButtonBar, + adjustmentAdd, + adjustmentInfo + }, + data() { + return { + url: '', + dialogHeight: '80%', + centerDialogVisible: false, + btndisabled: false, + btnList: [{ + type: 'primary', + size: 'small', + icon: 'plus', + btnKey: 'toAdd', + btnLabel: '新增' + }, + { + type: 'danger', + size: 'small', + icon: 'del', + btnKey: 'doDel', + btnLabel: '删除' + }, + { + type: 'info', + size: 'small', + icon: 'cross', + btnKey: 'doClose', + btnLabel: '关闭' + } + ], + isSearchShow: false, + searchxianshitit: '显示查询条件', + viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 + tableKey: 0, + list: [], + sids: [], // 用于导出的时候保存已选择的SIDs + billType_list: [], + FormLoading: false, + listLoading: false, + // 翻页 + listQuery: { + current: 1, + size: 5, + total: 0, + params: { + createOrgName: '', + deptName: '', + createByName: '', + billNo: '', + createStartTime: '', + createEndTime: '', + finishStartTime: '', + finishEndTime: '', + } + } + } + }, + created() { + // 初始化变量 + // this.getList() + }, + mounted() { + // 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage + window.addEventListener('message', this.handleMessage) + this.$refs['btnbar'].setButtonList(this.btnList) + }, + methods: { + init() { + typeValues({ + type: 'billType' + }).then((res) => { + if (res.success) { + this.billType_list = res.data + } + }) + }, + async handleMessage(event) { + var code = '' + if (event.data.params !== null && event.data.params !== undefined) { + code = event.data.params.code + } + if (code === 1) { + this.centerDialogVisible = false + } else if (code === 2) { + this.dialogHeight = event.data.params.data + this.setIframeHeight(document.getElementById('iframe')) + } + }, + closeIt() { + this.url = '' + this.centerDialogVisible = false + }, + setIframeHeight(iframe) { + iframe.height = this.dialogHeight + }, + flowRecord(row) { + this.centerDialogVisible = true + var params = { + deployId: row.procDefId, + procInsId: row.procInstId, + token: getStorage() + } + this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params))) + }, + // 搜索条件效果 + clicksearchShow() { + this.isSearchShow = !this.isSearchShow + if (this.isSearchShow) { + this.searchxianshitit = '隐藏查询条件' + } else { + this.searchxianshitit = '显示查询条件' + } + }, + btnHandle(btnKey) { + console.log('XXXXXXXXXXXXXXX ' + btnKey) + switch (btnKey) { + case 'toAdd': + this.toAdd() + break + case 'doDel': + this.doDel() + break + case 'doClose': + this.doClose() + break + default: + break + } + }, + // 信息条数 获取点击时当前的sid + handleSelectionChange(row) { + const aa = [] + row.forEach(element => { + aa.push(element.sid) + }) + this.sids = aa + }, + // 表中序号 + indexMethod(index) { + var pagestart = (this.listQuery.current - 1) * this.listQuery.size + var pageindex = index + 1 + pagestart + return pageindex + }, + // 查询列表信息 + getList() { + this.listLoading = true + this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') + req.listPage(this.listQuery).then((response) => { + this.listLoading = false + if (response.success) { + this.list = response.data.records + this.listQuery.total = response.data.total + } else { + this.list = [] + this.listQuery.total = 0 + } + }) + }, + // 查询按钮 + handleFilter() { + this.listQuery.current = 1 + this.getList() + }, + // 点击重置 + handleReset() { + this.listQuery = { + current: 1, + size: 5, + total: 0, + params: { + createOrgName: '', + deptName: '', + createByName: '', + billNo: '', + createStartTime: '', + createEndTime: '', + finishStartTime: '', + finishEndTime: '', + } + } + this.init() + }, + toAdd(){ + this.viewState = 3 + this.$refs['divAdd'].showAdd() + }, + toEdit(row) { + this.viewState = 3 + this.$refs['divAdd'].showEdit(row) + }, + toInfo(row) { + this.viewState = 4 + this.$refs['divInfo'].showInfo(row) + }, + doDel() { + if (this.sids.length === 0) { + this.$message({ + showClose: true, + type: 'error', + message: '请选择至少一条记录进行删除操作' + }) + return + } + const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' + this.$confirm(tip, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + req.deleteBySids(this.sids).then(resp => { + if (resp.success) { + this.$message({ + type: 'success', + message: resp.msg, + showClose: true + }) + } + this.getList() + loading.close() + }).catch(e => { + loading.close() + }) + }).catch(() => {}) + }, + // 修改、编辑、详情返回列表页面 + resetState() { + this.viewState = 1 + }, + doClose() { + this.$store.dispatch('tagsView/delView', this.$route) + this.$router.go(-1) + } + } + } + + diff --git a/yxt-as-ui/src/views/storage/adjustment/relation/choosecategory.vue b/yxt-as-ui/src/views/storage/adjustment/relation/choosecategory.vue new file mode 100644 index 0000000000..4ab047bd68 --- /dev/null +++ b/yxt-as-ui/src/views/storage/adjustment/relation/choosecategory.vue @@ -0,0 +1,181 @@ + + + + diff --git a/yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue b/yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue new file mode 100644 index 0000000000..4fb2dd5993 --- /dev/null +++ b/yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue @@ -0,0 +1,176 @@ + + + + diff --git a/yxt-as-ui/src/views/storage/receivingGoods/index.vue b/yxt-as-ui/src/views/storage/receivingGoods/index.vue index b6b9ab3e6f..d00d1218dd 100644 --- a/yxt-as-ui/src/views/storage/receivingGoods/index.vue +++ b/yxt-as-ui/src/views/storage/receivingGoods/index.vue @@ -25,7 +25,7 @@ - + @@ -110,6 +110,9 @@ import divAdd from './receivingGoodsAdd.vue' import divInfo from './receivingGoodsInfo.vue' import divAddupShelfRecord from './upShelfAddRecord.vue' + import { + getTypeValueList + } from '@/api/Common/dictcommons' export default { components: { ButtonBar, @@ -202,6 +205,13 @@ }, created() { this.loadList() + + getTypeValueList({ type: 'wms_busType', groupNum: 'wms_rk' }).then((res) => { + if (res.success) { + this.busTypeList = res.data + } + }) + }, methods: { saveExamine() { diff --git a/yxt-as-ui/src/views/storage/receivingGoods/receivingGoodsAdd.vue b/yxt-as-ui/src/views/storage/receivingGoods/receivingGoodsAdd.vue index a7ff6ff188..6e3d7be683 100644 --- a/yxt-as-ui/src/views/storage/receivingGoods/receivingGoodsAdd.vue +++ b/yxt-as-ui/src/views/storage/receivingGoods/receivingGoodsAdd.vue @@ -50,7 +50,7 @@
* 业务类型
- + @@ -277,7 +277,8 @@ import chooseproducts from './relation/chooseproducts' import { choiceSupplierInfo, - getOrgSidByPath + getOrgSidByPath, + getTypeValueList } from '@/api/Common/dictcommons' export default { components: { @@ -315,11 +316,15 @@ }, hideUploadBtn: false, busTypeList: [{ - name: "业务类型1", + name: "采购预约", + sid: "0" + }, + { + name: "调拨预约", sid: "1" }, { - name: "业务类型2", + name: "其他预约", sid: "2" } ], @@ -676,6 +681,12 @@ this.$refs['form_obj'].clearValidate() }) + getTypeValueList({ type: 'wms_busType', groupNum: 'wms_rk' }).then((res) => { + if (res.success) { + this.busTypeList = res.data + } + }) + }, showEdit(row) { @@ -689,6 +700,13 @@ this.$refs['form_obj'].clearValidate() }) + getTypeValueList({ type: 'wms_busType', groupNum: 'wms_rk' }).then((res) => { + if (res.success) { + this.busTypeList = res.data + } + }) + + var params = { sid: row.sid @@ -713,10 +731,10 @@ }) }, busTypeSelect(val) { - const choose = this.busTypeList.filter((item) => item.sid == val) + const choose = this.busTypeList.filter((item) => item.dictKey == val) console.log('>>>>>>>>>busTypeSelect', choose) - this.formobj.busTypeKey = choose[0].sid - this.formobj.busTypeValue = choose[0].name + this.formobj.busTypeKey = choose[0].dictKey + this.formobj.busTypeValue = choose[0].dictValue }, supplierNameSelect(val) {