Browse Source

修改数据选择操作问题

dev
caoyizhong 2 years ago
parent
commit
5fb103cced
  1. 25
      src/components/jeecg/CEditableTable.vue
  2. 10
      src/components/jeecg/PEditableTable.vue
  3. 60
      src/views/activiti/form/ProcessMaterialsAllotForm.vue
  4. 43
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue
  5. 153
      src/views/activiti/form/ProcessUdgetPlanForm.vue
  6. 8
      src/views/dictionaries/ProcessDictionariesList.vue
  7. 4
      src/views/dictionaries/ProcessSupplierList.vue
  8. 12
      src/views/dictionaries/modules/ProcessSupplierModal.vue
  9. 8
      src/views/supplier/ProcessSupplierList.vue
  10. 13
      src/views/supplier/modules/ProcessSupplierForm.vue

25
src/components/jeecg/CEditableTable.vue

@ -684,6 +684,10 @@
type: Number,
default: 400
},
//
qeihuan: {
type: String,
},
//
disabledRows: {
type: Object,
@ -884,6 +888,15 @@
},
//
watch: {
qeihuan:{
immediate: true,
handler: function (newValue) {
// console.log(newValue,"");
this.$nextTick( () =>{
this.getClone();
});
}
},
rows: {
immediate: true,
handler(val, old) {
@ -970,6 +983,17 @@
shuChange(val,b,c){
// console.log("sdtgfsd",val,b,c)
},
//
getClone(){
let ids= [];
this.getValues((a,b,c)=>{
b.forEach(it => {
ids.push(it.id);
});
this.removeRows(ids);
});
},
a(){
// console.log("l");
@ -2756,6 +2780,7 @@
disabled: isb
})
})
this.columns[index].options = [];
this.columns[index].options = a
resolve( );
}

10
src/components/jeecg/PEditableTable.vue

