From abbbf05bdc0e0c442ecce22881891c7aacf2fe7b Mon Sep 17 00:00:00 2001
From: caoyizhong <1270296080@qq.com>
Date: Tue, 25 Oct 2022 18:09:46 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E6=93=8D?=
=?UTF-8?q?=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../activiti/form/ProcessUdgetPlanForm.vue | 81 +++++++++++++++++--
src/views/dashboard/NewHomePage.vue | 21 +++--
.../ProcessMaterialStorageList.vue | 6 +-
.../modules/ProcessMaterialStorageForm.vue | 6 +-
.../ProcessUnitWasteWarehouseCodeForm.vue | 16 +++-
5 files changed, 110 insertions(+), 20 deletions(-)
diff --git a/src/views/activiti/form/ProcessUdgetPlanForm.vue b/src/views/activiti/form/ProcessUdgetPlanForm.vue
index fb458cf..4bebd97 100644
--- a/src/views/activiti/form/ProcessUdgetPlanForm.vue
+++ b/src/views/activiti/form/ProcessUdgetPlanForm.vue
@@ -54,7 +54,7 @@
-
+
@@ -65,15 +65,20 @@
+
+
+
+
+
@@ -118,6 +123,7 @@
},
data() {
return {
+ bigId:[],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
@@ -145,14 +151,24 @@
loading: false,
dataSource: [],
columns: [
+
{
title: '物料组',
key: 'materialGroup',
- type: FormTypes.select,
+ // type: FormTypes.slot, // <-------------改为 slot 格式
+ // slotName: 'actions', // <-------------slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+ type: FormTypes.sel_search,
dictCode: '',
width: '200px',
placeholder: '请输入${title}',
- defaultValue: ''
+ options: [],
+ props:{title: 'show title'}
+ // scopedSlots: { customRender: 'edit' },//引入的插槽
+ // customRender:function (t,r,index) {
+ // console.log(t,r);
+ //
+ // }
+
},
{
title: '物料号',
@@ -309,6 +325,8 @@
add: '/hy/processUdgetPlan/add',
edit: '/hy/processUdgetPlan/edit',
queryById: '/hy/processUdgetPlan/queryById',
+ descriptionRake: "/description/processDescription/descriptionName",
+ merchandiseNewsList: "/merchandisenews/processMerchandiseNews/merchandiseNewsList",
processUdgetPlanMaterial: {
list: '/hy/processUdgetPlan/queryProcessUdgetPlanMaterialByMainId'
}
@@ -374,8 +392,61 @@
this.init();
}
this.getAllTable()
+ this.fetchData();
},
methods: {
+ onSelect(record) {
+ // this.$refs.processUdgetPlanMaterial.getValues((error, values) => {
+ //
+ // console.log(error, values)
+ // })
+
+ console.log(record.row);
+ console.log(record.row.materialGroup);
+ if(record.row.materialGroup.length > 0){
+ console.log("执行l")
+ this.fetchMerchandiseNews(record.row.materialGroup);
+ }
+
+ },
+ fetchMerchandiseNews(value){ //查询物料组
+ //查询大品类数据
+ let par = {
+ delFlag: 0,
+ descriptionId:value,
+ }
+ this.bigId = [];
+ getAction(this.url.merchandiseNewsList,par).then((res)=>{
+ if(res.success){
+ console.log(res.result);
+ // res.result.forEach( item => {
+ // this.processUdgetPlanMaterialTable.columns[0].options.push({
+ // title : item.descriptionName,
+ // value : item.id,
+ // })
+ // })
+ }
+ });
+ },
+
+ fetchData(value){ //查询物料组
+ //查询大品类数据
+ let par = {
+ delFlag: 0,
+ }
+ this.bigId = [];
+ getAction(this.url.descriptionRake,par).then((res)=>{
+ if(res.success){
+ console.log(res.result);
+ res.result.forEach( item => {
+ this.processUdgetPlanMaterialTable.columns[0].options.push({
+ title : item.descriptionName,
+ value : item.id,
+ })
+ })
+ }
+ });
+ },
/*回显数据*/
init(){
this.btndisabled = true;
diff --git a/src/views/dashboard/NewHomePage.vue b/src/views/dashboard/NewHomePage.vue
index 2d6dc31..8b5b85d 100644
--- a/src/views/dashboard/NewHomePage.vue
+++ b/src/views/dashboard/NewHomePage.vue
@@ -4,7 +4,7 @@
- more
+ 更多
物资管理实施细则
@@ -12,16 +12,16 @@
- more
- card content
- card content
- card content
+ 更多
+
+
+
- more
+ 更多
@@ -47,6 +47,15 @@ import * as echarts from 'echarts'
export default {
name: "NewHomePage",
data(){
+ return{
+ url: {
+ getForm:'/actBusiness/getForm',
+ add: '/hy/processUdgetPlan/add',
+ edit: '/hy/processUdgetPlan/edit',
+ queryById: '/hy/processUdgetPlan/queryById',
+ descriptionRake: "/description/processDescription/list",
+ },
+ }
},
mounted() {
diff --git a/src/views/materialstorage/ProcessMaterialStorageList.vue b/src/views/materialstorage/ProcessMaterialStorageList.vue
index 6a3afca..e62ed2a 100644
--- a/src/views/materialstorage/ProcessMaterialStorageList.vue
+++ b/src/views/materialstorage/ProcessMaterialStorageList.vue
@@ -111,9 +111,9 @@
更多
-
- 详情
-
+
+
+
handleDelete(record.id)">
删除
diff --git a/src/views/materialstorage/modules/ProcessMaterialStorageForm.vue b/src/views/materialstorage/modules/ProcessMaterialStorageForm.vue
index 0709d24..79382b4 100644
--- a/src/views/materialstorage/modules/ProcessMaterialStorageForm.vue
+++ b/src/views/materialstorage/modules/ProcessMaterialStorageForm.vue
@@ -20,8 +20,8 @@
@@ -58,7 +58,7 @@
-
+
-
+
@@ -68,6 +68,7 @@
return {
form: this.$form.createForm(this),
model: {},
+ hideDis : true,
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
@@ -96,8 +97,10 @@
},
computed: {
formDisabled(){
+ // this.hideDis = false;
if(this.formBpm===true){
if(this.formData.disabled===false){
+ console.log(this.formData.disabled);
return false
}
return true
@@ -122,10 +125,17 @@
this.edit({});
},
edit (record) {
+
+
this.form.resetFields();
this.model = Object.assign({}, record);
this.visible = true;
this.$nextTick(() => {
+ if(JSON.stringify(record) ==='{}'){
+ this.hideDis = false;
+ }else{
+ this.hideDis = true;
+ }
this.form.setFieldsValue(pick(this.model,'unit','libraryAssociationIdInvisible','libraryAssociationIdWaste','remark'))
})
},
@@ -156,7 +166,7 @@
method = 'put';
}
let formData = Object.assign(this.model, values);
- console.log("表单提交数据",formData)
+ console.log("表单提交数据",formData);
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);