From 583f5b77640b5dbf7e593e89a0d660f4cacacbe9 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 02 十一月 2023 11:58:16 +0800
Subject: [PATCH] 添加供应商接口联调、相关供应商页面修改、产品页面修改
---
src/api/supplierManage/supplier.js | 36 ++++++++----
src/assets/style/reset-element.scss | 3 +
src/views/supplierManage/supplier/index.vue | 9 +-
src/views/productManage/product/index.vue | 46 +++++---------
src/views/supplierManage/supplier/AddSupplier.vue | 4
src/views/productManage/product/DetailProduct.vue | 1
src/views/other/commonDialog/EditDropdownDialog.vue | 2
src/views/supplierManage/supplier/RaleteSupplierList.vue | 46 ++++++++++++---
8 files changed, 89 insertions(+), 58 deletions(-)
diff --git a/src/api/supplierManage/supplier.js b/src/api/supplierManage/supplier.js
index 94cad95..ca6d89a 100644
--- a/src/api/supplierManage/supplier.js
+++ b/src/api/supplierManage/supplier.js
@@ -2,8 +2,10 @@
import axios from "axios"
// 鏈嶅姟鍟嗗垪琛�
-export const getSupplierList = async (data) => {
- return await axios.get(`/api/s/getSupplierList`, {
+export function getSupplierList(data) {
+ return request({
+ url: "/api/s/getSupplierList",
+ method: "get",
params: data
})
}
@@ -40,8 +42,10 @@
})
}
// 鐢╥d鏌ヨ鏈嶅姟鍟�
-export const findSupplier = async (data) => {
- return await axios.get(`/api/s/findSupplier`, {
+export function findSupplier(data) {
+ return request({
+ url: "/api/s/findSupplier",
+ method: "get",
params: data
})
}
@@ -55,8 +59,10 @@
})
}
// 鏈嶅姟鍟嗙被鍨嬪垪琛�
-export const getSupplierTypeList = async (data) => {
- return await axios.get(`/api/st/getSupplierTypeList`, {
+export function getSupplierTypeList(data) {
+ return request({
+ url: "/api/st/getSupplierTypeList",
+ method: "get",
params: data
})
}
@@ -76,14 +82,18 @@
})
}
// 棰勮鍚堝悓
-export const previewContract = async (data) => {
- return await axios.get(`/api/con/previewContract`, {
+export function previewContract(data) {
+ return request({
+ url: "/api/con/previewContract",
+ method: "get",
params: data
})
}
// 涓嬭浇鍚堝悓
-export const downloadContract = async (data) => {
- return await axios.get(`/api/con/downloadContract`, {
+export function downloadContract(data) {
+ return request({
+ url: "/api/con/downloadContract",
+ method: "get",
params: data
})
}
@@ -97,8 +107,10 @@
})
}
// 鎵�灞炶涓氬垪琛�
-export const getIndustryList = async (data) => {
- return await axios.get(`/api/i/getIndustryList`, {
+export function getIndustryList(data) {
+ return request({
+ url: "/api/i/getIndustryList",
+ method: "get",
params: data
})
}
diff --git a/src/assets/style/reset-element.scss b/src/assets/style/reset-element.scss
index 142ecc7..b064e86 100644
--- a/src/assets/style/reset-element.scss
+++ b/src/assets/style/reset-element.scss
@@ -25,3 +25,6 @@
padding: 0;
}
}
+.el-drawer__wrapper {
+ z-index: 9999 !important;
+}
diff --git a/src/views/other/commonDialog/EditDropdownDialog.vue b/src/views/other/commonDialog/EditDropdownDialog.vue
index 61713a6..c51d8de 100644
--- a/src/views/other/commonDialog/EditDropdownDialog.vue
+++ b/src/views/other/commonDialog/EditDropdownDialog.vue
@@ -111,7 +111,7 @@
pageSize: 100
}).then((res) => {
console.log(res.data)
- this.tableData = res.data.data.list
+ this.tableData = res.data.list
})
},
handleClose() {
diff --git a/src/views/productManage/product/DetailProduct.vue b/src/views/productManage/product/DetailProduct.vue
index 6a687d7..70d8732 100644
--- a/src/views/productManage/product/DetailProduct.vue
+++ b/src/views/productManage/product/DetailProduct.vue
@@ -172,6 +172,7 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.detail-view {
+ z-index: 9999;
.header {
height: 56px;
display: flex;
diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue
index 53eef98..f85e494 100644
--- a/src/views/productManage/product/index.vue
+++ b/src/views/productManage/product/index.vue
@@ -2,25 +2,14 @@
<div class="product-manage">
<div class="filter">
<div class="filter-card">
-<!-- <SearchCommonView-->
-<!-- ref="searchCommonView"-->
-<!-- :search-options="searchOptions"-->
-<!-- @searchClick="searchClick"-->
-<!-- @resetClick="resetClick"-->
-<!-- />-->
-
<CommonSearch
:show-add="false"
- :show-download="false"
+ :show-download="true"
:amount-view="false"
:show-action-btn="false"
:placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�/渚涘簲鍟�'"
@searchClick="onFilterSearch"
/>
-
- <div class="add-view">
- <!-- <el-button type="primary" size="mini" @click="addBtnClick">鏂板缓</el-button>-->
- </div>
</div>
</div>
<div class="body">
@@ -46,7 +35,6 @@
<PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
</div>
</div>
-
</div>
<!-- 鏂板缓/缂栬緫浜у搧 -->
<AddProduct v-if="editConfig.visible" :add-common-config="editConfig" />
@@ -69,7 +57,7 @@
computed: {},
data() {
return {
- searchText:'',
+ searchText: "",
tableList: {},
searchOptions: [],
commonDetail: {
@@ -84,7 +72,7 @@
},
tableColumn: [
{ label: "浜у搧缂栫爜", prop: "number", min: 190, isCommonClick: true },
- { label: "浜у搧鍚嶇О", prop: "name", min: 130 ,default:true},
+ { label: "浜у搧鍚嶇О", prop: "name", min: 130, default: true },
{ label: "渚涘簲鍟�", prop: "supplierName", min: 130 },
{ label: "浜у搧绫诲埆", prop: "productType", min: 130 },
{ label: "瑙勬牸", prop: "specifications", min: 130 },
@@ -94,7 +82,7 @@
{ label: "鏈�浣庡簱瀛�", prop: "minimumStock", min: 80 },
{ label: "鏈�楂樺簱瀛�", prop: "maximumStock", min: 80 }
],
- showCol: ['浜у搧缂栫爜', '浜у搧鍚嶇О', '渚涘簲鍟�', '浜у搧绫诲埆', '瑙勬牸', '浠锋牸', '鏈�浣庡簱瀛�', '鏈�楂樺簱瀛�']
+ showCol: ["浜у搧缂栫爜", "浜у搧鍚嶇О", "渚涘簲鍟�", "浜у搧绫诲埆", "瑙勬牸", "浠锋牸", "鏈�浣庡簱瀛�", "鏈�楂樺簱瀛�"]
}
},
created() {
@@ -102,11 +90,11 @@
this.getData()
},
methods: {
- setColumnVisible(showCol){
- return this.tableColumn.map(ele=>{
+ setColumnVisible(showCol) {
+ return this.tableColumn.map((ele) => {
return {
...ele,
- isShowColumn:showCol.includes(ele.label)
+ isShowColumn: showCol.includes(ele.label)
}
})
},
@@ -116,9 +104,9 @@
selectIndex: true,
showcol: this.showCol,
allcol: [],
- tableColumn:this.setColumnVisible(this.showCol)
+ tableColumn: this.setColumnVisible(this.showCol)
}
- this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
+ this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
this.searchOptions = []
for (let i = 0; i < this.tableList.tableColumn.length; i++) {
@@ -128,8 +116,8 @@
}
},
selTableCol(val) {
- this.showcol = val;
- this.tableList.tableColumn = this.setColumnVisible(val);
+ this.showcol = val
+ this.tableList.tableColumn = this.setColumnVisible(val)
},
// 璇锋眰鏁版嵁
async getData() {
@@ -156,8 +144,8 @@
// this.getData(val.value, content)
// },
- onFilterSearch(val){
- this.searchText = val ?? ''
+ onFilterSearch(val) {
+ this.searchText = val ?? ""
this.pagerOptions.currPage = 1
this.getData()
},
@@ -208,15 +196,15 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
-.product-manage{
+.product-manage {
height: 100%;
overflow: hidden;
- .filter{
+ .filter {
height: 80px;
display: flex;
align-items: center;
padding: 12px 20px 0 20px;
- &-card{
+ &-card {
height: 80px;
display: flex;
align-items: center;
@@ -227,7 +215,7 @@
background-color: #fff;
}
}
- .body{
+ .body {
box-sizing: border-box;
padding: 10px 20px;
border-radius: 12px;
diff --git a/src/views/supplierManage/supplier/AddSupplier.vue b/src/views/supplierManage/supplier/AddSupplier.vue
index 68bad59..24608fe 100644
--- a/src/views/supplierManage/supplier/AddSupplier.vue
+++ b/src/views/supplierManage/supplier/AddSupplier.vue
@@ -299,7 +299,7 @@
page: 1,
pageSize: 100
}).then((res) => {
- this.supplierTypeOptions = res.data.data.list
+ this.supplierTypeOptions = res.data.list
})
},
// 鎵�灞炶涓�
@@ -308,7 +308,7 @@
page: 1,
pageSize: 100
}).then((res) => {
- this.industryOptions = res.data.data.list
+ this.industryOptions = res.data.list
})
},
handleClose() {
diff --git a/src/views/supplierManage/supplier/RaleteSupplierList.vue b/src/views/supplierManage/supplier/RaleteSupplierList.vue
index 2cd65f0..9f70e62 100644
--- a/src/views/supplierManage/supplier/RaleteSupplierList.vue
+++ b/src/views/supplierManage/supplier/RaleteSupplierList.vue
@@ -44,13 +44,21 @@
computed: {},
data() {
return {
- dialogWidth: "80%",
+ dialogWidth: "60%",
editConfig: this.commonConfig,
tableList: {},
commonDetail: {
visible: false,
infomation: {}
- }
+ },
+ showCol: ["渚涘簲鍟嗙紪鍙�", "渚涘簲鍟嗗悕绉�", "閲囪喘浠锋牸", "渚涜揣澶╂暟", "鐗╂祦鏃堕暱(澶�)"],
+ tableColumn: [
+ { label: "渚涘簲鍟嗙紪鍙�", prop: "supplierNumber", min: 190, isCommonClick: true },
+ { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
+ { label: "閲囪喘浠锋牸", prop: "purchasePrice", min: 130 },
+ { label: "渚涜揣澶╂暟", prop: "deliveryTime", min: 130 },
+ { label: "鐗╂祦鏃堕暱(澶�)", prop: "shippingDuration", min: 130 }
+ ]
}
},
created() {
@@ -58,18 +66,36 @@
this.getProductList()
},
methods: {
+ setColumnVisible(showCol) {
+ return this.tableColumn.map((ele) => {
+ return {
+ ...ele,
+ isShowColumn: showCol.includes(ele.label)
+ }
+ })
+ },
setTable() {
this.tableList = {
tableInfomation: [],
selectIndex: true,
- tableColumn: [
- { label: "渚涘簲鍟嗙紪鍙�", prop: "supplierNumber", min: 190, isCommonClick: true },
- { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
- { label: "閲囪喘浠锋牸", prop: "purchasePrice", min: 130 },
- { label: "渚涜揣澶╂暟", prop: "deliveryTime", min: 130 },
- { label: "鐗╂祦鏃堕暱(澶�)", prop: "shippingDuration", min: 130 }
- ]
+ highlight: true,
+ ref: "tableListRef",
+ showcol: this.showCol,
+ allcol: [],
+ tableColumn: this.setColumnVisible(this.showCol)
}
+ this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
+
+ this.searchOptions = []
+ for (let i = 0; i < this.tableList.tableColumn.length; i++) {
+ const label = this.tableList.tableColumn[i].label
+ const value = this.tableList.tableColumn[i].prop
+ this.searchOptions.push({ value: value, label: label })
+ }
+ },
+ selTableCol(val) {
+ this.showcol = val
+ this.tableList.tableColumn = this.setColumnVisible(val)
},
// 浜у搧鍒楄〃
async getProductList(val, content) {
@@ -89,7 +115,7 @@
}
})
this.tableList.tableInfomation = list || []
- this.tableList.totalCount = res.data.data.total
+ this.pagerOptions.totalCount = res.data.data.total
})
},
handleClose() {
diff --git a/src/views/supplierManage/supplier/index.vue b/src/views/supplierManage/supplier/index.vue
index d3bccbd..e1e85eb 100644
--- a/src/views/supplierManage/supplier/index.vue
+++ b/src/views/supplierManage/supplier/index.vue
@@ -264,16 +264,17 @@
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
- console.log(res.data)
- if (res.data.code === 200) {
- const list = res.data.data.list.map((item) => {
+ console.log(res)
+ if (res.code === 200) {
+ const list = res.data.list.map((item) => {
return {
...item,
status_name: item.status === 0 ? "鏈惎鐢�" : "鍚敤"
}
})
+ console.log(list)
this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.data.total
+ this.pagerOptions.totalCount = res.data.total
if (list && list.length > 0) {
this.supplierId = this.tableList.tableInfomation[0].ID
} else {
--
Gitblit v1.8.0