From ba921244b39cb1c65ca74a49447726767b69b24e Mon Sep 17 00:00:00 2001
From: leo <10200039@qq.com>
Date: Fri, 21 Apr 2023 23:45:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B0=83=E7=94=A8MDM?=
=?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=89=A9=E6=96=99=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/materia/all.vue | 32 ++++++-------
src/views/materia/components/AddMateria.vue | 6 +--
src/views/materia/route.vue | 52 +++++++++++++--------
3 files changed, 51 insertions(+), 39 deletions(-)
diff --git a/src/views/materia/all.vue b/src/views/materia/all.vue
index 71808b0..aecdda8 100644
--- a/src/views/materia/all.vue
+++ b/src/views/materia/all.vue
@@ -10,8 +10,8 @@
-
+
@@ -165,7 +165,6 @@
current: 1
});
const dataList = ref([]);
- const typeList = ref([]);
const searchObj = ref({});
const postData = ref({});
const MaterialModel= ref({});
@@ -174,12 +173,19 @@
const objInfoObj = ref({});
const editType = ref(1);
const stateList = ref([{
- id: 1,
- name: "进行中"
- }, {
- id: 2,
- name: "已完成"
- }]);
+ id: 1,
+ name: "进行中"
+ }, {
+ id: 2,
+ name: "已完成"
+ }]);
+ const typeList = ref([{
+ id: 1,
+ name: "新增"
+ }, {
+ id: 2,
+ name: "修改"
+ }]);
const hasLoaded = ref(false);
const dataItem=ref([]);
return {
@@ -221,7 +227,6 @@
this.dataColumn[2].hide = true;
this.dataColumn[7].hide = false;
}
- this._getTypeList();
this._getPageList(true);
},
methods: {
@@ -239,13 +244,6 @@
this.showEditBox[i] = false;
}
},
- _getTypeList() {
- this.typeList = [{
- 0: "全部",
- 1: "新增",
- 2: "修改"
- }]
- },
//分页列表
async _getPageList(isFirst, showOk) {
this.pageInfo.total = 0;
diff --git a/src/views/materia/components/AddMateria.vue b/src/views/materia/components/AddMateria.vue
index 0237ce5..fb06ea8 100644
--- a/src/views/materia/components/AddMateria.vue
+++ b/src/views/materia/components/AddMateria.vue
@@ -26,10 +26,10 @@
{{ seletList[0].find(s => s.FValue == dataInfo.FWeightUnit).FName }}
-
+
-
+
@@ -283,7 +283,7 @@ export default {
postData.FState = isCreate ? 1 : 0;
for (let key in postData) {
- if (postData[key] == "") return false;
+ if (postData[key] == "" && key != "FTestCode") return false;
}
postData = JSON.parse(JSON.stringify(postData));
diff --git a/src/views/materia/route.vue b/src/views/materia/route.vue
index a4c6b8c..4c21e7b 100644
--- a/src/views/materia/route.vue
+++ b/src/views/materia/route.vue
@@ -6,19 +6,19 @@
-
-
+
+
-
+
+ :label="tv.name">
@@ -37,11 +37,10 @@
刷新
导出
-
-
- {{ data.FStateName }}
- {{ data.FStateName }}
+
+ 进行中
+ 已完成
操作
@@ -95,14 +94,14 @@
{
title: "物料号",
key: "FMaterialCode",
- width: "160px",
+ width: "120px",
align: 'center',
hide: false
},
{
title: "试验号",
key: "FTestCode",
- width: "160px",
+ width: "120px",
align: 'center',
hide: false
},
@@ -115,7 +114,7 @@
{
title: "产品分类",
key: "FMaterialTypeName",
- width: "200px",
+ width: "160px",
align: 'center'
},
{
@@ -137,6 +136,13 @@
align: 'center',
customSlot: '',
},
+ {
+ title: "状态",
+ key: "FState",
+ width: "100px",
+ align: 'center',
+ customSlot: 'FState',
+ },
{
title: "操作",
key: "operator",
@@ -155,7 +161,16 @@
current: 1
});
const dataList = ref([]);
- const typeList = ref([]);
+ const typeList = ref([{
+ id: 0,
+ name: "物料分类选择"
+ }, {
+ id: 1,
+ name: "物料视图编辑"
+ }, {
+ id: 2,
+ name: "物料视图确认"
+ }]);
const searchObj = ref({});
const postData = ref({});
const MaterialModel= ref({});
@@ -212,7 +227,6 @@
this.dataColumn[7].hide = false;
}
- this._getTypeList();
this._getPageList(true);
},
methods: {
@@ -230,9 +244,6 @@
this.showEditBox[i] = false;
}
},
- async _getTypeList() {
- this.typeList = await getBasicList(33) || [];
- },
//分页列表
async _getPageList(isFirst, showOk) {
//this.dataList = [];
@@ -240,6 +251,7 @@
if (isFirst) {
this.pageInfo.current = 1;
this.pageInfo.total = 0;
+ this.postData.FType = -1;
}
if (this.dataInfoObj && this.dataInfoObj.FID) {
this.postData.FTeamID = this.dataInfoObj.FID;
@@ -248,8 +260,10 @@
if (this.pageTypeObj && this.pageTypeObj == 2) {
this.postData.FState = 99;
}
+ if (!("FType" in this.postData)) this.postData.FType = -1;
this.postData.FPageIndex = this.pageInfo.current;
this.postData.FPageSize = this.pageInfo.limit;
+ console.log('this.postData', this.postData);
let result = await getPageList(this.postData, "MaterialTask");
result.Data.List = result.Data.List || [];
@@ -314,12 +328,12 @@
let val = this.searchObj[key];
if (val != null && val !== "") this.postData[key] = val;
}
- this._getPageList(true);
+ this._getPageList(false);
},
//检索-重置
_clickReset() {
this.searchObj = {};
- this._clickSearch();
+ this._getPageList(true);
}
}
}