@ -528,6 +528,7 @@
showSearch
@search="searchOption($event,col,index)"
optionFilterProp="children"
:autoClearSearchValue = false
v-bind="buildProps(row,col)"
style="width: 100%;"
:value="searchSelectValues[id]"
@ -715,8 +716,7 @@
},
//
dragSortType: {
type: String,
default: false
type: String
},
//
putUnder: {
@ -1404,8 +1404,9 @@
},
/** 删除被选中的行 */
removeSelectedRows() {
this.removeRows(this.selectedRowIds)
this.selectedRowIds = []
this.removeRows(this.selectedRowIds);
this.selectedRowIds = [];
this.$emit("bumen",true);
},
/** 删除一行或多行 */
removeRows(id) {
@ -2719,6 +2720,7 @@
// console.log("option.componentOptions.children[0]",option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0)
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
searchOption (input,pro,index){
// console.log("searchOption=========",input,pro,index);
return new Promise(async (resolve, reject) => {

60
src/views/activiti/form/ProcessMaterialsAllotForm.vue

@ -76,6 +76,8 @@
:rowNumber="true"
:rowSelection="true"
:appropriationPlan ="this.libraryInvisible"
:drag-sort-type="this.materialTypeRecord"
:qeihuan = this.qeihuan
:actionButton="!task"
@valueChange="onSelect"
@descriptionFetch="fetchMerchandiseNews"
@ -358,7 +360,8 @@
},
bigIdMerchandiseNewsList: [],
materialGroupId: undefined,
materialTypeRecord: undefined
materialTypeRecord: undefined,
qeihuan: undefined
}
},
props: {
@ -455,31 +458,33 @@
// return;
// }
// if (!!record.row.id && this.materialGroupId !== record.row.materialGroup && record.column.key !== "allotNumber" ) {
// // console.log("record.row.materialGroup")
// await this.fetchMerchandiseNews(record.row.materialGroup, 1)
// let value = [
// {
// rowKey: record.row.id,
// values: {
// 'equipment': '',
// 'materialGroup': record.row.materialGroup,
// 'materialName': '',
// 'materialUnit': '',
// 'supplierId': '',
// 'materialPrice': '',
// // 'number': '',
// 'allotNumber': '',
// 'materialAmount': ''
// }
// }
// ]
// this.$nextTick(() => {
// this.$refs.processMaterialsAllotList.setValues(value)
// })
// this.materialGroupId = record.row.materialGroup
// isDB = false
// }
//
if (!record.row.equipment && !!record.row.materialGroup && !!record.row.materialName
|| !record.row.materialName && !!record.row.materialGroup && !!record.row.equipment ) {
// console.log("record.row.materialGroup")
// await this.fetchMerchandiseNews(record.row.materialGroup, 1)
let value = [
{
rowKey: record.row.id,
values: {
'equipment': '',
'materialGroup':'',
'materialName': '',
'materialUnit': '',
'supplierId': '',
'materialPrice': '',
// 'number': '',
'allotNumber': '',
'materialAmount': ''
}
}
]
this.$nextTick(() => {
this.$refs.processMaterialsAllotList.setValues(value)
})
this.materialGroupId = record.row.materialGroup
isDB = false
}
// }
if (!!record.row.equipment && !record.row.allotNumber && isDB && this.materialGroupId !== record.row.materialGroup) {
console.log("执行materialNumber")
@ -492,7 +497,7 @@
{
rowKey: record.row.id,
values: {
'equipment': record.row.equipment,
'equipment': '',
'materialGroup': '',
'materialName': '',
'materialUnit': '',
@ -714,6 +719,7 @@
console.log("val===================")
console.log(val)
this.materialTypeRecord = val;
this.qeihuan = val;
if (!!val && !!this.libraryInvisible ) {
this.heid = false
// this.descriptionFetchData(val,this.libraryInvisible)

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

@ -88,6 +88,7 @@
:verify-type="this.accountingAttributesVal"
@valueChange="onSelect"
:rowNumber="true"
:qeihuan = this.qeihuan
:rowSelection="true"
:actionButton="true"
@descriptionFetch="addid"
@ -421,6 +422,7 @@
},
materialGroupId: undefined,
accountingAttributesVal: '',
qeihuan: '',
hiegs: true,
hiegkucun: [],
officePanDaun: null,
@ -583,6 +585,7 @@
async isMaterialType(val) {
if (val !== undefined) {
this.accountingAttributesVal = val
this.qeihuan = val;
this.hiegs = false
this.isabled = false
if (this.deliveryType !== 1) {
@ -598,8 +601,31 @@
}
},
async onSelect(record) {
// console.log(record)
console.log(record)
let isMA = true
if (!record.row.equipment && !!record.row.materialGroup && !!record.row.materialName
|| !record.row.materialName && !!record.row.materialGroup && !!record.row.equipment ) {
// console.log("select==",record.row);
let values = [
{
rowKey: record.row.id,
values: {
'equipment': '',
'materialGroup': '',
'materialName': '',
'materialUnit': '',
'supplierId': '',
'materialPrice': '',
'actualSendNumber': '',
'materialAmount': '',
'pleaseSendNumber': ''
}
}
]
this.$refs.processMaterialsDeliveryList.setValues(values);
return;
}
// if (!!record.row.materialGroup && !!record.row.materialGroup ) {
// // console.log("materialGroup111")
// if (!!record.row.id && record.row.materialGroup !== this.materialGroupId && record.column.key !== "allotNumber") {
@ -644,8 +670,9 @@
b = true
}
}
if (record.column.key == 'equipment' && isMA && record.row.materialGroup !== this.materialGroupId) {
// console.log("materialNumber")
// console.log("materialNumber",b,record.row.materialGroup , this.materialGroupId)
if (record.column.key == 'equipment' && isMA && record.row.equipment !== this.materialGroupId) {
if (!b) {
if (this.accountingAttributesVal === '1') {
//
@ -660,11 +687,13 @@
// console.log("bbbbbbbbbbbbbb",b)
b.forEach(item => {
if (item.equipment === record.row.equipment && !!item.materialGroup && !record.row.materialGroup) {
// console.log("bbbb====bbbbbb",item.equipment, record.row.equipment, item.materialGroup)
let values = [
{
rowKey: record.row.id,
values: {
'materialGroup': '',
'equipment': '',
'materialNumber': '',
'materialSeries': '',
'materialName': '',
@ -743,7 +772,7 @@
//
if (record.column.key == 'pleaseSendNumber' && isMA || record.column.key == 'actualSendNumber' && isMA) {
// console.log("333333333333",record.row)
console.log("执行了333333333333",record.row)
let res = record.row;
// let materialName = {}
// this.bigIdMerchandiseNewsList.forEach(item => {
@ -929,7 +958,8 @@
})
}
// console.log(this.processUdgetPlanMaterialTable.columns[1].options);
resolve(this.bigIdMerchandiseNewsList = res.result)
this.bigIdMerchandiseNewsList = res.result;
resolve()
// return
}
})
@ -1010,7 +1040,8 @@
})
}
// console.log(this.processUdgetPlanMaterialTable.columns[1].options);
resolve(this.bigIdMerchandiseNewsList = res.result)
this.bigIdMerchandiseNewsList = res.result;
resolve()
// return
}
})

153
src/views/activiti/form/ProcessUdgetPlanForm.vue

@ -120,6 +120,7 @@
:rowSelection="true"
:actionButton="true"
@shifu="shifu"
@bumen="bumen"
@descriptionFetch="fetchMerchandiseNews"
>
<template v-slot:action="props">
@ -719,6 +720,13 @@
// console.log('')
this.isShifu = true
},
bumen() {
this.putUnder = null; //
this.form.setFieldsValue({
putUnder: null
})
this.fetchMerchandiseNews();
},
// handleChange(value, key, column) {
// const newData = [...this.data];
@ -924,37 +932,29 @@
},
//table
async onSelect(record) {
let isEr = true
// if (!!record.row.materialGroup) {
// if (!!record.row.id && this.isBu !== record.row.materialGroup) {
// // console.log("1",record.row);
// this.isabled = false
// this.fetchMerchandiseNews(record.row.materialGroup)
// this.isBu = record.row.materialGroup
// let values = [
// {
// rowKey: record.row.id,
// values: {
// 'materialNumber': '',
// 'materialSeries': '',
// 'materialName': '',
// 'materialUnit': '',
// 'supplierId': '',
// 'materialAmount': '',
// 'materialType': ''
// }
// }
// ]
// this.$refs.processUdgetPlanMaterial.setValues(values)
// isEr = false
// }
// // if( record.row.id !== undefined && record.row.id !== '' || record.row.materialNumber === '' || record.row.materialNumber === undefined){
// // console.log("11",record.row);
// // }
// }
// console.log("5555",record.row);
// if ( !!record.row.materialNumber && isEr) {
if (!record.row.materialNumber && !!record.row.materialGroup && !!record.row.materialName
|| !record.row.materialName && !!record.row.materialGroup && !!record.row.materialNumber ) {
console.log("select==清空数据",record.row);
let values = [
{
rowKey: record.row.id,
values: {
'materialGroup': '',
'materialNumber': '',
'materialSeries': '',
'materialName': '',
'materialUnit': '',
'supplierId': '',
'materialAmount': '',
'materialType': ''
}
}
]
this.$refs.processUdgetPlanMaterial.setValues(values);
return
}
let b = false
if (this.isShifu) {
// console.log("0",record);
@ -968,15 +968,16 @@
await this.fetchMerchandiseNews(null, record.value);
}
}
this.isShifu = false
if (record.column.key == 'materialNumber' || record.column.key == 'materialName') {
this.isShifu = false;
if (record.column.key == 'materialNumber' && !!record.row.id
|| record.column.key == 'materialName' && !!record.row.id ) {
// console.log("111",record);
// if (!!record.row.materialName && this.isBu !== record.row.materialName) {
// console.log("2");
console.log("2出发了");
let materialName = {}
this.bigIdMerchandiseNewsList.forEach(item => {
if (item.id === record.value) {
console.log("=====",item);
// console.log("=====",item);
materialName = {
materialClassify: item.materialClassify,
name: item.merchandiseName,
@ -993,12 +994,13 @@
this.putUnder = item.materialDepart;
}
})
// console.log("============", this.bigIdMerchandiseNewsList.length);
console.log("===========12312 =", materialName);
if (!!record.row.id && Object.keys(materialName).length > 0) {
await this.$refs.processUdgetPlanMaterial.getValues((a, b, c) => {
// console.log("bbbbbbbbbbbbbb",b)
b.forEach(item => {
if (item.materialNumber === record.value && !!item.materialGroup ) {
if (item.materialNumber === record.value && !!item.materialGroup && item.materialName == materialName.merchandiseName) {
// console.log("bbbbbbbbbbbbbb",b)
let values = [
{
rowKey: record.row.id,
@ -1048,85 +1050,12 @@
this.isBu = record.value;
isEr = false
}
// }
// if (!!record.row.materialNumber && this.isBu !== record.row.materialNumber) {
// console.log("2");
// let materialName = {}
// this.bigIdMerchandiseNewsList.forEach(item => {
// if (item.id === record.row.materialNumber) {
// materialName = {
// materialClassify: item.materialClassify,
// name: item.merchandiseName,
// unit: item.materialsUnit,
// supplierId: item.supplierId,
// descriptionId: item.descriptionId
// }
// this.form.setFieldsValue({
// putUnder: item.materialDepart
// })
// }
// })
//
// if (!!record.row.id && Object.keys(materialName).length > 0) {
// await this.$refs.processUdgetPlanMaterial.getValues((a, b, c) => {
// // console.log("bbbbbbbbbbbbbb",b)
// b.forEach(item => {
// if (item.materialNumber === record.row.materialNumber && !!item.materialGroup && !record.row.materialGroup) {
// let values = [
// {
// rowKey: record.row.id,
// values: {
// 'materialGroup': '',
// 'materialNumber': '',
// 'materialSeries': '',
// 'materialName': '',
// 'materialUnit': '',
// 'supplierId': '',
// 'materialAmount': '',
// 'materialType': ''
// }
// }
// ]
// // console.log("sadf1111")
// this.$refs.processUdgetPlanMaterial.setValues(values)
// return
//
// }
// })
//
// })
//
// this.processUdgetPlanMaterialTable.columns[0].options.push({
// title: materialName.materialClassify,
// value: materialName.descriptionId
// })
// let values = [
// {
// rowKey: record.row.id,
// values: {
// 'materialNumber': record.row.materialNumber,
// 'materialGroup': materialName.descriptionId,
// // 'materialGroup': this.materialId,
// 'materialSeries': record.row.materialSeries,
// 'materialName': materialName.name,
// 'materialUnit': materialName.unit,
// 'supplierId': materialName.supplierId
// }
// }
// ]
// this.$refs.processUdgetPlanMaterial.setValues(values)
// this.isBu = record.row.materialNumber
// isEr = false
// }
// }
}
//
if (!!record.row.materialQuantity && !!record.row.materialPrice && isEr) {
// record.row.materialAmount = record.row.materialQuantity * record.row.materialPrice;
// console.log("3");
console.log("3出发了");
//5
if (record.row.materialPrice > 50000) {
this.materialPrice = record.row.materialPrice
@ -1223,7 +1152,7 @@
this.bigIdMerchandiseNewsList = res.result
// resolve( this.bigIdMerchandiseNewsList );
}
resolve(this.bigIdMerchandiseNewsList)
resolve()
})
})

8
src/views/dictionaries/ProcessDictionariesList.vue

@ -40,10 +40,10 @@
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
<!-- </div>-->
<a-table
ref="table"

4
src/views/dictionaries/ProcessSupplierList.vue

@ -162,7 +162,7 @@
{
title:'级别',
align:"center",
dataIndex: 'rank'
dataIndex: 'superior'
},
// {
// title:'',
@ -227,5 +227,5 @@
}
</script>
<style scoped>
@import '~@assets/less/common.less'
@import '~@assets/less/common.less';
</style>

12
src/views/dictionaries/modules/ProcessSupplierModal.vue

@ -24,12 +24,12 @@
<a-col :span="23">
<a-form-item label="级别" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-input v-decorator="['rank']" placeholder="请输入级别" ></a-input>-->
<a-select v-decorator="['rank',validatorRules.rank]" placeholder="请选择级别" v-if="!hideDis" >
<a-select-option v-for="(item,index) in bigIder" :key="index" :value="item.rank">{{item.rank}}</a-select-option>
<a-select v-decorator="['superior',validatorRules.rank]" placeholder="请选择级别" v-if="!hideDis" >
<a-select-option v-for="(item,index) in bigIder" :key="index" :value="item.superior">{{item.superior}}</a-select-option>
</a-select>
<a-auto-complete
v-if="hideDis"
v-decorator="['rank',validatorRules.rank]"
v-decorator="['superior',validatorRules.rank]"
:data-source="bigId"
placeholder="请选择级"
:filter-option="filterOption"
@ -143,7 +143,7 @@ import { getAction, httpAction } from '@/api/manage'
// console.log(res.result);
res.result.forEach ( item => {
this.$nextTick(() => {
this.bigId.push( item.rank);
this.bigId.push( item.superior);
})
} );
}
@ -171,7 +171,7 @@ import { getAction, httpAction } from '@/api/manage'
}else{
this.hideDis = true;
}
this.form.setFieldsValue(pick(this.model,'createBy','createTime','updateBy','updateTime','sysOrgCode','coding','supplierName','rank','state','delFlag','processDictionariesId'))
this.form.setFieldsValue(pick(this.model,'createBy','createTime','updateBy','updateTime','sysOrgCode','coding','supplierName','superior','state','delFlag','processDictionariesId'))
})
},
close () {
@ -215,7 +215,7 @@ import { getAction, httpAction } from '@/api/manage'
this.close()
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'createBy','createTime','updateBy','updateTime','sysOrgCode','coding','supplierName','rank','state','delFlag','processDictionariesId'))
this.form.setFieldsValue(pick(row,'createBy','createTime','updateBy','updateTime','sysOrgCode','coding','supplierName','superior','state','delFlag','processDictionariesId'))
},

8
src/views/supplier/ProcessSupplierList.vue

@ -17,8 +17,8 @@
<a-col :xl="5" :lg="7" :md="8" :sm="24">
<a-form-item label="级别">
<!-- <a-input placeholder="请选择" v-model="queryParam.rank"></a-input>-->
<a-select v-model="queryParam.rank" placeholder="请选择级别" @mouseenter="getRake" >
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.rank">{{item.rank}}</a-select-option>
<a-select v-model="queryParam.superior" placeholder="请选择级别" @mouseenter="getRake" >
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.superior">{{item.superior}}</a-select-option>
</a-select>
<!-- <a-auto-complete-->
<!-- :data-source="bigId"-->
@ -202,7 +202,7 @@
{
title:'级别',
align:"center",
dataIndex: 'rank',
dataIndex: 'superior',
// customRender:function (t,r,index) {
// // console.log(t,r,index);
// let name = '';
@ -303,7 +303,7 @@
let fieldList=[];
fieldList.push({type:'string',value:'coding',text:'供应商编码',dictCode:''})
fieldList.push({type:'string',value:'supplierName',text:'供应商名称',dictCode:''})
fieldList.push({type:'int',value:'rank',text:'级别',dictCode:''})
fieldList.push({type:'int',value:'superior',text:'级别',dictCode:''})
fieldList.push({type:'int',value:'state',text:'状态',dictCode:''})
fieldList.push({type:'int',value:'delFlag',text:'删除标志',dictCode:''})
this.superFieldList = fieldList;

13
src/views/supplier/modules/ProcessSupplierForm.vue

@ -17,12 +17,12 @@
<a-form-item label="级别" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-input-number v-decorator="['rank']" placeholder="请输入级别" style="width: 100%" />-->
<!-- <j-dict-select-tag type="list" v-decorator="['rank']" :trigger-change="true" placeholder="请输入级别" dictCode="supplier_type" />-->
<a-select v-decorator="['rank']" placeholder="请选择级别" v-if="!hideDis" >
<a-select-option v-for="(item,index) in bigIder" :key="index" :value="item.rank">{{item.rank}}</a-select-option>
<a-select v-decorator="['superior']" placeholder="请选择级别" v-if="!hideDis" >
<a-select-option v-for="(item,index) in bigIder" :key="index" :value="item.superior">{{item.superior}}123</a-select-option>
</a-select>
<a-auto-complete
v-if="hideDis"
v-decorator="['rank']"
v-decorator="['superior']"
:data-source="bigId"
style="width: 200px"
placeholder="请选择级"
@ -165,7 +165,7 @@
}else{
this.hideDis = true;
}
this.form.setFieldsValue(pick(this.model,'coding','supplierName','rank','state','delFlag'))
this.form.setFieldsValue(pick(this.model,'coding','supplierName','superior','state','delFlag'))
})
},
//
@ -179,6 +179,7 @@
});
}
this.bigIder = [];
getAction(this.url.supplierRake,null).then((res)=>{
if(res.success){
// console.log(res.result);
@ -193,7 +194,7 @@
// console.log(res.result);
res.result.forEach ( item => {
this.$nextTick(() => {
this.bigId.push( item.rank);
this.bigId.push( item.superior);
})
} );
}
@ -242,7 +243,7 @@
})
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'coding','supplierName','rank','state','delFlag'))
this.form.setFieldsValue(pick(row,'coding','supplierName','superior','state','delFlag'))
},
}
}

Loading…
Cancel
Save