-
+
- {{ scope.row.bizType }}{{ scope.row.amount }}
+ {{ scope.row.bizType }}{{ scope.row.amount }}
@@ -208,7 +463,10 @@
-
+
@@ -238,6 +506,18 @@ import Sortable from "sortablejs";
import dayjs from "dayjs";
import settings from "@/settings";
import { upProSort } from "@/api/shop";
+
+function returnPromise(index,prosise){
+ return new Promise((resolve,reject)=>{
+ prosise.then(res=>{
+ console.log(res);
+ resolve({sucees:true})
+ }).catch(err=>{
+ console.log(err);
+ resolve({sucees:false})
+ })
+ })
+ }
import {
gettbConsType,
gettbConsInfo,
@@ -316,6 +596,7 @@ export default {
total: 0
},
ruleFormLoading: false,
+ ruleForms:[],
ruleForm: {
conCode: "",
conName: "",
@@ -336,7 +617,7 @@ export default {
{ required: true, message: "请输入耗材信息名称", trigger: "blur" }
],
conTypeId: [
- { required: true, message: "请选择耗材类型", trigger: "blur" }
+ { required: true, message: "请选择耗材类型", trigger: "change" }
],
price: [{ required: true, message: "请输入耗材价格", trigger: "blur" }],
conWarning: [
@@ -362,10 +643,34 @@ export default {
},
mounted() {
this.resetQuery = { ...this.query }
+ this.resetRuleForms()
this.getTableData();
this.getTableDatatype();
+ this.gettbConsType()
},
methods: {
+ //解决selectc值改变后未验证问题
+ selectChange($event,ref,type){
+ this.$refs[ref][0].validateField(type)
+ },
+ //重置添加耗材表单
+ resetRuleForms(){
+ this.ruleForms=[{...this.ruleForm}]
+ this.$refs['refruleForm0']&&this.$refs['refruleForm0'][0].resetFields()
+ },
+ //添加耗材弹窗删除
+ ruleFormsReduce(index){
+ if(this.ruleForms.length>1){
+ this.ruleForms.splice(index,1)
+ }else{
+ this.$message({ type: "error", message: "至少保留一种耗材" });
+ }
+ },
+ //添加耗材弹窗增加
+ ruleFormsAdd(){
+ console.log('add')
+ this.ruleForms.push({...this.ruleForm})
+ },
// 导入耗材
async excelSuccessUpload(file) {
try {
@@ -509,7 +814,8 @@ export default {
this.dialogtitle = "添加";
this.gettbConsType()
this.$nextTick(() => {
- this.$refs.refruleForm.resetFields();
+ // this.$refs.refruleForm.resetFields();
+ this.resetRuleForms()
});
} else {
this.dialogtitle = "编辑";
@@ -523,7 +829,32 @@ export default {
}
this.dialogshow = true;
},
+ //添加
+ async submitForms() {
+ let isAllPassForm=0
+ for(let i in this.ruleForms){
+ const res=await returnPromise(i,this.$refs['refruleForm'+i][0].validate())
+ console.log(res)
+ isAllPassForm+=res.sucees?1:0
+ }
+ //判断验证是否通过
+ if(isAllPassForm===this.ruleForms.length){
+ await posttbConsInfo( this.ruleForms)
+ this.$message({ type: "success", message: "添加成功" });
+
+ // for(let i of this.ruleForms){
+ // const res=await posttbConsInfo(i)
+ // this.$message({ type: "success", message: "添加成功" });
+ // }
+ this.dialogshow = false;
+ this.resetRuleForms()
+ this.ruleFormLoading = false;
+ this.getTableData();
+ }
+ },
+ //编辑
submitForm(formName) {
+
this.$refs[formName].validate(async valid => {
if (valid) {
this.ruleFormLoading = true;
@@ -532,12 +863,17 @@ export default {
this.$message({ type: "success", message: "编辑成功" });
this.dialogshow = false;
} else {
- //添加
- console.log(this.ruleForm, '调试')
- await posttbConsInfo({
- ...this.ruleForm
- });
- this.$message({ type: "success", message: "添加成功" });
+ // //添加
+ // console.log(this.ruleForm, '调试')
+ // for(let i of this.ruleForms){
+ // console.log(i)
+ // await posttbConsInfo({
+ // ...i
+ // });
+ // this.$message({ type: "success", message: "添加成功" });
+
+ // }
+
}
this.dialogshow = false;
this.$refs[formName].resetFields();
@@ -590,6 +926,16 @@ export default {
\ No newline at end of file
diff --git a/src/views/order_manage/order_list.vue b/src/views/order_manage/order_list.vue
index 449d30d..dfab934 100644
--- a/src/views/order_manage/order_list.vue
+++ b/src/views/order_manage/order_list.vue
@@ -54,12 +54,21 @@
>
+
+
+
+
+
查询
重置
下载中...
+
+
@@ -218,7 +229,8 @@ export default {
status: "",
payType: "",
orderNo: "",
- createdAt: []
+ createdAt: [],
+ productName:''
},
tableData: {
data: [],
@@ -262,6 +274,9 @@ export default {
if(this.$route.query.tableName){
this.query.tableName = this.$route.query.tableName
}
+ if(this.$route.query.orderNo){
+ this.query.orderNo = this.$route.query.orderNo
+ }
this.resetQuery = { ...this.query };
this.tbShopPayTypeGet();
this.getTableData();
@@ -320,11 +335,13 @@ export default {
this.tableData.loading = true;
try {
this.payCount();
+ const productName=this.query.productName.replace(/\s+/g,'')
const res = await tbOrderInfoData({
page: this.tableData.page,
pageSize: this.tableData.size,
orderType: this.orderType,
- ...this.query
+ ...this.query,
+ productName
});
this.tableData.loading = false;
this.tableData.data = res.content;
From e7ff989d033d9a4d764447801f0009a334bc29d9 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 18 Jul 2024 18:05:18 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/invoicing/consumable/specifications.vue | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/views/invoicing/consumable/specifications.vue b/src/views/invoicing/consumable/specifications.vue
index 78c2abf..211515d 100644
--- a/src/views/invoicing/consumable/specifications.vue
+++ b/src/views/invoicing/consumable/specifications.vue
@@ -175,7 +175,8 @@
-
+
-
+
+
From cc32bc79a3284942cae2098af6d02ce02a4cbcaa Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 18 Jul 2024 18:16:23 +0800
Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E8=80=97=E6=9D=90=E5=BC=B9=E7=AA=97=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../invoicing/consumable/specifications.vue | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/views/invoicing/consumable/specifications.vue b/src/views/invoicing/consumable/specifications.vue
index 211515d..cb6bb09 100644
--- a/src/views/invoicing/consumable/specifications.vue
+++ b/src/views/invoicing/consumable/specifications.vue
@@ -324,7 +324,7 @@
:visible.sync="informationdialogshow"
@close="resetHaocaiTable"
>
-
+
-
+
+
+
+ {{ scope.row.conCode }}
+
+
+
@@ -403,7 +409,7 @@
-
+
\ No newline at end of file
From 58bf05d7c426dd79f675293b8dafb44d5280d3b8 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 19 Jul 2024 09:04:36 +0800
Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/invoicing/components/cons_record_detail.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/views/invoicing/components/cons_record_detail.vue b/src/views/invoicing/components/cons_record_detail.vue
index ca2b244..af0677d 100644
--- a/src/views/invoicing/components/cons_record_detail.vue
+++ b/src/views/invoicing/components/cons_record_detail.vue
@@ -160,10 +160,11 @@ export default {
},
};
-
+
\ No newline at end of file