From 904c6be6ba22ab6d3e5781c16c1adebf8c5ea6da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com>
Date: Thu, 17 Oct 2024 11:31:04 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E4=BF=AE=E6=94=B9=20=20=20?=
=?UTF-8?q?=E8=80=97=E6=9D=90=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/consumable.js | 7 +-
.../invoicing/consumable/information.vue | 115 ++++++++----------
src/views/product/components/bindCons.vue | 12 +-
src/views/product/index.vue | 8 +-
4 files changed, 65 insertions(+), 77 deletions(-)
diff --git a/src/api/consumable.js b/src/api/consumable.js
index 10fc6d0..ece7e69 100644
--- a/src/api/consumable.js
+++ b/src/api/consumable.js
@@ -39,13 +39,8 @@ export function puttbConsType(data) {
* @returns
*/
export function gettbConsInfo(data) {
- // return request({
- // url: '/api/tbConsInfo',
- // method: "get",
- // params
- // });
return request({
- url: "/api/viewConInfoFlow/get",
+ url: "/api/tbConsInfo/allAndPro",
method: "post",
data
});
diff --git a/src/views/invoicing/consumable/information.vue b/src/views/invoicing/consumable/information.vue
index 57d9a23..5a63abc 100644
--- a/src/views/invoicing/consumable/information.vue
+++ b/src/views/invoicing/consumable/information.vue
@@ -14,7 +14,7 @@
/> -->
-
@@ -30,15 +30,10 @@
+
查询
重置
-
- 导出耗材
- 导入耗材
-
-
-
添加
入库
@@ -46,6 +41,18 @@
耗材记录
分类管理
供应商管理
+ 导出耗材
+ 导入耗材
+
+
+
+
+
@@ -242,20 +249,15 @@
-
-
-
-
-
- -->
+ -->
+
- {{
- item.productName }}
+ item.name }},
@@ -264,7 +266,7 @@
- {{ item.productName }}
+ {{ item.name }}
@@ -273,8 +275,7 @@
- {{ (scope.row.balance).toFixed(2) }}
-
+ {{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }}
@@ -290,15 +291,20 @@
{{ scope.row.conWarning }}
-
-
+
+
+
+
+
+
@@ -355,7 +361,7 @@
-
@@ -418,7 +424,7 @@
-
+
-->
@@ -456,9 +462,9 @@
-
+
@@ -593,7 +599,6 @@ export default {
return {
tongji: {},//统计
dayjs,
- consTypeList: [],
query: {
conTypeId: "",
conTypeName: "",
@@ -643,7 +648,7 @@ export default {
tableDatatype: {
data: [],
page: 0,
- size: 30,
+ size:100,
loading: false,
total: 0
},
@@ -716,7 +721,6 @@ export default {
this.resetRuleForms()
this.getTableData();
this.getTableDatatype();
- this.gettbConsType()
},
methods: {
lookDetail(row) {
@@ -870,25 +874,27 @@ export default {
createTime: arr
});
this.tableData.loading = false;
- // this.tableData.data = res.content;
this.tableData.total = res.totalElements;
+ this.tableData.data = res.content;
this.gettbConsInfoFlowcount()//统计
- this.tableData.data = res.content.map(v => {
- const productIds = v.productId ? v.productId.split(',') : []
- return {
- ...v,
- editNYD: 0,
- product: productIds.map((str, index) => {
- const startIndex = str.indexOf('_')
- const productId = str.slice(0, startIndex)
- const productName = str.slice(startIndex + 1, str.length)
- return {
- productId,
- productName: productName + `${(index == productIds.length - 1) ? '' : ','}`
- }
- })
- }
- });
+ console.log(this.tableData.data)
+ // this.tableData.data = res.content.map(v => {
+ // const productIds = v.productId ? v.productId.split(',') : []
+ // return {
+ // ...v,
+ // editNYD: 0,
+ // product: productIds.map((str, index) => {
+ // const startIndex = str.indexOf('_')
+ // const productId = str.slice(0, startIndex)
+ // const productName = str.slice(startIndex + 1, str.length)
+ // return {
+ // productId,
+ // productName: productName + `${(index == productIds.length - 1) ? '' : ','}`
+ // }
+ // })
+ // }
+ // });
+ console.log(this.tableData.data)
} catch (error) {
console.log(error);
}
@@ -963,7 +969,7 @@ export default {
shopId: localStorage.getItem("shopId"),
productId: '',//预留耗材id
column: this.stockData.column,//列名
- conName:this.query.conName,
+ conName: this.query.conName,
createdAt: arr//耗材id
})
this.stockData.loading = false;
@@ -976,19 +982,6 @@ export default {
this.gettbConsInfoFlowstock();
},
// 获取类型
- async gettbConsType() {
- try {
- const res = await gettbConsType({
- page: 0,
- size: 100,
- shopId: localStorage.getItem("shopId")
- })
- this.consTypeList = res.content
- } catch (error) {
- console.log(error);
- }
- },
- // 获取类型
async getTableDatatype() {
this.tableDatatype.loading = true;
try {
@@ -1047,7 +1040,7 @@ export default {
if (type == "add") {
// 添加
this.dialogtitle = "添加";
- this.gettbConsType()
+ this.getTableDatatype()
this.$nextTick(() => {
this.$refs.refruleForm.resetFields();
this.resetRuleForms()
diff --git a/src/views/product/components/bindCons.vue b/src/views/product/components/bindCons.vue
index 4d4c1e4..ff4b22b 100644
--- a/src/views/product/components/bindCons.vue
+++ b/src/views/product/components/bindCons.vue
@@ -23,8 +23,8 @@
-
+
库存:{{ scope.row.stockNumber }}
@@ -65,8 +65,8 @@
-
+
库存:{{ scope.row.stockNumber }}
@@ -188,13 +188,13 @@ export default {
},
// 商品选择耗材
selectionChange(e, row) {
- let item = this.options.find(item => item.consId == e)
+ let item = this.options.find(item => item.id == e)
row.name = item.conName
row.conUnit = item.conUnit
},
// 规格选择耗材
skuSelectionChange(e, row) {
- let item = this.options.find(item => item.consId == e)
+ let item = this.options.find(item => item.id == e)
row.name = item.conName
row.conUnit = item.conUnit
},
diff --git a/src/views/product/index.vue b/src/views/product/index.vue
index 844e94f..81fa50c 100644
--- a/src/views/product/index.vue
+++ b/src/views/product/index.vue
@@ -49,12 +49,12 @@
- 增加数量
+ 增加数量:
{{ countInfo.addCountNumber || 0 }}
- 手动增加:
+ 手动增加:
{{ countInfo.addNumber || 0 }}
@@ -71,12 +71,12 @@
- 减少数量
+ 减少数量:
{{ countInfo.subCountNumber || 0 }}
- 手动减少:
+ 手动减少:
{{ countInfo.subNumber || 0 }}