From d0c71250306600d2e844602fd25a71d5d9841198 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期三, 03 一月 2024 09:44:36 +0800
Subject: [PATCH] 修改出入库查看和编辑时从...至...的编辑问题
---
src/views/operate/allot/index.vue | 4 +-
src/views/overview/AddOverviewDialog.vue | 49 ++++++++++++++++++++++--
src/views/overview/OverviewListView.vue | 9 ++++
src/components/makepager/CommonFormTableView.vue | 11 +----
src/views/reportForm/locationReport/index.vue | 2 +
5 files changed, 59 insertions(+), 16 deletions(-)
diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue
index 26afa06..9437f52 100644
--- a/src/components/makepager/CommonFormTableView.vue
+++ b/src/components/makepager/CommonFormTableView.vue
@@ -643,19 +643,14 @@
// 璁剧疆瀛愪綅缃�
async setLocationList(jointName) {
await getLocationList({
- // keyword: "",
jointName: jointName,
page: 1,
pageSize: 100
}).then((res) => {
if (res.code === 200) {
- const list = res.data ? res.data : []
- this.selSonLocationOptions = list
- // if (this.isReorder) {
- // this.locacionName = list[0]?.name
- // this.locacionId = list[0]?.id
- // this.$emit("selLocationClick", list[0], "locacionName")
- // }
+ // const list = res.data ? res.data : []
+ this.selSonLocationOptions = res.data
+ console.log(this.selSonLocationOptions,"鐪嬬湅鍙樹簡娌�")
}
})
},
diff --git a/src/views/operate/allot/index.vue b/src/views/operate/allot/index.vue
index 84f4e10..45b3424 100644
--- a/src/views/operate/allot/index.vue
+++ b/src/views/operate/allot/index.vue
@@ -230,8 +230,8 @@
const list = res.data.map((item) => {
return {
...item,
- from: item.fromLocation.name,
- to: item.toLocation.name
+ // from: item.fromLocation.name,
+ // to: item.toLocation.name
}
})
this.tableList.tableInfomation = list || []
diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue
index e4cb86c..c860cac 100644
--- a/src/views/overview/AddOverviewDialog.vue
+++ b/src/views/overview/AddOverviewDialog.vue
@@ -203,7 +203,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item v-if="workType !== 1" label="婧愪綅缃�" prop="location">
+ <el-form-item :label="workType === 1?'浠撳簱浣嶇疆':'婧愪綅缃�'" prop="location">
<el-select
@change="rootLocationChange"
v-model="editConfig.infomation.location"
@@ -222,7 +222,7 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item v-if="workType !== 2" label="浠撳簱浣嶇疆" prop="toLocationId">
<el-select
v-model="editConfig.infomation.toLocationId"
@@ -240,7 +240,7 @@
</el-option>
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="12">
<el-form-item label="璐熻矗浜�" prop="contacterName">
<el-select
@@ -511,7 +511,7 @@
showButton: true,
activeName: "first",
productTableList: {},
- tableData: [],
+ tableData:[],
countId: 0,
isNoProduct: true, // 娣诲姞鏄庣粏琛屾椂鏄惁鏈変骇鍝佹湭閫夋嫨
showEdit: false, // 鏄惁鏄剧ず缂栬緫鎸夐挳
@@ -559,6 +559,11 @@
}
this.getLogisticCompanyList()
this.formInfo()
+ },
+ mounted(){
+ setTimeout(() => {
+ this.$refs.tableView.setLocationList(this.editConfig.infomation.location.label)
+ }, 100);
},
methods: {
formInfo() {
@@ -761,6 +766,39 @@
item.toLocationId=item.toLocationId.value
})
}
+ // 浜у搧鍒楄〃瑙f瀯
+ let arr=[]
+ if(this.workType===1){
+ params.details.map((item)=>{
+ arr.push({
+ operationId:item.operationId,
+ amount:item.amount,
+ productId:item.productId
+ })
+ })
+ params.details=arr
+ }else if(this.workType===2){
+ params.details.map((item)=>{
+ arr.push({
+ operationId:item.operationId,
+ amount:item.amount,
+ fromLocationId:item.fromLocation.id,
+ productId:item.productId,
+ })
+ })
+ params.details=arr
+ }else if(this.workType===3){
+ params.details.map((item)=>{
+ arr.push({
+ operationId:item.operationId,
+ amount:item.amount,
+ fromLocationId:item.fromLocation.id,
+ toLocationId:item.toLocation.id,
+ productId:item.productId,
+ })
+ })
+ params.details=arr
+ }
let requestUrl = this.editConfig.title === "鏂板缓" ? addOperation : updateOperation
// let params = this.saveParams()
requestUrl({
@@ -914,7 +952,7 @@
productId: "",
amount: 0,
unit: "",
- productName: ""
+ productName: "",
})
}
} else {
@@ -1062,6 +1100,7 @@
},
// 婧愪綅缃�夋嫨
rootLocationChange(val){
+ this.editConfig.infomation.location=val
this.productTableList.tableData.map((item)=>{
console.log(item,"item")
item.toLocationId={}
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 19b3bd4..d25c0ca 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -273,7 +273,12 @@
item.fromLocationId=item.fromLocation.jointName
item.toLocationId=item.toLocation.jointName
})
+ row.location={
+ value:row.location.id||row.location.value,
+ label:row.location.jointName||row.location.jointName
+ }
row.locationID=row.location.jointName
+ row.locationId=row.location.value
this.editConfig.infomation = { ...row }
},
// 鏂板缓
@@ -282,7 +287,9 @@
this.addName = this.params.name
this.editConfig.operationTypeId = this.params.id
this.editConfig.code = this.params.code
- this.editConfig.infomation = {}
+ this.editConfig.infomation = {
+ location:{jointName:""}
+ }
this.editConfig.visible = true
},
// 鐘舵��
diff --git a/src/views/reportForm/locationReport/index.vue b/src/views/reportForm/locationReport/index.vue
index 2759b0b..4fb850f 100644
--- a/src/views/reportForm/locationReport/index.vue
+++ b/src/views/reportForm/locationReport/index.vue
@@ -235,6 +235,8 @@
// 鎼滅储
getList(val) {
this.keyWord=val
+ this.pagerOptions.currPage=1
+ this.pagerOptions.pageSize=15
this.getData()
},
// 琛岀偣鍑�
--
Gitblit v1.8.0