From c57c6546d706019a5c5656ff02c411439bf95af5 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 24 十一月 2023 10:49:48 +0800
Subject: [PATCH] 概述的 入库获取供应商的接口联调 ,数据参数修改+出库获取客户的接口联调+数据参数修改
---
src/views/overview/AddOverviewDialog.vue | 71 +++++++++++++++++++++++++++++++----
src/api/common/other.js | 20 ++++++++-
src/views/reportForm/outboundDetail/AddOutboundDetailDialog.vue | 6 +-
3 files changed, 83 insertions(+), 14 deletions(-)
diff --git a/src/api/common/other.js b/src/api/common/other.js
index 9a97585..09e37d6 100644
--- a/src/api/common/other.js
+++ b/src/api/common/other.js
@@ -1,7 +1,6 @@
// import request from "@/common/untils/request.js"
import request from "@/common/untils/request"
-
-// 鏌ヨ鍏徃鍒楄〃
+// 鏌ヨ鍏徃
export const getCompanyList = (data) => {
return request({
url: "/api-wms/v1/company/company",
@@ -9,7 +8,22 @@
params: data
})
}
-
+// 鏌ヨ渚涘簲鍟�
+export const getSupplierList = (data) => {
+ return request({
+ url: "/api-wms/v1/operation/getSupplierList",
+ method: "get",
+ params: data
+ })
+}
+// 鏌ヨ瀹㈡埛
+export const getClientList = (data) => {
+ return request({
+ url: "/api-wms/v1/operation/getClientList",
+ method: "get",
+ params: data
+ })
+}
// 涓婁紶闄勪欢
export const uploadFiles = (data) => {
return request({
diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue
index 6148022..e09c059 100644
--- a/src/views/overview/AddOverviewDialog.vue
+++ b/src/views/overview/AddOverviewDialog.vue
@@ -50,7 +50,9 @@
<el-col :span="12">
<el-form-item prop="companyName">
<span slot="label">{{ workType === 1 ? "渚涘簲鍟�" : workType === 2 ? "瀹㈡埛" : "鑱旂郴浜�" }}</span>
+
<el-select
+ v-if="workType === 1"
v-model="editConfig.infomation.companyName"
placeholder="璇烽�夋嫨"
size="mini"
@@ -59,6 +61,40 @@
@change="companyChange"
>
<el-option
+ v-for="item in supplierOptions"
+ :key="item.SupplierId"
+ :label="item.SupplierName"
+ :value="{ value: item.SupplierId, label: item.SupplierName }"
+ >
+ </el-option>
+ </el-select>
+ <el-select
+ v-else-if="workType === 2"
+ v-model="editConfig.infomation.companyName"
+ placeholder="璇烽�夋嫨"
+ size="mini"
+ style="width: 90%"
+ :disabled="!showFooter"
+ @change="companyChange"
+ >
+ <el-option
+ v-for="item in clientOptions"
+ :key="item.ClientId"
+ :label="item.ClientName"
+ :value="{ value: item.ClientId, label: item.ClientName }"
+ >
+ </el-option>
+ </el-select>
+ <el-select
+ v-else
+ v-model="editConfig.infomation.companyName"
+ placeholder="璇烽�夋嫨"
+ size="mini"
+ style="width: 90%"
+ :disabled="!showFooter"
+ @change="companyChange"
+ >
+ <el-option
v-for="item in companyOptions"
:key="item.id"
:label="item.name"
@@ -66,6 +102,7 @@
>
</el-option>
</el-select>
+
</el-form-item>
</el-col>
<!-- <el-col :span="12">
@@ -318,7 +355,7 @@
getLogisticCompanyList,
printReceipts
} from "@/api/overview/overview"
-import { getCompanyList } from "@/api/common/other"
+import { getSupplierList,getCompanyList,getClientList } from "@/api/common/other"
export default {
name: "AddOverviewDialog",
props: {
@@ -360,6 +397,8 @@
operationTypeId: [{ required: true, message: "璇烽�夋嫨鍏ュ簱绫诲瀷", trigger: "change" }]
},
companyOptions: [], // 鍏徃
+ supplierOptions:[],//渚涘簲鍟�
+ clientOptions:[],//瀹㈡埛
memberOptions: [{ id: 1, name: "绠$悊鍛�" }],
toLocationOptions: [], // 婧愪綅缃� 浠撳簱浣嶇疆
showButton: true,
@@ -394,11 +433,11 @@
}
},
created() {
+ this.getCompanyList()
this.setStatusList()
this.setTableForm()
this.setBottonView()
this.setDetailTableForm()
- this.getCompanyList()
this.getLocationList()
this.receiptType = this.editConfig.title === "鏌ョ湅" ? this.editConfig.infomation.operationTypeName : this.addName
if (this.showOperationType) {
@@ -428,12 +467,28 @@
},
// 鑾峰彇鍏徃鍒楄〃
async getCompanyList() {
- await getCompanyList().then((res) => {
- console.log(res)
- if (res.code === 200) {
- this.companyOptions = res.data
- }
- })
+ if(this.workType === 1){
+ await getSupplierList().then((res) => {
+ console.log(res)
+ if (res.code === 200) {
+ this.supplierOptions = res.data
+ }
+ })
+ }else if(this.workType === 2){
+ await getClientList().then((res) => {
+ console.log(res)
+ if (res.code === 200) {
+ this.clientOptions = res.data
+ }
+ })
+ }else{
+ await getCompanyList().then((res) => {
+ console.log(res)
+ if (res.code === 200) {
+ this.companyOptions = res.data
+ }
+ })
+ }
},
// 鑾峰彇浠撳簱浣嶇疆鍒楄〃
async getLocationList() {
diff --git a/src/views/reportForm/outboundDetail/AddOutboundDetailDialog.vue b/src/views/reportForm/outboundDetail/AddOutboundDetailDialog.vue
index 2097ac0..70bc0aa 100644
--- a/src/views/reportForm/outboundDetail/AddOutboundDetailDialog.vue
+++ b/src/views/reportForm/outboundDetail/AddOutboundDetailDialog.vue
@@ -59,9 +59,9 @@
>
<el-option
v-for="item in companyOptions"
- :key="item.id"
- :label="item.name"
- :value="{ value: item.id, label: item.name }"
+ :key="item.SupplierId"
+ :label="item.SupplierName"
+ :value="{ value: item.SupplierId, label: item.SupplierName }"
>
</el-option>
</el-select>
--
Gitblit v1.8.0