Browse Source

修改出库列表显示

dev
caoyizhong 2 years ago
parent
commit
266a840ab3
  1. 3218
      src/components/jeecg/CEditableTable.vue
  2. 2
      src/components/jeecg/index.js
  3. 181
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue

3218
src/components/jeecg/CEditableTable.vue

File diff suppressed because it is too large Load Diff

2
src/components/jeecg/index.js

@ -32,6 +32,7 @@ import JSwitch from './JSwitch.vue'
import JTime from './JTime.vue'
import JTreeTable from './JTreeTable.vue'
import PEditableTable from './PEditableTable'
import CEditableTable from './CEditableTable'
export default {
install(Vue) {
Vue.component('JMarkdownEditor', JMarkdownEditor)
@ -68,5 +69,6 @@ export default {
Vue.component('JUpload', JUpload)
Vue.component('FileList', FileList)
Vue.component('PEditableTable',PEditableTable)
Vue.component('CEditableTable',CEditableTable)
}
}

181
src/views/activiti/form/ProcessMaterialsDeliveryForm.vue

@ -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 = []

Loading…
Cancel
Save