|
|
|
@ -59,24 +59,24 @@
|
|
|
|
|
<!-- 子表单区域 --> |
|
|
|
|
<a-tabs v-model="activeKey" @change="handleChangeTabs"> |
|
|
|
|
<a-tab-pane tab="物资出库流程出库清单" :key="refKeys[0]" :forceRender="true"> |
|
|
|
|
<j-editable-table |
|
|
|
|
<c-editable-table |
|
|
|
|
ref="processMaterialsDeliveryList" |
|
|
|
|
:loading="processMaterialsDeliveryListTable.loading" |
|
|
|
|
:columns="processMaterialsDeliveryListTable.columns" |
|
|
|
|
:dataSource="processMaterialsDeliveryListTable.dataSource" |
|
|
|
|
:maxHeight="300" |
|
|
|
|
:disabled="hiegs" |
|
|
|
|
:disabled="this.hiegs" |
|
|
|
|
@valueChange="onSelect" |
|
|
|
|
:rowNumber="true" |
|
|
|
|
:rowSelection="true" |
|
|
|
|
:actionButton="true" |
|
|
|
|
@added="addid" |
|
|
|
|
@descriptionFetch="addid" |
|
|
|
|
> |
|
|
|
|
<!-- <template v-slot:qing="props">--> |
|
|
|
|
<!-- <a-input v-decorator="['pleaseSendNumber']" placeholder="请输入" style="width: 100%" @change="shuru" type="number"/>--> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
|
|
</j-editable-table> |
|
|
|
|
</c-editable-table> |
|
|
|
|
</a-tab-pane> |
|
|
|
|
</a-tabs> |
|
|
|
|
<j-form-container> |
|
|
|
@ -176,6 +176,7 @@
|
|
|
|
|
dictCode: '', |
|
|
|
|
width: '200px', |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
disabled: true, |
|
|
|
|
options: [] |
|
|
|
|
// props:{title: 'show title'} |
|
|
|
|
// scopedSlots: { customRender: 'edit' },//引入的插槽 |
|
|
|
@ -340,7 +341,7 @@
|
|
|
|
|
processPlan: { rules: [{ required: true, message: '请选择流程计划!' }] } |
|
|
|
|
}, |
|
|
|
|
materialGroupId: undefined, |
|
|
|
|
hiegs:true |
|
|
|
|
hiegs:true, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
props: { |
|
|
|
@ -420,84 +421,149 @@
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
shuliang() { |
|
|
|
|
this.addId |
|
|
|
|
}, |
|
|
|
|
//请数量输入 |
|
|
|
|
addid(val) { |
|
|
|
|
this.addId = val.row.id |
|
|
|
|
//新增输入 |
|
|
|
|
async addid(val) { |
|
|
|
|
// this.addId = val.row.id |
|
|
|
|
// console.log(val); |
|
|
|
|
this.materialGroupId = undefined |
|
|
|
|
this.fetchData(this.accountingAttributesVal); |
|
|
|
|
|
|
|
|
|
// this.fetchData(this.accountingAttributesVal); |
|
|
|
|
// this.fetchMerchandiseNews(); |
|
|
|
|
if (this.accountingAttributesVal === "1" ) { |
|
|
|
|
console.log("执行账外") |
|
|
|
|
//账外 |
|
|
|
|
await this.fetchMerchandiseNewsZW() |
|
|
|
|
} else { |
|
|
|
|
console.log("执行总库") |
|
|
|
|
//总库 |
|
|
|
|
await this.fetchMerchandiseNews() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//核算属性切换 |
|
|
|
|
isMaterialType(val) { |
|
|
|
|
if (val !== undefined) { |
|
|
|
|
this.accountingAttributesVal = val |
|
|
|
|
this.hiegs = false |
|
|
|
|
this.fetchData(val) |
|
|
|
|
// if (val === "1" ) { |
|
|
|
|
// console.log("执行账外") |
|
|
|
|
// //账外 |
|
|
|
|
// await this.fetchMerchandiseNewsZW() |
|
|
|
|
// } else { |
|
|
|
|
// console.log("执行总库") |
|
|
|
|
// //总库 |
|
|
|
|
// await this.fetchMerchandiseNews() |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async onSelect(record) { |
|
|
|
|
// console.log(record) |
|
|
|
|
let isMA = true |
|
|
|
|
if (!!record.row.materialGroup && !!record.row.materialGroup ) { |
|
|
|
|
// console.log("执行materialGroup111") |
|
|
|
|
if (!!record.row.id && record.row.materialGroup !== this.materialGroupId && record.column.key !== "allotNumber") { |
|
|
|
|
// console.log("执行materialGroup222") |
|
|
|
|
if (this.rolePlay) { |
|
|
|
|
// console.log("执行账外") |
|
|
|
|
console.log(record) |
|
|
|
|
let isMA = true; |
|
|
|
|
// if (!!record.row.materialGroup && !!record.row.materialGroup ) { |
|
|
|
|
// // console.log("执行materialGroup111") |
|
|
|
|
// if (!!record.row.id && record.row.materialGroup !== this.materialGroupId && record.column.key !== "allotNumber") { |
|
|
|
|
// // console.log("执行materialGroup222") |
|
|
|
|
// if (this.rolePlay) { |
|
|
|
|
// // console.log("执行账外") |
|
|
|
|
// //账外 |
|
|
|
|
// await this.fetchMerchandiseNewsZW(record.row.materialGroup, 1) |
|
|
|
|
// } else { |
|
|
|
|
// // console.log("执行总库") |
|
|
|
|
// //总库 |
|
|
|
|
// await this.fetchMerchandiseNews(record.row.materialGroup, 1) |
|
|
|
|
// } |
|
|
|
|
// |
|
|
|
|
// let valu = [ |
|
|
|
|
// { |
|
|
|
|
// rowKey: record.row.id, |
|
|
|
|
// values: { |
|
|
|
|
// 'equipment': '', |
|
|
|
|
// 'materialGroup': record.row.materialGroup, |
|
|
|
|
// 'materialName': '', |
|
|
|
|
// 'materialUnit': '', |
|
|
|
|
// 'supplierId': '', |
|
|
|
|
// 'materialPrice': '', |
|
|
|
|
// 'actualSendNumber': '', |
|
|
|
|
// 'materialAmount': '', |
|
|
|
|
// 'pleaseSendNumber': '' |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// ] |
|
|
|
|
// // console.log(valu) |
|
|
|
|
// this.$refs.processMaterialsDeliveryList.setValues(valu) |
|
|
|
|
// this.materialGroupId = record.row.materialGroup |
|
|
|
|
// isMA = false |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
let eAll = 0; |
|
|
|
|
// if (!!record.row.materialGroup && !! record.row.equipment && isMA) { |
|
|
|
|
let b = false; |
|
|
|
|
for (const res of this.bigIdMerchandiseNewsList) { |
|
|
|
|
if(res.merchandiseNewsId === record.row.equipment ){ |
|
|
|
|
b = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( !! record.row.equipment && isMA && record.row.materialGroup !== this.materialGroupId ) { |
|
|
|
|
// console.log("执行materialNumber") |
|
|
|
|
if(!b){ |
|
|
|
|
if (this.accountingAttributesVal === "1" ) { |
|
|
|
|
console.log("执行账外") |
|
|
|
|
//账外 |
|
|
|
|
await this.fetchMerchandiseNewsZW(record.row.materialGroup, 1) |
|
|
|
|
await this.fetchMerchandiseNewsZW(record.row.equipment) |
|
|
|
|
} else { |
|
|
|
|
// console.log("执行总库") |
|
|
|
|
console.log("执行总库") |
|
|
|
|
//总库 |
|
|
|
|
await this.fetchMerchandiseNews(record.row.materialGroup, 1) |
|
|
|
|
await this.fetchMerchandiseNews() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let valu = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'equipment': '', |
|
|
|
|
'materialGroup': record.row.materialGroup, |
|
|
|
|
'materialName': '', |
|
|
|
|
'materialUnit': '', |
|
|
|
|
'supplierId': '', |
|
|
|
|
'materialPrice': '', |
|
|
|
|
'actualSendNumber': '', |
|
|
|
|
'materialAmount': '', |
|
|
|
|
'pleaseSendNumber': '' |
|
|
|
|
await this.$refs.processMaterialsDeliveryList.getValues((a, b, c) => { |
|
|
|
|
console.log("bbbbbbbbbbbbbb",b) |
|
|
|
|
b.forEach(item => { |
|
|
|
|
if (item.equipment === record.row.equipment && !!item.materialGroup && !record.row.materialGroup) { |
|
|
|
|
let values = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'materialGroup': '', |
|
|
|
|
'materialNumber': '', |
|
|
|
|
'materialSeries': '', |
|
|
|
|
'materialName': '', |
|
|
|
|
'materialUnit': '', |
|
|
|
|
'supplierId': '', |
|
|
|
|
'materialAmount': '', |
|
|
|
|
'materialType': '' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
// console.log(valu) |
|
|
|
|
this.$refs.processMaterialsDeliveryList.setValues(valu) |
|
|
|
|
this.materialGroupId = record.row.materialGroup |
|
|
|
|
isMA = false |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
// console.log("sadf1111") |
|
|
|
|
this.$refs.processMaterialsDeliveryList.setValues(values) |
|
|
|
|
return ; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
let eAll = 0; |
|
|
|
|
if (!!record.row.materialGroup && !! record.row.equipment && isMA) { |
|
|
|
|
// console.log("执行materialNumber") |
|
|
|
|
|
|
|
|
|
let materialName = {} |
|
|
|
|
this.bigIdMerchandiseNewsList.forEach(item => { |
|
|
|
|
console.log(item) |
|
|
|
|
if (item.merchandiseNewsId === record.row.equipment) { |
|
|
|
|
materialName = { |
|
|
|
|
name: item.merchandiseName, |
|
|
|
|
unit: item.materialsUnit, |
|
|
|
|
materialGroup: item.materialClassify, |
|
|
|
|
supplierName: item.supplierId, |
|
|
|
|
price: item.materialPrice, |
|
|
|
|
residueNumber: item.residueNumber === undefined ? 0 : item.residueNumber |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// console.log("materialName",materialName); |
|
|
|
|
if (record.row.id !== undefined && Object.keys(materialName).length > 0) { |
|
|
|
|
// console.log("materialName",materialName); |
|
|
|
|
let values = [ |
|
|
|
@ -505,7 +571,7 @@
|
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'equipment': record.row.equipment, |
|
|
|
|
'materialGroup': record.row.materialGroup, |
|
|
|
|
'materialGroup': materialName.materialGroup, |
|
|
|
|
'materialName': materialName.name, |
|
|
|
|
'materialUnit': materialName.unit, |
|
|
|
|
'supplierId': materialName.supplierName, |
|
|
|
@ -517,7 +583,7 @@
|
|
|
|
|
] |
|
|
|
|
this.$refs.processMaterialsDeliveryList.setValues(values) |
|
|
|
|
}else{ |
|
|
|
|
console.log("this.data.materialType",this.data.materialType) |
|
|
|
|
// console.log("this.data.materialType",this.data.materialType) |
|
|
|
|
if (parseInt(this.data.materialType) === 1) { |
|
|
|
|
//账外 |
|
|
|
|
await this.getEquipmentInvisible(record.row.equipment); |
|
|
|
@ -530,7 +596,7 @@
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.materialGroupId = record.row.equipment; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 根据请发数量计算 |
|
|
|
@ -644,8 +710,7 @@
|
|
|
|
|
//你的逻辑代码 |
|
|
|
|
let par = { |
|
|
|
|
delFlag: 0, |
|
|
|
|
descriptionId: value |
|
|
|
|
|
|
|
|
|
accountingAttributes: this.accountingAttributesVal, |
|
|
|
|
} |
|
|
|
|
this.bigIdMerchandiseNewsList = [] |
|
|
|
|
let qc = [] |
|
|
|
@ -709,15 +774,15 @@
|
|
|
|
|
//你的逻辑代码 |
|
|
|
|
let par = { |
|
|
|
|
delFlag: 0, |
|
|
|
|
descriptionId: value |
|
|
|
|
|
|
|
|
|
merchandiseNewsId: value |
|
|
|
|
} |
|
|
|
|
let ue = sessionStorage.getItem('USER_INFORMATION') |
|
|
|
|
let res = JSON.parse(ue) |
|
|
|
|
if (res.realname !== '管理员') { |
|
|
|
|
// console.log("78979789",res); |
|
|
|
|
// 查询大品类数据 账外库 |
|
|
|
|
par.departId = res.departIds; |
|
|
|
|
par.departId = res.departIds; |
|
|
|
|
if( !res.departIds){ |
|
|
|
|
this.$message.warn("当前账号没有物资库!!!"); |
|
|
|
|
} |
|
|
|
|
this.bigIdMerchandiseNewsList = [] |
|
|
|
|
let qc = [] |
|
|
|
|