From 14e3a4d0811242c203c4d0bfb2a96c9c555d4af5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com>
Date: Thu, 27 Jun 2024 10:49:55 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 1 +
src/api/consumable.js | 11 +++
.../invoicing/consumable/information.vue | 75 +++++++++----------
src/views/shop/components/notice.vue | 0
src/views/shop/shop_configuration.vue | 7 +-
5 files changed, 53 insertions(+), 41 deletions(-)
create mode 100644 src/views/shop/components/notice.vue
diff --git a/package.json b/package.json
index 0ca61b6..a4183ab 100644
--- a/package.json
+++ b/package.json
@@ -43,6 +43,7 @@
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
+ "qrcode": "^1.5.3",
"qs": "^6.10.1",
"screenfull": "4.2.0",
"sortablejs": "^1.15.2",
diff --git a/src/api/consumable.js b/src/api/consumable.js
index 4f84398..e307918 100644
--- a/src/api/consumable.js
+++ b/src/api/consumable.js
@@ -56,6 +56,17 @@ export function posttbConsInfostockIn(data) {
data
});
}
+/**
+ * 修改单位耗材值耗材
+ * @returns
+ */
+export function postapitbConsInfo(data) {
+ return request({
+ url: '/api/tbConsInfo',
+ method: "post",
+ data
+ });
+}
/**
* 新增耗材信息
* @returns
diff --git a/src/views/invoicing/consumable/information.vue b/src/views/invoicing/consumable/information.vue
index f614437..30dfaca 100644
--- a/src/views/invoicing/consumable/information.vue
+++ b/src/views/invoicing/consumable/information.vue
@@ -52,7 +52,7 @@
-
+
@@ -68,7 +68,7 @@
入库
-
+ 编辑
-
+
-
+
-
+
去选择
-
-
+
+
-
取 消
确 定
@@ -117,25 +116,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 重置
-
-
+
+
+
+
+
+
+ 查询
+ 重置
+
+
@@ -193,7 +185,7 @@ import Sortable from 'sortablejs'
import dayjs from 'dayjs'
import settings from '@/settings'
import { upProSort } from '@/api/shop'
-import { gettbConsType, gettbConsInfo, posttbConsInfo, gettbConsInfoFlow, posttbConsInfostockIn } from '@/api/consumable'
+import { gettbConsType, gettbConsInfo, posttbConsInfo, gettbConsInfoFlow, posttbConsInfostockIn, postapitbConsInfo } from '@/api/consumable'
export default {
data() {
return {
@@ -256,7 +248,7 @@ export default {
conCode: '',
conName: '',
conTypeId: '',
- surplusStock:'',
+ surplusStock: '',
conUnit: '',
shopId: localStorage.getItem('shopId'),
},
@@ -411,10 +403,12 @@ export default {
} else {
this.dialogtitle = '编辑'
this.ruleForm.id = item.id
+ this.ruleForm.conTypeId = item.conTypeId
this.ruleForm.conCode = item.conCode
this.ruleForm.conName = item.conName
- this.ruleForm.conTypeId = item.conTypeId
+ this.ruleForm.surplusStock = item.surplusStock
this.ruleForm.conUnit = item.conUnit
+ console.log(this.ruleForm, item)
}
this.dialogshow = true
},
@@ -422,21 +416,22 @@ export default {
this.$refs[formName].validate(async (valid) => {
if (valid) {
if (this.dialogtitle == '编辑') {
- // await puttbConsType({
- // id: this.ruleForm.id,
- // conCode: this.ruleForm.conCode,
- // conName: this.ruleForm.conName,
- // conTypeId: this.ruleForm.conTypeId,
- // conUnit: this.ruleForm.conUnit,
- // shopId: this.ruleForm.shopId
- // })
- // this.dialogshow = false
+ await postapitbConsInfo({
+ id: this.ruleForm.id,
+ conCode: this.ruleForm.conCode,
+ conName: this.ruleForm.conName,
+ conTypeId: this.ruleForm.conTypeId,
+ surplusStock: this.ruleForm.surplusStock,
+ conUnit: this.ruleForm.conUnit,
+ shopId: this.ruleForm.shopId
+ })
+ this.dialogshow = false
} else {//添加
await posttbConsInfo({
conCode: this.ruleForm.conCode,
conName: this.ruleForm.conName,
conTypeId: this.ruleForm.conTypeId,
- surplusStock:this.ruleForm,surplusStock,
+ surplusStock: this.ruleForm.surplusStock,
conUnit: this.ruleForm.conUnit,
shopId: this.ruleForm.shopId
})
diff --git a/src/views/shop/components/notice.vue b/src/views/shop/components/notice.vue
new file mode 100644
index 0000000..e69de29
diff --git a/src/views/shop/shop_configuration.vue b/src/views/shop/shop_configuration.vue
index 1fba74a..63bd8bc 100644
--- a/src/views/shop/shop_configuration.vue
+++ b/src/views/shop/shop_configuration.vue
@@ -3,19 +3,24 @@
+
+