From a6649a3319e9f5e9260848872d8cddabfcfc7553 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 15 十一月 2023 10:42:55 +0800
Subject: [PATCH] Merge branch 'master' of ssh://192.168.5.5:29418/web/SRM
---
src/views/supplierManage/supplier/index.vue | 195 ++++++----
src/views/productManage/product/index.vue | 46 -
src/views/supplierManage/supplier/AddSupplier.vue | 11
src/store/index.js | 2
src/views/purchaseManage/purchase/components/AddPurchase.vue | 10
src/assets/img/shoucangfill.png | 0
src/views/purchaseManage/purchase/index.vue | 20 +
src/components/makepager/CommonSearch.vue | 160 +++----
src/views/other/commonDialog/SelectCommonDialog.vue | 101 ++++-
src/api/supplierManage/supplier.js | 36 +
src/assets/style/reset-element.scss | 7
src/components/makepager/TableCommonView.vue | 68 +-
/dev/null | 216 ------------
src/assets/style/index.scss | 2
src/store/modules/getSupplierName.js | 25 +
src/views/supplierManage/supplier/AddNewProduct.vue | 22
src/assets/img/shaixuan.png | 0
src/assets/img/xiazai.png | 0
src/views/productManage/product/DetailProduct.vue | 1
package.json | 2
src/components/layout/components/appsidebar/index.vue | 4
src/views/other/commonDialog/EditDropdownDialog.vue | 2
src/views/supplierManage/supplier/RaleteSupplierList.vue | 46 ++
src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue | 75 +++-
24 files changed, 504 insertions(+), 547 deletions(-)
diff --git a/package.json b/package.json
index 6c8db69..8295bc6 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
- "serve": "vue-cli-service serve",
+ "serve": "vue-cli-service serve --open",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
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/img/shaixuan.png b/src/assets/img/shaixuan.png
new file mode 100644
index 0000000..ab3dd53
--- /dev/null
+++ b/src/assets/img/shaixuan.png
Binary files differ
diff --git a/src/assets/img/shoucangfill.png b/src/assets/img/shoucangfill.png
new file mode 100644
index 0000000..8ac3848
--- /dev/null
+++ b/src/assets/img/shoucangfill.png
Binary files differ
diff --git a/src/assets/img/xiazai.png b/src/assets/img/xiazai.png
new file mode 100644
index 0000000..8dd6e61
--- /dev/null
+++ b/src/assets/img/xiazai.png
Binary files differ
diff --git a/src/assets/style/index.scss b/src/assets/style/index.scss
index 89fe4ef..44f2fe4 100644
--- a/src/assets/style/index.scss
+++ b/src/assets/style/index.scss
@@ -136,7 +136,7 @@
}
}
-.border_radius_12{
+.border_radius_12 {
border-radius: 12px;
}
diff --git a/src/assets/style/reset-element.scss b/src/assets/style/reset-element.scss
index 142ecc7..0fae205 100644
--- a/src/assets/style/reset-element.scss
+++ b/src/assets/style/reset-element.scss
@@ -25,3 +25,10 @@
padding: 0;
}
}
+.el-drawer__wrapper {
+ z-index: 9999 !important;
+}
+// 棰滆壊
+.el-table .onSelect {
+ background: #ebf2ff;
+}
diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue
index 4aaecf5..96653ac 100644
--- a/src/components/layout/components/appsidebar/index.vue
+++ b/src/components/layout/components/appsidebar/index.vue
@@ -29,9 +29,9 @@
<span>閲囪喘绠$悊</span>
</template>
<el-menu-item index="/purchaseManage/purchase">閲囪喘璁㈠崟</el-menu-item>
- <el-menu-item index="/purchaseManage/quality">閲囪喘璐ㄦ鍗�</el-menu-item>
+ <!-- <el-menu-item index="/purchaseManage/quality">閲囪喘璐ㄦ鍗�</el-menu-item> -->
<!-- <el-menu-item index="/purchaseManage/warehouse">閲囪喘鍏ュ簱鍗�</el-menu-item> -->
- <el-menu-item index="/purchaseManage/returned">閲囪喘閫�璐у崟</el-menu-item>
+ <!-- <el-menu-item index="/purchaseManage/returned">閲囪喘閫�璐у崟</el-menu-item> -->
</el-submenu>
<el-submenu index="3">
<template slot="title">
diff --git a/src/components/makepager/CommonSearch.vue b/src/components/makepager/CommonSearch.vue
index 7e83725..f61df8c 100644
--- a/src/components/makepager/CommonSearch.vue
+++ b/src/components/makepager/CommonSearch.vue
@@ -2,29 +2,24 @@
<div class="search-list">
<div class="search-top">
<div class="left">
- <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn">{{
- addTitle
- }}</el-button>
- <div
- class="download"
- v-if="showDownload"
- @click="downloadClick"
- :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }"
- >
- <img
- src="../../../public/images/download.png"
- style="width: 13px"
- alt="涓嬭浇"
- />
- </div>
+ <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn">
+ <div style="display: flex">
+ <slot name="buttonIcon" />
+ <span style="margin-top: 1px; line-height: 15px">{{ addTitle }}</span>
+ </div>
+ </el-button>
<slot name="leftButton" />
+ <div
+ v-if="showDownload"
+ class="download"
+ @click="downloadClick"
+ :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }"
+ >
+ <img src="@/assets/img/xiazai.png" style="width: 13px" />
+ </div>
</div>
<div v-if="amountView" class="amount">
- <div
- v-if="twoTotalAmount"
- class="top_left"
- style="width: 8%; border: 0"
- >
+ <div v-if="twoTotalAmount" class="top_left" style="width: 8%; border: 0px">
<dl>
<dd class="font_weight">{{ twoObject.value }}</dd>
<dd class="top_right_bottom">{{ twoObject.label }}</dd>
@@ -37,16 +32,12 @@
</dl>
</div>
<div class="top_right" style="width: 50%; margin-right: 15px">
- <dl v-for="item in otherOptions" :key="item.label">
+ <dl v-for="item in otherOptions" :key="item.value">
<dd class="font_weight">
{{ item.value }}
</dd>
<dd class="top_right_bottom">
- <span
- v-if="item.status"
- class="Badge"
- :class="item.status"
- ></span>
+ <span v-if="item.status" class="Badge" :class="item.status"></span>
<span>{{ item.label }}</span>
</dd>
</dl>
@@ -56,29 +47,20 @@
<div class="search">
<template v-if="isSearchForm">
<el-input
- :placeholder="placeholder"
- v-model.trim="searchInput"
- class="input-with-select"
- style="width: 410px"
- clearable
- @change="searchClick"
- @clear="clearClick"
+ :placeholder="placeholder"
+ v-model.trim="searchInput"
+ class="input-with-select"
+ style="width: 410px"
+ clearable
+ @change="searchClick"
+ @clear="clearClick"
>
- <i
- slot="suffix"
- class="el-icon-search"
- style="cursor: pointer"
- @click="searchClick"
- ></i>
+ <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="searchClick"></i>
</el-input>
</template>
- <div class="search-Btn" v-if="showActionBtn">
+ <div v-if="showScreen" class="search-Btn">
<div class="common">
- <img
- src="../../../public/images/filter.png"
- style="width: 10px"
- alt="绛涢��"
- />
+ <img src="@/assets/img/shaixuan.png" style="width: 10px" />
<span>绛涢��</span>
</div>
<div class="common">
@@ -92,11 +74,7 @@
</div>
</div>
<div v-if="showSet">
- <i
- class="el-icon-setting cursor_pointer font_size_30"
- style="color: rgb(128,128,128)"
- @click="inspectionConfigClick"
- ></i>
+ <i class="el-icon-setting cursor_pointer font_size_30" style="color: gray" @click="inspectionConfigClick"></i>
</div>
<div class="right">
<slot name="rightButton"></slot>
@@ -112,32 +90,32 @@
props: {
showAdd: {
type: Boolean,
- default: true,
+ default: true
},
showDownload: {
type: Boolean,
- default: false,
+ default: false
},
showActionBtn: {
type: Boolean,
- default: true,
+ default: true
},
placeholder: {
type: String,
- default: "璇疯緭鍏ュ唴瀹�",
+ default: "璇疯緭鍏ュ唴瀹�"
},
addTitle: {
type: String,
- default: "娣诲姞",
+ default: "娣诲姞"
},
totalObject: {
type: Object,
default: () => {
return {
value: 0,
- label: "鍏ㄩ儴鐗╂枡",
- };
- },
+ label: "鍏ㄩ儴鐗╂枡"
+ }
+ }
},
otherOptions: {
type: Array,
@@ -145,98 +123,102 @@
{
value: 2,
label: "瀹夊叏搴撳瓨",
- status: "success",
+ status: "success"
},
{
value: 12,
label: "娆犳枡",
- status: "error",
+ status: "error"
},
{
value: 2,
label: "瀹夊叏搴撳瓨",
- status: "success",
+ status: "success"
},
{
value: 12,
label: "娆犳枡",
- status: "error",
- },
- ],
+ status: "error"
+ }
+ ]
},
searchSel: {
type: Object,
default: () => {
return {
value: "name",
- label: "",
- };
- },
+ label: ""
+ }
+ }
},
twoTotalAmount: {
type: Boolean,
- default: false,
+ default: false
},
twoObject: {
type: Object,
default: () => {
return {
value: 0,
- label: "杞﹂棿鎬婚噺",
- };
- },
+ label: "杞﹂棿鎬婚噺"
+ }
+ }
},
amountView: {
type: Boolean,
- default: true,
+ default: true
},
isSearchForm: {
type: Boolean,
- default: true,
+ default: true
},
showSet: {
type: Boolean,
- default: false,
+ default: false
},
inputName: {
type: String,
- default: "",
+ default: ""
},
+ showScreen: {
+ type: Boolean,
+ default: true
+ }
},
watch: {
inputName(val) {
- this.searchInput = val;
- },
+ this.searchInput = val
+ }
},
data() {
return {
searchInput: "",
- searchSelValue: this.searchSel,
- };
+ searchSelValue: this.searchSel
+ }
},
methods: {
// 鎼滅储
searchClick() {
- this.$emit("searchClick", this.searchInput);
+ this.$emit("searchClick", this.searchInput)
},
// 娓呴櫎
clearClick() {
- this.$emit("clearClick", 1);
+ this.$emit("clearClick", 1)
},
// 娣诲姞
addBtn() {
- this.$emit("addCommonClick");
+ this.$emit("addCommonClick")
},
// 涓嬭浇
downloadClick() {
- this.$emit("downloadClick");
+ this.$emit("downloadClick")
},
// 妯″叿-妫�鏌ラ厤缃�
inspectionConfigClick() {
- this.$emit("inspectionConfigClick");
- },
- },
-};
+ this.$emit("inspectionConfigClick")
+ }
+ }
+}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
@@ -280,7 +262,7 @@
.font_weight {
font-weight: 500;
font-size: 18px;
- font-family: "DIN Alternate",serif;
+ font-family: "DIN Alternate", serif;
}
.top_right_bottom {
font-size: 12px;
@@ -300,7 +282,7 @@
.font_weight {
font-weight: 500;
font-size: 18px;
- font-family: "DIN Alternate",serif;
+ font-family: "DIN Alternate", serif;
}
.top_right_bottom {
font-size: 12px;
diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index d037c30..a8e9b4c 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -11,7 +11,7 @@
:lazy="tableList.lazy"
size="mini"
@selection-change="handleSelectionChange"
- :header-cell-style="{ background: '#f1f3f8', color: '#000009' , 'font-size': '14px'}"
+ :header-cell-style="{ background: '#f1f3f8', color: '#000009', 'font-size': '14px' }"
:highlight-current-row="tableList.highlight"
:row-class-name="tableRowClassName"
@row-click="tableRowClick"
@@ -20,7 +20,8 @@
:tree-props="{ children: 'child', hasChildren: 'hasChildren' }"
>
<el-table-column align="center" v-if="tableList.selectBox" type="selection" width="40"> </el-table-column>
- <el-table-column align="center" v-if="tableList.selectIndex" type="index" label="搴忓彿" width="50"> </el-table-column>
+ <el-table-column align="center" v-if="tableList.selectIndex" type="index" label="搴忓彿" width="50">
+ </el-table-column>
<template v-for="(item, i) in tableList.tableColumn">
<el-table-column
align="center"
@@ -37,19 +38,22 @@
<span v-if="item.price">{{ "锟�" + number_format(scope.row[item.prop], 2, ".", ",") }}</span>
<div v-else-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</div>
<span v-else-if="item.isTime">{{
- dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) === "1900-01-01 00:06:26"
- ? "--"
- : dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop])
- }}</span>
- <span v-else-if="item.isClick && scope.row[item.prop]" class="sel-name" @click="selCommonClick(scope.row)">{{
- scope.row[item.prop]
- }}</span>
+ dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) === "1900-01-01 00:06:26"
+ ? "--"
+ : dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop])
+ }}</span>
+ <span
+ v-else-if="item.isClick && scope.row[item.prop]"
+ class="sel-name"
+ @click="selCommonClick(scope.row)"
+ >{{ scope.row[item.prop] }}</span
+ >
<span v-else-if="item.isFirst">{{ scope.row[item.prop] ? "鏄�" : "鍚�" }}</span>
<span
- v-else-if="item.isCommonClick && scope.row[item.prop]"
- class="sel-name"
- @click="selCommonClick(scope.row)"
- >{{ scope.row[item.prop] }}</span
+ v-else-if="item.isCommonClick && scope.row[item.prop]"
+ class="sel-name"
+ @click="selCommonClick(scope.row)"
+ >{{ scope.row[item.prop] }}</span
>
<div v-else-if="item.isProductName" class="product-view">
<ul v-if="scope.row.products && scope.row.products.length > 0">
@@ -103,15 +107,8 @@
<div class="overSpread1" v-show="iscolopen" @click="onMaskClick"></div>
<div class="styleBtn">
<i @click="checkCol()" class="label">...</i>
- <el-checkbox-group
- v-model="showcol"
- v-show="iscolopen"
- class="checkbox-group"
- @change="selectCheckBoxList"
- >
- <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item"
- >{{ item }}
- </el-checkbox>
+ <el-checkbox-group v-model="showcol" v-show="iscolopen" class="checkbox-group" @change="selectCheckBoxList">
+ <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item">{{ item }} </el-checkbox>
</el-checkbox-group>
</div>
</div>
@@ -160,27 +157,27 @@
data() {
return {
iscolopen: false,
- showcol:[]
+ showcol: []
}
},
watch: {
- 'tableList.showcol':{
- handler(newVal){
- this.showcol=newVal
+ "tableList.showcol": {
+ handler(newVal) {
+ this.showcol = newVal
},
- immediate:true
+ immediate: true
}
},
computed: {},
methods: {
onMaskClick() {
- this.iscolopen = false;
+ this.iscolopen = false
},
checkCol() {
- this.iscolopen = !this.iscolopen;
+ this.iscolopen = !this.iscolopen
},
selectCheckBoxList(val) {
- this.$emit("selTableCol", val);
+ this.$emit("selTableCol", val)
},
handleReserve(row) {
return row._id ? row._id : row.id
@@ -316,6 +313,10 @@
selCommonClick(row) {
this.$emit("selCommonClick", row)
},
+ // 琛岀偣鍑�
+ tableRowClick(row, column, event) {
+ this.$emit("tableRowClick", row, column, event)
+ },
// 鍗曢�夎鐩稿叧
tableRowClassName({ row }) {
if (Object.keys(this.selectClassRow).length > 0) {
@@ -324,9 +325,6 @@
}
}
this.$emit("tableRowClassName", row)
- },
- tableRowClick(row) {
- this.$emit("tableRowClick", row)
}
}
}
@@ -398,8 +396,8 @@
text-align: center;
}
-::v-deep{
- .el-table .cell .el-button--text.el-button--small{
+::v-deep {
+ .el-table .cell .el-button--text.el-button--small {
padding: 4px 0;
}
}
diff --git a/src/store/index.js b/src/store/index.js
index ceffa8e..3f464bf 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,5 +1,6 @@
import Vue from 'vue'
import Vuex from 'vuex'
+import getSupplierName from "./modules/getSupplierName"
Vue.use(Vuex)
@@ -13,5 +14,6 @@
actions: {
},
modules: {
+ getSupplierName
}
})
diff --git a/src/store/modules/getSupplierName.js b/src/store/modules/getSupplierName.js
new file mode 100644
index 0000000..3a9a5c5
--- /dev/null
+++ b/src/store/modules/getSupplierName.js
@@ -0,0 +1,25 @@
+import { getSupplierList } from "@/api/supplierManage/supplier"
+import { Message } from "element-ui"
+
+export default{
+ state:{
+ supplierList:[], //渚涘簲鍟嗗垪琛�
+ },
+ mutations:{
+ supplierNameList(state, payload) {
+ state.supplierList = payload
+ },
+ },
+ actions:{
+ getSupplier(context){
+ getSupplierList({page:1,pageSize:50}).then((res) => {
+ if (res.data.code == 200) {
+ context.commit("supplierNameList", res.data.data.list)
+ } else {
+ Message.error(res.msg)
+ }
+ })
+ }
+ }
+
+}
\ No newline at end of file
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/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index cfe8f7b..2b2516f 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -28,10 +28,19 @@
<el-button type="primary" size="mini" disabled>蹇�熷垱寤�</el-button> -->
</div>
</div>
- <TableCommonView ref="tableListRef" :table-list="tableList" :select-box="false" @selCommonClick="selNameClick">
+ <TableCommonView
+ ref="tableListRef"
+ :table-list="tableList"
+ :select-box="false"
+ @selCommonClick="selNameClick"
+ @selTableCol="selTableCol"
+ >
</TableCommonView>
<div slot="footer" class="dialog-footer">
- <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div>
+ <!-- <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div> -->
+ <div class="btn-pager">
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+ </div>
</div>
</div>
</el-dialog>
@@ -39,9 +48,12 @@
</template>
<script>
-import { getProductListFromGrpc,getProductList } from "@/api/productManage/product"
+import { getProductListFromGrpc, getProductList } from "@/api/productManage/product"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+
export default {
name: "EditSelCommonDialog",
+ mixins: [pageMixin],
props: {
editCommonConfig: {
type: Object,
@@ -53,16 +65,16 @@
}
}
},
- sign:{
- type:String,
- default:''
+ sign: {
+ type: String,
+ default: ""
}
},
components: {},
computed: {},
data() {
return {
- dialogWidth: "50%",
+ dialogWidth: "40%",
editConfig: this.editCommonConfig,
queryInput: "",
select: "鍏ㄩ儴瀛楁",
@@ -74,7 +86,14 @@
search_map: {},
searchSel: {},
keyword: "",
- keywordType: ""
+ keywordType: "",
+ showProductCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿"],
+ tableProductColumn: [
+ { label: "浜у搧鍚嶇О", prop: "name", isClick: true },
+ { label: "浜у搧缂栧彿", prop: "number" }
+ ],
+ showCol: [],
+ tableColumn: []
}
},
created() {
@@ -82,17 +101,30 @@
this.getData()
},
methods: {
+ setColumnVisible(showCol) {
+ return this.tableColumn.map((ele) => {
+ return {
+ ...ele,
+ isShowColumn: showCol.includes(ele.label)
+ }
+ })
+ },
setTable() {
if (this.editConfig.title === "浜у搧鍚嶇О") {
- this.tableList = {
- tableInfomation: [],
- tableColumn: [
- { label: "浜у搧鍚嶇О", prop: "name", isClick: true },
- { label: "浜у搧缂栧彿", prop: "number" }
- ]
- }
- this.searchSel = { value: "name", label: "浜у搧鍚嶇О" }
+ this.showCol = this.showProductCol
+ this.tableColumn = this.tableProductColumn
}
+ this.tableList = {
+ tableInfomation: [],
+ selectIndex: true,
+ 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
@@ -100,6 +132,18 @@
this.searchOptions.push({ value: value, label: label })
}
},
+ selTableCol(val) {
+ this.showcol = val;
+ this.tableList.tableColumn = this.setColumnVisible(val);
+ },
+ // setColumnVisible(showCol){
+ // return this.tableColumn.map(ele=>{
+ // return {
+ // ...ele,
+ // isShowColumn:showCol.includes(ele.label)
+ // }
+ // })
+ // },
// 璇锋眰鏁版嵁
async getData() {
this.loading = true
@@ -109,11 +153,12 @@
},
// 浜у搧鍚嶇О
async getProductList() {
-
- let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc;
- await fn({
- page: 1,
- pageSize: 100
+ let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc
+ await fn({
+ productName: this.keywordType === "浜у搧鍚嶇О" ? this.keyword : "",
+ productNumber: this.keywordType === "浜у搧缂栧彿" ? this.keyword : "",
+ page: this.pagerOptions.currPage,
+ pageSize: this.pagerOptions.pageSize
}).then((res) => {
console.log(res.data)
if (res.data.code === 200) {
@@ -123,7 +168,8 @@
...item
}
})
- this.tableList.tableInfomation = list.slice(0, 5) || []
+ this.tableList.tableInfomation = list
+ this.pagerOptions.totalCount = res.data.data.total
} else {
this.tableList.tableInfomation = []
}
@@ -185,9 +231,16 @@
cursor: pointer;
}
.dialog-footer {
- height: 40px;
- line-height: 40px;
+ height: 50px;
+ line-height: 50px;
color: red;
+ .btn-pager {
+ display: flex;
+ margin-top: 0px;
+ .page {
+ margin-left: auto;
+ }
+ }
}
::v-deep {
.input-with-select .el-input-group__prepend {
diff --git a/src/views/other/product/index.vue b/src/views/other/product/index.vue
deleted file mode 100644
index 9b43bd8..0000000
--- a/src/views/other/product/index.vue
+++ /dev/null
@@ -1,216 +0,0 @@
-<template>
- <div class="product">
- <div v-if="isDetail" class="detail-top">
- <DetailListCommonBtn :query-class-options="queryClassOptions" />
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- <div v-else class="top">
- <SearchCommonView
- ref="searchCommonView"
- :query-class-options="queryClassOptions"
- :search-options="searchOptions"
- :search-sel="searchSel"
- @searchClick="searchClick"
- @resetClick="resetClick"
- />
- <div class="btn-pager">
- <PublicFunctionBtnView :statistics="true" :operates-list="operatesList" @batchDelete="delClick" />
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </div>
- <TableCommonView
- ref="tableListRef"
- v-loading="loading"
- :table-list="tableList"
- :select-box="!isDetail"
- @getSelectArray="getSelectArray"
- >
- <!-- <template slot="tableButton">
- <el-table-column label="鎿嶄綔" width="60" fixed="right">
- <template slot-scope="scope">
- <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
- </template>
- </el-table-column>
- </template> -->
- </TableCommonView>
- </div>
-</template>
-
-<script>
-import { getProductList } from "@/api/common/other"
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-
-export default {
- name: "ProductView",
- props: {
- isDetail: {
- type: Boolean,
- default: false
- },
- addConfig: {
- type: Object,
- default: () => {
- return {}
- }
- }
- },
- mixins: [pageMixin],
- components: {},
- computed: {},
- data() {
- return {
- tableList: {},
- loading: false,
- activeName: "second",
- queryClassValue: "1",
- queryClassOptions: [
- { value: "1", label: "鍏ㄩ儴" },
- { value: "2", label: "浠婃棩鑱旂郴" },
- { value: "3", label: "鏈懆鑱旂郴" },
- { value: "4", label: "鏈湀鑱旂郴" }
- ],
- searchOptions: [],
- operatesList: [
- { id: "1", name: "鍏变韩" },
- { id: "2", name: "鎵归噺缂栬緫" },
- { id: "3", name: "瀵煎嚭" },
- { id: "4", name: "涓嬭浇鍏ㄩ儴闄勪欢" },
- { id: "5", name: "鏇存敼鍒涘缓浜�" },
- { id: "6", name: "鏍戠粨鏋勮缃�" },
- { id: "7", name: "瀹℃壒璁剧疆" },
- { id: "8", name: "鍥炶棰勮鍒楀" }
- ],
- editConfig: {
- visible: false,
- title: "鏂板缓",
- infomation: {}
- },
- saleChanceName: "",
- contactsDeail: {
- visible: false,
- infomation: {}
- },
- clientDeail: {
- visible: false,
- infomation: {}
- },
- selValueList: [],
- searchSel: {
- value: "topic",
- label: ""
- },
- search_map: {}
- }
- },
- created() {
- this.setTable()
- if (!this.isDetail) {
- this.search_map = {}
- } else {
- this.search_map = {
- [this.addConfig.id_name]: this.addConfig.client_name
- }
- }
- this.getData(this.search_map)
- },
- methods: {
- setTable() {
- this.tableList = {
- tableInfomation: [],
- tableColumn: [
- { label: "浜у搧鍚嶇О", prop: "topic" },
- { label: "浜у搧缂栧彿", prop: "client_name" },
- { label: "浜у搧绫诲埆", prop: "contact_name" },
- { label: "瑙勬牸鍨嬪彿", prop: "client_status" },
- { label: "璁¢噺鍗曚綅", prop: "contact_information_name" },
- { label: "浜у搧鎶ヤ环", prop: "follow_time" },
- { label: "鍙傝�冩垚鏈环", prop: "next_follow_time" },
- { label: "鎬诲簱瀛樻暟閲�", prop: "member_name" },
- { label: "璐熻矗浜�", prop: "record" }
- ]
- }
- 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 })
- }
- },
- // 璇锋眰鏁版嵁
- async getData() {
- this.loading = true
- await getProductList({
- productName: "",
- productNumber: "",
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- })
- .then((res) => {
- console.log(res)
- if (res.code === 200) {
- if (res.data.list && res.data.list.length > 0) {
- const list = res.data.list.map((item) => {
- return {
- ...item
- }
- })
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.count
- } else {
- this.tableList.tableInfomation = []
- }
- } else {
- this.tableList.tableInfomation = []
- }
- this.loading = false
- })
- .catch((err) => {
- console.log(err)
- this.tableList.tableInfomation = []
- this.loading = false
- })
- },
- // 鎼滅储
- searchClick(val, content) {
- console.log(val, content)
- this.search_map = {
- [val.value]: content
- }
- this.getData()
- },
- resetClick() {
- this.search_map = {}
- this.getData()
- },
- getSelectArray(val) {
- console.log(val)
- this.selValueList = []
- const list = val.map((item) => {
- return item.id
- })
- this.selValueList = list
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.product {
- .top {
- margin-bottom: 20px;
- .btn-pager {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
- }
- .detail-top {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
-}
-</style>
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/purchaseManage/purchase/components/AddPurchase.vue b/src/views/purchaseManage/purchase/components/AddPurchase.vue
index 260540a..5dcef72 100644
--- a/src/views/purchaseManage/purchase/components/AddPurchase.vue
+++ b/src/views/purchaseManage/purchase/components/AddPurchase.vue
@@ -59,7 +59,7 @@
v-model="editConfig.infomation.supplierName"
:fetch-suggestions="
(queryString, callback) => {
- querySearchAsync(queryString, callback, 'client');
+ querySearchAsync(queryString, callback, 'supplier');
}
"
value-key="name"
@@ -358,8 +358,12 @@
},
created() {
this.handleGetBomKindDictList();
+ this.$store.dispatch("getSupplier")
},
computed: {
+ supplierList() {
+ return this.$store.state.getSupplierName.supplierList
+ }
},
watch:{
'editCommonConfig.visible':{
@@ -557,8 +561,8 @@
// 閫夋嫨瀹㈡埛鐩稿叧鏂规硶
querySearchAsync(queryString, cb, value) {
var restaurants = [];
- if (value === "client") {
- restaurants = this.clientList;
+ if (value === "supplier") {
+ restaurants = this.supplierList;
}
var results = queryString
? restaurants.filter(this.createStateFilter(queryString))
diff --git a/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue b/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue
index a5dd842..9e553ad 100644
--- a/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue
+++ b/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue
@@ -27,10 +27,13 @@
:table-list="tableList"
:select-box="false"
@selCommonClick="selNameClick"
+ @selTableCol="selTableCol"
>
</TableCommonView>
<div slot="footer" class="dialog-footer">
- <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div>
+ <div class="btn-pager">
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+ </div>
</div>
</div>
</el-dialog>
@@ -39,8 +42,11 @@
<script>
import { getSupplierList } from "@/api/supplierManage/supplier"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+
export default {
name: "EditSelClientDialog",
+ mixins: [pageMixin],
props: {
editCommonConfig: {
type: Object,
@@ -57,7 +63,7 @@
computed: {},
data() {
return {
- dialogWidth: "50%",
+ dialogWidth: "40%",
editConfig: this.editCommonConfig,
queryInput: "",
select: "1",
@@ -66,28 +72,34 @@
loading: false,
searchOptions: [],
tableList: {},
- search_map: {}
+ search_map: {},
+ tableColumn: [
+ { label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190 },
+ { label: "渚涘簲鍟嗗悕绉�", prop: "name", min: 130, isCommonClick: true },
+ { label: "渚涘簲鍟嗙被鍨�", prop: "supplierType", min: 130 },
+ { label: "鎵�灞炶涓�", prop: "industry", min: 130 },
+ { label: "鑱旂郴浜�", prop: "contact", min: 130 },
+ { label: "鑱旂郴鐢佃瘽", prop: "phone", min: 130 },
+ { label: "鐘舵��", prop: "status_name", min: 130 },
+ { label: "鍒涘缓鏃堕棿", prop: "member_name", min: 130 }
+ ],
+ showCol: ["渚涘簲鍟嗙紪鍙�", "渚涘簲鍟嗗悕绉�", "渚涘簲鍟嗙被鍨�", "鑱旂郴浜�", "鑱旂郴鐢佃瘽", "鐘舵��"]
}
},
created() {
this.setTable()
this.getData()
},
+ mounted() {},
methods: {
setTable() {
this.tableList = {
tableInfomation: [],
- tableColumn: [
- { label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190, isCommonClick: true },
- { label: "渚涘簲鍟嗗悕绉�", prop: "name", min: 130 },
- { label: "渚涘簲鍟嗙被鍨�", prop: "supplierType", min: 130 },
- { label: "鎵�灞炶涓�", prop: "industry", min: 130 },
- { label: "鑱旂郴浜�", prop: "contact", min: 130 },
- { label: "鑱旂郴鐢佃瘽", prop: "phone", min: 130 },
- { label: "鐘舵��", prop: "status_name", min: 130 },
- { label: "鍒涘缓鏃堕棿", prop: "member_name", min: 130 }
- ]
+ tableColumn: this.setColumnVisible(this.showCol),
+ showcol: this.showCol,
+ allcol: []
}
+ 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
@@ -95,27 +107,41 @@
this.searchOptions.push({ value: value, label: label })
}
},
+ selTableCol(val) {
+ this.showcol = val
+ this.tableList.tableColumn = this.setColumnVisible(val)
+ },
+ setColumnVisible(showCol) {
+ return this.tableColumn.map((ele) => {
+ return {
+ ...ele,
+ isShowColumn: showCol.includes(ele.label)
+ }
+ })
+ },
handleClose() {
this.editConfig.editVisible = false
},
// 璇锋眰鏁版嵁
async getData(val, content) {
this.loading = true
+
await getSupplierList({
[val]: content,
- page:1,
- pageSize: 10
+ page: this.pagerOptions.currPage,
+ pageSize: this.pagerOptions.pageSize
})
.then((res) => {
- if (res.data.code == 200) {
- if (res.data.data.list && res.data.data.list.length > 0) {
- const list = res.data.data.list.map((item) => {
+ if (res.code == 200) {
+ if (res.data.list && res.data.list.length > 0) {
+ const list = res.data.list.map((item) => {
return {
...item,
status_name: item.status === 0 ? "鏈惎鐢�" : "鍚敤"
}
})
- this.tableList.tableInfomation = list.slice(0, 5) || []
+ this.tableList.tableInfomation = list
+ this.pagerOptions.totalCount = res.data.total
} else {
this.tableList.tableInfomation = []
}
@@ -170,9 +196,16 @@
cursor: pointer;
}
.dialog-footer {
- height: 40px;
- line-height: 40px;
+ height: 50px;
+ line-height: 50px;
color: red;
+ .btn-pager {
+ display: flex;
+ margin-top: 0px;
+ .page {
+ margin-left: auto;
+ }
+ }
}
::v-deep {
.input-with-select .el-input-group__prepend {
diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue
index ae0314a..4a12b42 100644
--- a/src/views/purchaseManage/purchase/index.vue
+++ b/src/views/purchaseManage/purchase/index.vue
@@ -63,6 +63,7 @@
import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
import { getDataByType } from "@/api/data"
+import { getSupplierList } from "@/api/supplierManage/supplier"
export default {
name: "SupplierManage",
props: {},
@@ -83,7 +84,9 @@
editConfig: {
visible: false,
title: "鍒涘缓",
- infomation: {}
+ infomation: {
+ supplierList:[]
+ }
},
purchaseStatusList: getDataByType("purchaseStatus"),
tableColumn: [
@@ -102,6 +105,7 @@
created() {
this.setTable()
this.getData()
+ this.getSupplierData()
},
methods: {
getpurchaseStatus(val) {
@@ -155,6 +159,20 @@
console.log(err)
})
},
+ // 鑾峰彇渚涘簲鍟嗘暟鎹�
+ async getSupplierData() {
+ await getSupplierList({
+ // [val]: content,
+ page:1,
+ pageSize: 10
+ })
+ .then((res) => {
+ if (res.data.code == 200) {
+ this.editConfig.infomation.supplierList=res.data.data.list
+
+ }
+ })
+ },
// 鎼滅储
onFilterSearch(searchText){
this.search = searchText ?? ''
diff --git a/src/views/supplierManage/supplier/AddNewProduct.vue b/src/views/supplierManage/supplier/AddNewProduct.vue
index cee0353..4ebb1bc 100644
--- a/src/views/supplierManage/supplier/AddNewProduct.vue
+++ b/src/views/supplierManage/supplier/AddNewProduct.vue
@@ -96,16 +96,18 @@
if (this.editConfig.title === "娣诲姞") {
createProduct({
list: this.tableData
- }).then((res) => {
- console.log(res)
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("娣诲姞鎴愬姛")
- this.$parent.getProductList()
- }
- }).catch(e=>{
- console.log(e)
})
+ .then((res) => {
+ console.log(res)
+ this.editConfig.visible = false
+ if (res.code === 200) {
+ this.$message.success("娣诲姞鎴愬姛")
+ this.$parent.getProductList()
+ }
+ })
+ .catch((e) => {
+ console.log(e)
+ })
} else {
const params = this.saveParams()
updateProduct(params).then((res) => {
@@ -164,7 +166,7 @@
this.productTableList = {
tableData: this.tableData,
tableColumn: [
- { label: "浜у搧鍚嶇О", prop: "name", productName: true, isRequird: true },
+ { label: "浜у搧鍚嶇О", prop: "name", productName: true, isRequird: true, width: 250 },
{ label: "浜у搧缂栫爜", prop: "number" },
{ label: "璁¢噺鍗曚綅", prop: "unit" },
{ label: "瑙勬牸鍨嬪彿", prop: "specifications" },
diff --git a/src/views/supplierManage/supplier/AddSupplier.vue b/src/views/supplierManage/supplier/AddSupplier.vue
index 93e1654..24608fe 100644
--- a/src/views/supplierManage/supplier/AddSupplier.vue
+++ b/src/views/supplierManage/supplier/AddSupplier.vue
@@ -236,7 +236,7 @@
computed: {},
data() {
return {
- dialogWidth: "60%",
+ dialogWidth: "50%",
editConfig: this.addCommonConfig,
rules: {
name: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
@@ -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() {
@@ -493,11 +493,6 @@
.file-content {
display: flex;
}
- }
- .dialog-footer {
- background-color: #f5f5f5;
- height: 55px;
- line-height: 55px;
}
}
}
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 0755ae7..8383a57 100644
--- a/src/views/supplierManage/supplier/index.vue
+++ b/src/views/supplierManage/supplier/index.vue
@@ -4,14 +4,14 @@
<div class="filter">
<div class="filter-card">
<CommonSearch
- :show-add="true"
- add-title="鏂板缓"
- @addCommonClick="addBtnClick"
- :show-download="false"
- :amount-view="false"
- :show-action-btn="false"
- :placeholder="'璇疯緭鍏ヤ緵搴斿晢鍚嶇О'"
- @searchClick="onFilterSearch"
+ :show-add="true"
+ add-title="鏂板缓"
+ @addCommonClick="addBtnClick"
+ :show-download="true"
+ :amount-view="false"
+ :show-action-btn="false"
+ :placeholder="'璇疯緭鍏ヤ緵搴斿晢鍚嶇О'"
+ @searchClick="onFilterSearch"
/>
</div>
</div>
@@ -19,21 +19,22 @@
<div class="body-card">
<div class="list-view">
<TableCommonView
- ref="tableSupplier"
- :table-list="tableList"
- @selCommonClick="selCommonClick"
- @tableRowClick="tableRowClick"
- @selTableCol="selTableCol"
+ ref="tableSupplier"
+ :table-list="tableList"
+ @selCommonClick="selCommonClick"
+ @selTableCol="selTableCol"
+ @tableRowClick="tableRowClick"
+ :selectClassRow="selectRow"
>
<template slot="tableButton">
<el-table-column label="鎿嶄綔" width="100">
<template slot-scope="scope">
<el-button
- v-if="scope.row.status === 0"
- @click="enableClick(scope.row, '鍚敤')"
- type="text"
- size="small"
- >鍚敤</el-button
+ v-if="scope.row.status === 0"
+ @click="enableClick(scope.row, '鍚敤')"
+ type="text"
+ size="small"
+ >鍚敤</el-button
>
<el-button v-else @click="enableClick(scope.row, '鍋滅敤')" type="text" size="small">鍋滅敤</el-button>
<el-button @click="modifyClick(scope.row)" type="text" size="small">淇敼</el-button>
@@ -47,22 +48,22 @@
</div>
</div>
</div>
-
</div>
<div class="bottom">
<div class="simple-filter">
<div class="simple-filter-card">
<CommonSearch
- :show-add="false"
- :show-download="false"
- :amount-view="false"
- :show-action-btn="false"
- :placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�'"
- @searchClick="onProductFilterSearch"
+ :show-add="false"
+ :show-download="false"
+ :amount-view="false"
+ :show-screen="false"
+ :show-action-btn="false"
+ :placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�'"
+ @searchClick="onProductFilterSearch"
>
<template slot="leftButton">
<div class="sub-title"><span class="sub-title-decorator"></span>鍙彁渚涚殑浜у搧</div>
- <el-button type="primary" size="mini">鍒涘缓閲囪喘鍗�</el-button>
+ <el-button type="primary" size="mini" @click="creatPurchase">鍒涘缓閲囪喘鍗�</el-button>
</template>
<template slot="rightButton">
<el-button type="primary" size="mini" @click="addNewProductClick">娣诲姞鏂颁骇鍝�</el-button>
@@ -74,11 +75,11 @@
<div class="body-card">
<div class="list-view">
<TableCommonView
- ref="tableListProduct"
- :table-list="productTableList"
- @selCommonClick="selCommonClick"
- @getSelectArray="getSelectArray"
- @selTableCol="selProductTableCol"
+ ref="tableListProduct"
+ :table-list="productTableList"
+ @selCommonClick="selCommonClick"
+ @getSelectArray="getSelectArray"
+ @selTableCol="selProductTableCol"
>
<template slot="tableButton">
<el-table-column label="鎿嶄綔" width="170">
@@ -93,10 +94,10 @@
</div>
<div class="btn-pager">
<PagerView
- class="page"
- :pager-options="productPagerOptions"
- @size-change="productChangeHandler"
- @current-change="currentProductHandler"
+ class="page"
+ :pager-options="productPagerOptions"
+ @size-change="productChangeHandler"
+ @current-change="currentProductHandler"
/>
</div>
</div>
@@ -110,6 +111,8 @@
<RaleteSupplierList v-if="raleteSupplierConfig.visible" :common-config="raleteSupplierConfig" />
<!-- 娣诲姞鏂颁骇鍝� -->
<AddNewProduct v-if="newProductConfig.visible" :add-common-config="newProductConfig" />
+ <!-- 鏂板缓/缂栬緫 -->
+ <AddPurchase v-if="editPurchaseConfig.visible" :edit-common-config="editPurchaseConfig" />
</div>
</template>
@@ -121,16 +124,17 @@
import RaleteSupplierList from "@/views/supplierManage/supplier/RaleteSupplierList"
import AddNewProduct from "@/views/supplierManage/supplier/AddNewProduct"
import { getProductList, deleteProduct } from "@/api/productManage/product"
+import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
export default {
name: "SupplierManage",
props: {},
- components: { DetailSupplier, AddSupplier, RaleteSupplierList, AddNewProduct },
+ components: { DetailSupplier, AddSupplier, RaleteSupplierList, AddNewProduct, AddPurchase },
mixins: [pageMixin],
computed: {},
data() {
return {
- searchSupplierName: '',
+ searchSupplierName: "",
tableList: {}, // 渚涘簲鍟嗗垪琛�
productTableList: {}, // 浜у搧鍒楄〃
selValueList: [],
@@ -160,7 +164,7 @@
totalCount: 0
},
supplierId: 0,
- showCol:['渚涘簲鍟嗙紪鍙�','渚涘簲鍟嗗悕绉�','渚涘簲鍟嗙被鍨�','鎵�灞炶涓�','鑱旂郴浜�','鑱旂郴鐢佃瘽','鐘舵��'],
+ showCol: ["渚涘簲鍟嗙紪鍙�", "渚涘簲鍟嗗悕绉�", "渚涘簲鍟嗙被鍨�", "鎵�灞炶涓�", "鑱旂郴浜�", "鑱旂郴鐢佃瘽", "鐘舵��"],
tableColumn: [
{ label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190, isCommonClick: true },
{ label: "渚涘簲鍟嗗悕绉�", prop: "name", min: 130, default: true },
@@ -171,8 +175,8 @@
{ label: "鐘舵��", prop: "status_name", min: 130 },
{ label: "鍒涘缓鏃堕棿", prop: "created_at", min: 130 }
],
- showProductCol:['浜у搧缂栫爜','浜у搧鍚嶇О','浜у搧瑙勬牸','鍗曚綅','閲囪喘浠锋牸','渚涜揣鏃堕暱(澶�)','鐗╂祦鏃堕暱(澶�)'],
- productColumn:[
+ showProductCol: ["浜у搧缂栫爜", "浜у搧鍚嶇О", "浜у搧瑙勬牸", "鍗曚綅", "閲囪喘浠锋牸", "渚涜揣鏃堕暱(澶�)", "鐗╂祦鏃堕暱(澶�)"],
+ productColumn: [
{ label: "浜у搧缂栫爜", prop: "number", min: 190 },
{ label: "浜у搧鍚嶇О", prop: "name", min: 130, default: true },
{ label: "浜у搧瑙勬牸", prop: "specifications", min: 130 },
@@ -180,7 +184,16 @@
{ label: "閲囪喘浠锋牸", prop: "purchasePrice", min: 130 },
{ label: "渚涜揣鏃堕暱(澶�)", prop: "deliveryTime", min: 130 },
{ label: "鐗╂祦鏃堕暱(澶�)", prop: "shippingDuration", min: 130 }
- ]
+ ],
+ editPurchaseConfig: {
+ // 鍒涘缓閲囪喘
+ visible: false,
+ title: "鍒涘缓",
+ infomation: {
+ supplierName: ""
+ }
+ },
+ selectRow: {}
}
},
created() {
@@ -189,19 +202,19 @@
this.getData()
},
methods: {
- setColumnVisible(showCol){
- return this.tableColumn.map(ele=>{
+ setColumnVisible(showCol) {
+ return this.tableColumn.map((ele) => {
return {
...ele,
isShowColumn: showCol.includes(ele.label)
}
})
},
- setProductColumnVisible(showCol){
- return this.productColumn.map(ele=>{
+ setProductColumnVisible(showCol) {
+ return this.productColumn.map((ele) => {
return {
...ele,
- isShowColumn:showCol.includes(ele.label)
+ isShowColumn: showCol.includes(ele.label)
}
})
},
@@ -213,9 +226,9 @@
ref: "tableListRef",
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++) {
@@ -225,8 +238,8 @@
}
},
selTableCol(val) {
- this.showcol = val;
- this.tableList.tableColumn = this.setColumnVisible(val);
+ this.showcol = val
+ this.tableList.tableColumn = this.setColumnVisible(val)
},
setProductTable() {
this.productTableList = {
@@ -235,7 +248,7 @@
selectIndex: true,
showcol: this.showProductCol,
allcol: [],
- tableColumn: this.setProductColumnVisible(this.showProductCol),
+ tableColumn: this.setProductColumnVisible(this.showProductCol)
}
this.searchProductOptions = []
for (let i = 0; i < this.productTableList.tableColumn.length; i++) {
@@ -244,12 +257,14 @@
this.searchProductOptions.push({ value: value, label: label })
}
- this.productTableList.allcol = this.productTableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
- console.log('this.productTableList',this.productTableList)
+ this.productTableList.allcol = this.productTableList.tableColumn
+ .filter((ele) => !ele.default)
+ .map((ele) => ele.label)
+ console.log("this.productTableList", this.productTableList)
},
selProductTableCol(val) {
- this.showProductCol = val;
- this.productTableList.tableColumn = this.setProductColumnVisible(val);
+ this.showProductCol = val
+ this.productTableList.tableColumn = this.setProductColumnVisible(val)
},
// 璇锋眰鏁版嵁
getData() {
@@ -262,33 +277,36 @@
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,
+ id: item.ID,
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
+ this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {}
} else {
this.supplierId = 0
}
- this.$nextTick(() => {
- this.$refs.tableSupplier.$refs.table.setCurrentRow(this.tableList.tableInfomation[0])
- })
+ // this.$nextTick(() => {
+ // this.$refs.tableSupplier.$refs.table.setCurrentRow(this.tableList.tableInfomation[0])
+ // })
// 閲嶆柊鑾峰彇渚涘簲鍟嗗垪琛ㄥ悗搴旇閲嶇疆浜у搧鍒楄〃椤电爜
- this.productPagerOptions.currPage = 1;
+ this.productPagerOptions.currPage = 1
// 濡傛灉渚涘簲鍟嗗垪琛ㄤ负绌�,鍒欏彲鎻愪緵浜у搧鍒楄〃涔熷簲涓虹┖
- if (list.length){
+ if (list.length) {
this.getProductList()
- }else {
- this.productTableList.tableInfomation=[]
- this.productPagerOptions.currPage = 1;
+ } else {
+ this.productTableList.tableInfomation = []
+ this.productPagerOptions.currPage = 1
this.productPagerOptions.totalCount = 0
}
}
@@ -314,15 +332,15 @@
})
},
// 鎼滅储渚涘簲鍟�
- onFilterSearch(searchText){
- this.searchSupplierName = searchText ??''
+ onFilterSearch(searchText) {
+ this.searchSupplierName = searchText ?? ""
this.pagerOptions.currPage = 1
this.getSupplierList()
},
// 鎼滅储浜у搧
- onProductFilterSearch(searchText){
+ onProductFilterSearch(searchText) {
this.productPagerOptions.currPage = 1
- this.getProductList('name', searchText)
+ this.getProductList("name", searchText)
},
// 鏂板缓渚涘簲鍟�
addBtnClick() {
@@ -398,6 +416,7 @@
tableRowClick(row) {
console.log(row)
this.productPagerOptions.currPage = 1
+ this.selectRow = row
this.supplierId = row.ID
this.getProductList()
},
@@ -416,6 +435,15 @@
currentProductHandler(val) {
this.productPagerOptions.currPage = val
this.getProductList()
+ },
+ // 鍒涘缓閲囪喘鍗�
+ creatPurchase() {
+ this.editPurchaseConfig.visible = true
+ this.editPurchaseConfig.title = "鍒涘缓"
+ this.editPurchaseConfig.infomation = {
+ supplierId: this.selectRow.ID,
+ supplierName: this.selectRow.name
+ }
}
}
}
@@ -423,32 +451,32 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
-.supplier{
+.supplier {
height: 100%;
overflow: hidden;
- .top{
+ .top {
position: relative;
height: 55%;
- .body{
+ .body {
position: relative;
height: calc(100% - 92px);
}
}
- .bottom{
+ .bottom {
position: relative;
height: 45%;
- .body{
+ .body {
position: relative;
height: calc(100% - 40px);
padding-top: 0;
}
}
- .filter{
+ .filter {
height: 80px;
display: flex;
align-items: center;
padding: 12px 20px 0 20px;
- &-card{
+ &-card {
height: 80px;
display: flex;
align-items: center;
@@ -459,13 +487,13 @@
background-color: #fff;
}
}
- .simple-filter{
+ .simple-filter {
height: 40px;
box-sizing: border-box;
display: flex;
align-items: center;
padding: 0 20px;
- &-card{
+ &-card {
height: 80px;
display: flex;
align-items: center;
@@ -473,7 +501,7 @@
flex: 1;
}
}
- .body{
+ .body {
box-sizing: border-box;
padding: 10px 20px;
border-radius: 12px;
@@ -504,7 +532,7 @@
}
}
}
-.sub-title{
+.sub-title {
flex-shrink: 0;
margin-right: 20px;
font-size: 16px;
@@ -513,7 +541,7 @@
line-height: 28px;
position: relative;
padding-left: 12px;
- &-decorator{
+ &-decorator {
position: absolute;
height: 100%;
width: 4px;
@@ -522,5 +550,4 @@
left: 0;
}
}
-
</style>
--
Gitblit v1.8.0