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. 58
      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, type: Number,
default: 400 default: 400
}, },
//
qeihuan: {
type: String,
},
// //
disabledRows: { disabledRows: {
type: Object, type: Object,
@ -884,6 +888,15 @@
}, },
// //
watch: { watch: {
qeihuan:{
immediate: true,
handler: function (newValue) {
// console.log(newValue,"");
this.$nextTick( () =>{
this.getClone();
});
}
},
rows: { rows: {
immediate: true, immediate: true,
handler(val, old) { handler(val, old) {
@ -970,6 +983,17 @@
shuChange(val,b,c){ shuChange(val,b,c){
// console.log("sdtgfsd",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(){ a(){
// console.log("l"); // console.log("l");
@ -2756,6 +2780,7 @@
disabled: isb disabled: isb
}) })
}) })
this.columns[index].options = [];
this.columns[index].options = a this.columns[index].options = a
resolve( ); resolve( );
} }

10
src/components/jeecg/PEditableTable.vue

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

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

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

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

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

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

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

8
src/views/dictionaries/ProcessDictionariesList.vue

@ -40,10 +40,10 @@
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <!-- <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> <!-- <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> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
</div> <!-- </div>-->
<a-table <a-table
ref="table" ref="table"

4
src/views/dictionaries/ProcessSupplierList.vue

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

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

@ -24,12 +24,12 @@
<a-col :span="23"> <a-col :span="23">
<a-form-item label="级别" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="级别" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-input v-decorator="['rank']" placeholder="请输入级别" ></a-input>--> <!-- <a-input v-decorator="['rank']" placeholder="请输入级别" ></a-input>-->
<a-select v-decorator="['rank',validatorRules.rank]" placeholder="请选择级别" v-if="!hideDis" > <a-select v-decorator="['superior',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-option v-for="(item,index) in bigIder" :key="index" :value="item.superior">{{item.superior}}</a-select-option>
</a-select> </a-select>
<a-auto-complete <a-auto-complete
v-if="hideDis" v-if="hideDis"
v-decorator="['rank',validatorRules.rank]" v-decorator="['superior',validatorRules.rank]"
:data-source="bigId" :data-source="bigId"
placeholder="请选择级" placeholder="请选择级"
:filter-option="filterOption" :filter-option="filterOption"
@ -143,7 +143,7 @@ import { getAction, httpAction } from '@/api/manage'
// console.log(res.result); // console.log(res.result);
res.result.forEach ( item => { res.result.forEach ( item => {
this.$nextTick(() => { this.$nextTick(() => {
this.bigId.push( item.rank); this.bigId.push( item.superior);
}) })
} ); } );
} }
@ -171,7 +171,7 @@ import { getAction, httpAction } from '@/api/manage'
}else{ }else{
this.hideDis = true; 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 () { close () {
@ -215,7 +215,7 @@ import { getAction, httpAction } from '@/api/manage'
this.close() this.close()
}, },
popupCallback(row){ 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-col :xl="5" :lg="7" :md="8" :sm="24">
<a-form-item label="级别"> <a-form-item label="级别">
<!-- <a-input placeholder="请选择" v-model="queryParam.rank"></a-input>--> <!-- <a-input placeholder="请选择" v-model="queryParam.rank"></a-input>-->
<a-select v-model="queryParam.rank" placeholder="请选择级别" @mouseenter="getRake" > <a-select v-model="queryParam.superior" placeholder="请选择级别" @mouseenter="getRake" >
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.rank">{{item.rank}}</a-select-option> <a-select-option v-for="(item,index) in bigId" :key="index" :value="item.superior">{{item.superior}}</a-select-option>
</a-select> </a-select>
<!-- <a-auto-complete--> <!-- <a-auto-complete-->
<!-- :data-source="bigId"--> <!-- :data-source="bigId"-->
@ -202,7 +202,7 @@
{ {
title:'级别', title:'级别',
align:"center", align:"center",
dataIndex: 'rank', dataIndex: 'superior',
// customRender:function (t,r,index) { // customRender:function (t,r,index) {
// // console.log(t,r,index); // // console.log(t,r,index);
// let name = ''; // let name = '';
@ -303,7 +303,7 @@
let fieldList=[]; let fieldList=[];
fieldList.push({type:'string',value:'coding',text:'供应商编码',dictCode:''}) fieldList.push({type:'string',value:'coding',text:'供应商编码',dictCode:''})
fieldList.push({type:'string',value:'supplierName',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:'state',text:'状态',dictCode:''})
fieldList.push({type:'int',value:'delFlag',text:'删除标志',dictCode:''}) fieldList.push({type:'int',value:'delFlag',text:'删除标志',dictCode:''})
this.superFieldList = fieldList; this.superFieldList = fieldList;

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

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