From c88176ffcdd73782e1558da29fb45f463b81dd1e Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Tue, 16 Jul 2024 16:16:41 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=B0=83=E6=8B=A8?=
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/allocation.js | 54 +-
.../adjustment/relation/editPriceStrategy.vue | 17 +-
.../storage/allocation/allocationAdd.vue | 390 ++++++++++-----
.../storage/allocation/allocationInfo.vue | 198 ++++++++
.../src/views/storage/allocation/index.vue | 465 +++++++++++++-----
.../storage/deliveryNotice/receiptAdd.vue | 14 +-
7 files changed, 897 insertions(+), 261 deletions(-)
create mode 100644 yxt-as-ui/src/views/storage/allocation/allocationInfo.vue
diff --git a/yxt-as-ui/src/api/Common/dictcommons.js b/yxt-as-ui/src/api/Common/dictcommons.js
index 505aa1fab1..4dc741125c 100644
--- a/yxt-as-ui/src/api/Common/dictcommons.js
+++ b/yxt-as-ui/src/api/Common/dictcommons.js
@@ -26,6 +26,15 @@ export function selectOrgSidList(data) {
})
}
+// 获取分公司
+export function getListOrg(data) {
+ return request({
+ url: '/portal/v1/sysorganization/getListOrg',
+ method: 'get',
+ params: data
+ })
+}
+
// 根据当前登录人orgSidPath(全路径sid)查询分公司
export function getOrgSidByPath(data) {
@@ -39,11 +48,20 @@ export function getOrgSidByPath(data) {
// 根据分公司sid查询分公司名称
export function fetchBySid(sid) {
return request({
- url: 'portal/v1/sysorganization/fetchBySid/' + sid,
+ url: '/portal/v1/sysorganization/fetchBySid/' + sid,
method: 'get'
})
}
+
+// 根据分公司Sid获取分公司下所有的部门
+export function getListDeptByOrgSid(data) {
+ return request({
+ url: '/portal/v1/sysorganization/getListDeptByOrgSid/' + data,
+ method: 'GET'
+ })
+}
+
// 根据当前登录用户sid获取本分公司下的销售部门和销售专员
export function selectOrgList(data) {
return request({
diff --git a/yxt-as-ui/src/api/storage/allocation.js b/yxt-as-ui/src/api/storage/allocation.js
index d36b8585ef..651de970b6 100644
--- a/yxt-as-ui/src/api/storage/allocation.js
+++ b/yxt-as-ui/src/api/storage/allocation.js
@@ -8,17 +8,43 @@ export default {
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/listPage',
method: 'post',
data: params,
- headers: { 'Content-Type': 'application/json' }
+ headers: {
+ 'Content-Type': 'application/json'
+ }
})
},
+ deleteBySids: function(data) {
+ return request({
+ url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/delBySids',
+ method: 'DELETE',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ })
+ },
+
+ // 保存物流信息
+ saveLogisticsInfo: function(data) {
+ return request({
+ url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/saveLogisticsInfo',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ });
+ },
// 新增、保存
save: function(data) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/save',
method: 'post',
data: data,
- headers: { 'Content-Type': 'application/json' }
+ headers: {
+ 'Content-Type': 'application/json'
+ }
});
},
@@ -36,7 +62,9 @@ export default {
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/allocation',
method: 'post',
data: data,
- headers: { 'Content-Type': 'application/json' }
+ headers: {
+ 'Content-Type': 'application/json'
+ }
});
},
@@ -47,7 +75,9 @@ export default {
url: '/wms/apiadmin/inventory/wmsinventory/alloGoodsListPage',
method: 'post',
data: params,
- headers: { 'Content-Type': 'application/json' }
+ headers: {
+ 'Content-Type': 'application/json'
+ }
})
},
@@ -55,12 +85,12 @@ export default {
getWarehouses: function(params) {
return request({
url: '/wms/apiadmin/base/wmswarehouseinfo/listAll',
- method: 'post',
- data: params,
- headers: {
- 'Content-Type': 'application/json'
- }
- })
+ method: 'post',
+ data: params,
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ })
},
@@ -70,7 +100,9 @@ export default {
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
method: 'get',
params: data,
- headers: { 'Content-Type': 'application/json' }
+ headers: {
+ 'Content-Type': 'application/json'
+ }
});
},
diff --git a/yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue b/yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue
index d6590293f4..1904b9bd35 100644
--- a/yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue
+++ b/yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue
@@ -40,7 +40,8 @@
* 加价比例(%)
-
@@ -66,7 +67,7 @@
+ oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
@@ -74,7 +75,7 @@
+ oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
@@ -82,7 +83,7 @@
+ oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
@@ -133,9 +134,9 @@
}
},
methods: {
- gdMarkupRateInput(val){
- console.log("gdMarkupRateInput》》》》", val)
- console.log("gdMarkupRateInput》》》》", this.formobj.gdMarkupRate)
+ gdMarkupRateInput(val) {
+ console.log("gdMarkupRateInput》》》》", val)
+ console.log("gdMarkupRateInput》》》》", this.formobj.gdMarkupRate)
},
indexMethod(index) {
return index + 1
@@ -151,7 +152,7 @@
this.$message({
showClose: true,
type: 'error',
- message: '加价比例不能为空222'
+ message: '加价比例不能为空'
})
return
diff --git a/yxt-as-ui/src/views/storage/allocation/allocationAdd.vue b/yxt-as-ui/src/views/storage/allocation/allocationAdd.vue
index cb394b045a..34313701e0 100644
--- a/yxt-as-ui/src/views/storage/allocation/allocationAdd.vue
+++ b/yxt-as-ui/src/views/storage/allocation/allocationAdd.vue
@@ -10,8 +10,9 @@
+
-
+
-
-
商品列表
-
单号:{{formobj.billNo}}
-
+
+
+
+ 申请人
+ {{ formobj.createByName }}
+
+
+ 申请部门
+ {{ formobj.deptName }}
+
+
+ 申请日期
+
+
+
+
+
+
+
+
+ 调出站
+ {{ formobj.outPlatName }}
+
+
+ 调入站
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 经办人
+
+
+
+
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+ style="width: 100%;" show-summary :summary-method="getSummaries">
@@ -72,10 +132,12 @@
+
-
+
@@ -83,14 +145,15 @@
-
+
-
+
@@ -98,7 +161,7 @@
-
+
@@ -118,8 +181,14 @@
diff --git a/yxt-as-ui/src/views/storage/allocation/allocationInfo.vue b/yxt-as-ui/src/views/storage/allocation/allocationInfo.vue
new file mode 100644
index 0000000000..b2dfe891f2
--- /dev/null
+++ b/yxt-as-ui/src/views/storage/allocation/allocationInfo.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+ 申请人
+ {{ formobj.createByName }}
+
+
+ 申请部门
+ {{ formobj.deptName }}
+
+
+ 申请日期
+ {{ formobj.createTimeoutOrgName }}
+
+
+
+
+
+
+ 调出站
+ {{ formobj.outPlatName }}
+
+
+ 调入站
+ {{ formobj.inOrgName }}
+
+
+
+ {{ formobj.inPlatName }}
+
+
+ 经办人
+ {{ formobj.confirmName }}
+
+
+
+
+
+ 备注
+ {{ formobj.remarks }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yxt-as-ui/src/views/storage/allocation/index.vue b/yxt-as-ui/src/views/storage/allocation/index.vue
index 7e7dac1c4b..0cceefd945 100644
--- a/yxt-as-ui/src/views/storage/allocation/index.vue
+++ b/yxt-as-ui/src/views/storage/allocation/index.vue
@@ -10,25 +10,48 @@
查询
@@ -47,21 +70,29 @@
@selection-change="selectionLineChangeHandle">
+
+
+ 办理
+ 查看
+
+
-
-
+
+
-
+
+
+
+
+
+
+
-
@@ -76,6 +107,90 @@
+
+
+
+
+
+
+ 送货方式
+
+
+
+
+
+
+
+
+
+
+
+ 快递单号
+
+
+
+ 快递公司
+
+
+
+ 备注
+
+
+
+
+
+
+ 取货人
+
+
+
+ 取货日期
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+ 送货人
+
+
+
+ 送达日期
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+ 确 定
+
+
+
+
@@ -85,15 +200,18 @@
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import divAdd from './allocationAdd.vue'
+ import divInfo from './allocationInfo.vue'
export default {
components: {
ButtonBar,
Pagination,
pageye,
- divAdd
+ divAdd,
+ divInfo
},
data() {
return {
+ dialogVisible: false,
btndisabled: false,
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
isSearchShow: false,
@@ -107,12 +225,20 @@
btnKey: 'toAdd',
btnLabel: '新增'
},
+
+ {
+ type: 'danger',
+ size: 'small',
+ icon: 'el-icon-delete',
+ btnKey: 'doDel',
+ btnLabel: '删除'
+ },
{
type: 'primary',
size: 'small',
icon: 'edit',
- btnKey: 'toEdit',
- btnLabel: '编辑'
+ btnKey: 'toSupplement',
+ btnLabel: '补充物流信息'
},
{
type: 'info',
@@ -127,12 +253,47 @@
size: 10,
total: 0,
params: {
- "createDateStart": "",
- "createDateEnd": "",
+ "outOrgName": "",
+ "deptName": "",
+ "createByName": "",
+ "billNo": "",
+ "createStartTime": "",
+ "createEndTime": "",
+ "finishStartTime": "",
+ "finishEndTime": "",
+ "outPlatName": "",
+ "inOrgName": "",
+ "inPlatName": "",
+ "confirmName": ""
}
},
sids: [],
- selectionList:[]
+ selectionList: [],
+ deliveryKeyList: [{
+ name: '快递',
+ sid: 1
+ },
+ {
+ name: '对方自取',
+ sid: 2
+ },
+ {
+ name: '我方送货',
+ sid: 3
+ }
+ ],
+ formobj: {
+ "sids": [],
+ "remarks": "",
+ "deliveryKey": "",
+ "deliveryName": "",
+ "expressBillNo": "",
+ "expressCompany": "",
+ "pickUpName": "",
+ "pickUpDate": "",
+ "deliveryPerson": "",
+ "deliveryDate": ""
+ }
}
},
mounted() {
@@ -156,9 +317,12 @@
case 'toAdd':
this.toAdd()
break
- case 'toEdit':
- this.toEdit()
- break
+ case 'doDel':
+ this.doDel()
+ break
+ case 'toSupplement':
+ this.toSupplement()
+ break
case 'doClose':
this.doClose()
break
@@ -207,8 +371,18 @@
size: 10,
total: 0,
params: {
- "createDateStart": "",
- "createDateEnd": "",
+ "outOrgName": "",
+ "deptName": "",
+ "createByName": "",
+ "billNo": "",
+ "createStartTime": "",
+ "createEndTime": "",
+ "finishStartTime": "",
+ "finishEndTime": "",
+ "outPlatName": "",
+ "inOrgName": "",
+ "inPlatName": "",
+ "confirmName": ""
}
}
this.loadList()
@@ -217,123 +391,166 @@
this.viewState = 2
this.$refs['divadd'].showAdd()
},
+ doDel() {
+
+ if (this.sids.length > 0) {
+ 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) => {
+ loading.close()
+ if (resp.success) {
+ this.$message({
+ type: 'success',
+ message: resp.msg,
+ showClose: true
+ })
+ this.loadList()
+ } else {
+ loading.close()
+ // 根据resp.code进行异常情况处理
+ }
+ }).catch(e => {
+ loading.close()
+ })
+ }).catch(() => {})
+ } else {
+ this.$message({
+ type: "warning",
+ showClose: true,
+ message: '请至少选择一条记录进行删除操作'
+ })
+ }
+ },
+
selectionLineChangeHandle(val) {
console.log("val", val);
this.selectionList = val
-
+ const aa = []
+ val.forEach(element => {
+ aa.push(element.sid)
+ })
+ this.sids = aa
+ },
+ toRelevancy(row) {
+ this.viewState = 3
+ this.$refs['divadd'].showEdit(row.sid)
+ },
+ toDetails(row) {
+ this.viewState = 4
+ this.$refs['divinfo'].showAdd(row.sid)
},
- toEdit(){
- if(this.selectionList.length!=1){
- this.$message({
- type: 'warning',
- message: "请选择一条数据。",
- showClose: true
- })
- return
- }
- if(this.selectionList[0].state=='2'){
+ toSupplement() {
+ if (this.sids.length > 0) {
+ this.dialogVisible = true
+
+ console.log("toSupplement", this.sids);
+
+ } else {
this.$message({
- type: 'warning',
- message: "此记录已完成,不可重复编辑。",
- showClose: true
+ type: "warning",
+ showClose: true,
+ message: '请至少选择一条记录进行操作'
})
- return
}
+ },
+ saveData() {
+ this.formobj.sids = this.sids
- this.viewState = 3
- this.$refs['divadd'].showEdit(this.selectionList[0])
- },
+ req.saveLogisticsInfo(this.formobj).then((resp) => {
+ loading.close()
+ if (resp.success) {
+ this.dialogVisible = false
+ this.$message({
+ type: 'success',
+ message: resp.msg,
+ showClose: true
+ })
+ this.loadList()
+ } else {
+ // 根据resp.code进行异常情况处理
+ }
+ }).catch(e => {})
- toBuild() {
- const loading = this.$loading({
- lock: true,
- text: 'Loading',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
+ },
+ handleClose() {
+ this.dialogVisible = false
+ },
+ selectDeliveryKey(val) {
+ console.log("selectDeliveryKey", val);
+ const choose = this.deliveryKeyList.filter((item) => item.sid == val)
+ console.log('>>>>>>>>>selectDeliveryKey', choose)
+ this.formobj.deliveryName = choose[0].warehouseName
+ this.formobj.deliveryKey = choose[0].sid
- req.exportExcel(this.queryParams.params).then((resp) => {
- loading.close()
- const blob = new Blob([resp], {
- type: 'application/vnd.ms-excel'
- })
- const fileName = '出入库明细_' + this.queryParams.params.createDateStart + '.xls'
- const elink = document.createElement('a')
- elink.download = fileName
- elink.style.display = 'nonde'
- elink.href = URL.createObjectURL(blob)
- document.body.appendChild(elink)
- elink.click()
- URL.revokeObjectURL(elink.href)
- document.body.removeChild(elink)
- }).catch(() => {
- loading.close()
- })
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
- toRelevancy(row) {
- this.viewState = 3
- this.$refs['divadd'].showEdit(row)
- },
- toRelevancyInfo(row) {
- const tip = '请确认是否删除所选品牌?'
- 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.deleteGoods(row.sid).then((resp) => {
- loading.close()
- if (resp.success) {
- this.$message({
- type: 'success',
- message: resp.msg,
- showClose: true
- })
- this.loadList()
- } else {
- // 根据resp.code进行异常情况处理
- }
- }).catch(e => {
- loading.close()
- })
- }).catch(() => {})
- },
resetState() {
this.viewState = 1
},
- enableChange(sid, state) {
- console.log('sid', sid)
- console.log('state', state)
- req.updateIsEnable(sid, state).then((resp) => {
- if (resp.success) {
- this.$message({
- type: 'success',
- message: '状态已更新',
- showClose: true
- })
- } else { // 根据resp.code进行异常情况处理
- }
- }).catch(e => {
- console.log(e)
- })
- }
+
}
}
diff --git a/yxt-as-ui/src/views/storage/deliveryNotice/receiptAdd.vue b/yxt-as-ui/src/views/storage/deliveryNotice/receiptAdd.vue
index f34ceca349..4edb69c9e8 100644
--- a/yxt-as-ui/src/views/storage/deliveryNotice/receiptAdd.vue
+++ b/yxt-as-ui/src/views/storage/deliveryNotice/receiptAdd.vue
@@ -47,13 +47,13 @@
供应商
-
-
-
-
-
+
+
+
+
+