|
|
|
@ -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 |
|
|
|
|