Browse Source

修改报废

dev
caoyizhong 2 years ago
parent
commit
41023a16c1
  1. 3262
      src/components/jeecg/BEditableTable.vue
  2. 6
      src/views/activiti/doneManage.vue
  3. 101
      src/views/activiti/form/ProcessSmaterialsScrapForm.vue

3262
src/components/jeecg/BEditableTable.vue

File diff suppressed because it is too large Load Diff

6
src/views/activiti/doneManage.vue

@ -52,12 +52,12 @@
<span> {{i+1}} </span>
</template>
</a-table-column>
<a-table-column title="任务名称" dataIndex="name" align="center">
<a-table-column title="任务名称" dataIndex="name" align="center" :width="250">
<template slot-scope="t,r,i">
<span> {{t}} </span>
</template>
</a-table-column>
<a-table-column title="所属流程" dataIndex="processName" align="center">
<a-table-column title="所属流程" dataIndex="processName" align="center" :width="240">
<template slot-scope="t,r,i">
<span> {{t}} </span>
</template>
@ -100,7 +100,7 @@
<span> {{millsToTime(t)}} </span>
</template>
</a-table-column>
<a-table-column title="创建时间" dataIndex="createTime" align="center">
<a-table-column title="创建时间" dataIndex="createTime" align="center" :width="170">
<template slot-scope="t">
<span> {{t}} </span>
</template>

101
src/views/activiti/form/ProcessSmaterialsScrapForm.vue

@ -32,15 +32,15 @@
</a-col>
<a-col :span="8">
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['materialType']"
:trigger-change="true" dictCode="material_type" placeholder="请选择物资类型" disabled/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="关联出库流程" :labelCol="labelCol" :wrapperCol="wrapperCol">
<h-delivery v-decorator="['processOutflowId']" code="demo" field="name" orgFields="name" @mounted="getPlanList" @callType="getcallType" @PlanIds="getPlanIds" destFields="name"/>
<j-dict-select-tag type="list" v-decorator="['materialType']" @change="isMaterialType"
:trigger-change="true" dictCode="material_type" placeholder="请选择物资类型" />
</a-form-item>
</a-col>
<!-- <a-col :span="8">-->
<!-- <a-form-item label="关联出库流程" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!-- <h-delivery v-decorator="['processOutflowId']" code="demo" field="name" orgFields="name" @mounted="getPlanList" @callType="getcallType" @PlanIds="getPlanIds" destFields="name"/>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="8">
<a-form-item label="文件" :labelCol="labelCol3" :wrapperCol="wrapperCol3" style="z-index: 10000">
<j-upload v-decorator="['fileId']" :trigger-change="true"></j-upload>
@ -52,17 +52,18 @@
<!-- 子表单区域 -->
<a-tabs v-model="activeKey" @change="handleChangeTabs">
<a-tab-pane tab="物资报废流程报废清单" :key="refKeys[0]" :forceRender="true">
<j-editable-table
<b-editable-table
ref="processSmaterialsScrapList"
:loading="processSmaterialsScrapListTable.loading"
:columns="processSmaterialsScrapListTable.columns"
:dataSource="processSmaterialsScrapListTable.dataSource"
:maxHeight="300"
:disabled="formDisabled"
:isabled="isabled"
:rowNumber="true"
:rowSelection="true"
@valueChange ="onSelect"
:actionButton="false"/>
:actionButton="true"/>
</a-tab-pane>
</a-tabs>
<!-- <j-form-container >
@ -106,6 +107,7 @@
import JDictSelectTag from '@/components/dict/JDictSelectTag'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
import BEditableTable from '@comp/jeecg/BEditableTable'
import moment from 'moment'
export default {
@ -119,11 +121,14 @@
JSelectUserByDep,
JDictSelectTag,
JSearchSelectTag,
JSelectCompany
JSelectCompany,
BEditableTable
},
data() {
return {
heid: true,
isabled : true,
section: { }, //id
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
@ -175,7 +180,6 @@
title: '物料编号',
key: 'equipment',
type: FormTypes.sel_search,
disabled: true,
dictCode: '',
width: '200px',
placeholder: '请输入${title}',
@ -277,6 +281,8 @@
url: {
queryByIdDescription: "/description/processDescription/queryById",
queryByIdMerchandiseNews: "/merchandisenews/processMerchandiseNews/queryById",
queryPageDepare: '/hy/processMaterialsDelivery/queryPageDepare',//
wasteMaterialsUrlList: '/wastematerials/processWasteMaterials/list', //
getForm: '/actBusiness/getForm',
add: '/hy/processSmaterialsScrap/add',
edit: '/hy/processSmaterialsScrap/edit',
@ -293,9 +299,9 @@
assignees:'',
validatorRules: {
// 'blur'
processOutflowId: {rules: [{ required: true, message: '关联出库流程不能为空!' }]},
processReturnId: {rules:[{ required: true, message: '关联归还流程不能为空!' }]},
processPlan: {rules:[ { required: true, message: '请选择流程计划!'}]}
// processOutflowId: {rules: [{ required: true, message: '!' }]},
// processReturnId: {rules:[{ required: true, message: '!' }]},
// processPlan: {rules:[ { required: true, message: '!'}]}
},
}
},
@ -354,13 +360,15 @@
}
}
return false
}
},
},
created() {
//data
this.showFlowData()
let company = sessionStorage.getItem('PARENT_ID')
let userInfo = sessionStorage.getItem('USER_INFORMATION')
this.department(userInfo);
// userInfo.company=company;
if (!this.isNew){
this.init();
@ -369,6 +377,66 @@
}
},
methods: {
//
async isMaterialType(val) {
console.log("this.section",this.section);
if (val !== undefined) {
this.isabled = false;
this.searchInformation(val);
}
},
//
searchInformation(val){
let par = {
accountingAttributes: val
}
if(this.section.orgType == "2"){
par.departId = this.section.departIds;
}
if(this.section.orgType == "3"){
par.departId = this.section.parentId;
}
console.log("par",par);
//
getAction(this.url.wasteMaterialsUrlList,par).then(res =>{
if(res.success){
console.log("156465",res.result.records);
let nu = res.result.records || res.result;
let qc = [];
if (this.processSmaterialsScrapListTable.columns[1].options.length > 0) {
this.processSmaterialsScrapListTable.columns[1].options = []
}
nu.forEach( item => {
qc.push({
title: item.materialNumber,
value: item.merchandiseNewsId,
disabled: false
})
})
this.processSmaterialsScrapListTable.columns[1].options = qc;
}
})
},
department(userInfo){ //
let res = JSON.parse(userInfo);
// console.log("",res);
if(res.orgType === "3"){
getAction(this.url.queryPageDepare,{id:res.departIds}).then(res=>{
if(res.success){
// console.log("1231234",res.result);
this.section = res.result;
}
})
}else{
this.section = res;
}
},
onSelect(record){
// console.log(record.row);
@ -728,9 +796,10 @@
this.$message.error(msg)
},
popupCallback(company, row) {
console.log('获取我的数据》》》》》》》》》》》', res)
let res = JSON.parse(row)
let param = {}
console.log('获取我的数据》》》》》》》》》》》', res)
param.createBy = res.username
param.company = company
param.departId = res.departIds

Loading…
Cancel
Save