From 9b7020d0fe83aa848e92551c5252add6e05c2c5b Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 13 三月 2024 10:34:25 +0800
Subject: [PATCH] 状态就绪问题修改
---
src/views/supplierManage/supplier/RaleteSupplierList.vue | 77 +++++++++++++++++++++++++++++---------
1 files changed, 59 insertions(+), 18 deletions(-)
diff --git a/src/views/supplierManage/supplier/RaleteSupplierList.vue b/src/views/supplierManage/supplier/RaleteSupplierList.vue
index a5ced7b..3dd1a88 100644
--- a/src/views/supplierManage/supplier/RaleteSupplierList.vue
+++ b/src/views/supplierManage/supplier/RaleteSupplierList.vue
@@ -16,13 +16,16 @@
</div>
</div>
<div slot="footer" class="dialog-footer"></div>
+ <!-- 璇︽儏 -->
+ <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" />
</el-dialog>
</div>
</template>
<script>
-import { getProductList } from "@/api/productManage/product"
+import { getProductList,getSupplierByNumber} from "@/api/productManage/product"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+import DetailSupplier from "@/views/supplierManage/supplier/DetailSupplier"
export default {
name: "AddSupplierDialog",
mixins: [pageMixin],
@@ -37,13 +40,26 @@
}
}
},
- components: {},
+ components: { DetailSupplier },
computed: {},
data() {
return {
- dialogWidth: "80%",
+ dialogWidth: "60%",
editConfig: this.commonConfig,
- tableList: {}
+ 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 }
+ ],
+ thatNumber:''
}
},
created() {
@@ -51,30 +67,47 @@
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) {
console.log(val, content)
await getProductList({
number: this.editConfig.infomation.number,
- supplierId: this.editConfig.infomation.supplierId,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
console.log(res.data)
- const list = res.data.data.list.map((item) => {
+ const list = res.data.list.map((item) => {
return {
...item,
supplierNumber: item.supplier.number,
@@ -82,16 +115,24 @@
}
})
this.tableList.tableInfomation = list || []
- this.tableList.totalCount = res.data.data.total
+ this.pagerOptions.totalCount = res.data.total
+ })
+ },
+ // 鍗曟潯渚涘簲鍟嗘暟鎹�-璇︽儏
+ async getSupplierByNumber() {
+ await getSupplierByNumber(
+ this.thatNumber
+ ).then((res) => {
+ this.commonDetail.infomation = { ...res.data.res }
})
},
handleClose() {
this.editConfig.visible = false
},
- selCommonClick(row) {
- console.log(row)
- // this.commonDetail.visible = true
- // this.commonDetail.infomation = { ...row }
+ async selCommonClick(row) {
+ this.thatNumber=row.supplier.number
+ await this.getSupplierByNumber()
+ this.commonDetail.visible = true
}
}
}
--
Gitblit v1.8.0