Browse Source

修改页面显示11

dev
caoyizhong 2 years ago
parent
commit
da0f6459c9
  1. 1
      src/mixins/JeecgListMixin.js
  2. 8
      src/views/description/ProcessDescriptionList.vue
  3. 38
      src/views/description/modules/ProcessDescriptionForm.vue
  4. 2
      src/views/description/modules/ProcessDescriptionModal.vue
  5. 11
      src/views/materialstorage/ProcessMaterialStorageList.vue
  6. 189
      src/views/materialstorage/modules/ProcessMaterialStorageForm.vue
  7. 90
      src/views/merchandisenews/ProcessMerchandiseNewsList.vue
  8. 90
      src/views/merchandisenews/modules/ProcessMerchandiseNewsForm.vue
  9. 2
      src/views/merchandisenews/modules/ProcessMerchandiseNewsModal.vue
  10. 22
      src/views/supplier/ProcessSupplierList.vue
  11. 43
      src/views/supplier/modules/ProcessSupplierForm.vue

1
src/mixins/JeecgListMixin.js

@ -93,6 +93,7 @@ export const JeecgListMixin = {
}
var params = this.getQueryParams();//查询条件
this.loading = true;
// console.log(params)
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------

8
src/views/description/ProcessDescriptionList.vue

@ -18,7 +18,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="分类名称">
<!-- <a-input placeholder="请输入分类名称" v-model="queryParam.classifyName"></a-input>-->
<a-select v-model="queryParam.classifyName" placeholder="请选择" >
<a-select v-model="queryParam.classifyName" placeholder="请选择" @mouseenter="getDesc">
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.classifyName">{{item.classifyName}}</a-select-option>
</a-select>
</a-form-item>
@ -185,7 +185,7 @@
delete: "/description/processDescription/delete",
deleteBatch: "/description/processDescription/deleteBatch",
exportXlsUrl: "/description/processDescription/exportXls",
importExcelUrl: "description/processDescription/importExcel",
importExcelUrl: "/description/processDescription/importExcel",
descriptionRake: "/description/processDescription/descriptionRake"
},
dictOptions:{},
@ -209,6 +209,8 @@
fieldList.push({type:'string',value:'descriptionName',text:'品名名称',dictCode:''})
fieldList.push({type:'string',value:'bigCategoryId',text:'分类名称',dictCode:''})
this.superFieldList = fieldList;
},
getDesc(){
//
let par = {
classify: 1,
@ -221,7 +223,7 @@
this.bigId = res.result;
}
});
}
},
}
}
</script>

38
src/views/description/modules/ProcessDescriptionForm.vue

@ -17,9 +17,19 @@
<a-form-item label="分类名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-input v-decorator="['classifyName']" placeholder="请输入分类名称" ></a-input>-->
<!-- <j-dict-select-tag type="list" v-decorator="['classifyName']" :trigger-change="true" dictCode="hardware_category" placeholder="请输入分类" />-->
<a-select v-decorator="['classifyName']" placeholder="请选择" >
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.classifyName">{{item.classifyName}}</a-select-option>
<a-select v-decorator="['classifyName']" placeholder="请选择" v-if="!hideDis">
<a-select-option v-for="(item,index) in bigIdser" :key="index" :value="item.classifyName">{{item.classifyName}}</a-select-option>
</a-select>
<a-auto-complete
v-if="hideDis"
v-decorator="['classifyName']"
:data-source="bigId"
style="width: 200px"
placeholder="请选择级"
:filter-option="filterOption"
@mouseenter="getDest"
/>
</a-form-item>
</a-col>
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
@ -79,6 +89,8 @@
validatorRules: {
},
bigId:[],
bigIdser:[],
hideDis: true,
yunName:'',
url: {
add: "/description/processDescription/add",
@ -112,14 +124,34 @@
this.showFlowData();
},
methods: {
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
);
},
getDest(){
this.bigId = [];
getAction(this.url.descriptionRake,null).then((res)=>{
if(res.success){
// console.log(res.result);
res.result.forEach( item => {
this.bigId.push(item.classifyName);
} )
}
});
},
add () {
this.edit({});
},
edit (record) {
// console.log(record);
this.form.resetFields();
this.model = Object.assign({}, record);
this.visible = true;
this.$nextTick(() => {
if(record.classifyName !== undefined){
this.hideDis = false;
}
this.form.setFieldsValue(pick(this.model,'materialClassify','descriptionName','classifyName'))
})
},
@ -142,7 +174,7 @@
getAction(this.url.descriptionRake,null).then((res)=>{
if(res.success){
// console.log(res.result.records);
this.bigId = res.result;
this.bigIdser = res.result;
}
});
},

2
src/views/description/modules/ProcessDescriptionModal.vue

@ -23,7 +23,7 @@
data () {
return {
title:'',
width:1024,
width:1324,
visible: false,
disableSubmit: false
}

11
src/views/materialstorage/ProcessMaterialStorageList.vue

@ -23,17 +23,6 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="库存地点">
<!-- <a-input placeholder="请输入库存地点" v-model="queryParam.inventoryAddress"></a-input>-->
<!-- <a-select placeholder="请选择库存地点" v-model="queryParam.inventoryAddress"-->
<!-- show-search-->
<!-- style="width: 100%"-->
<!-- :default-active-first-option="true"-->
<!-- :show-arrow="false"-->
<!-- :filter-option="false"-->
<!-- :not-found-content="null"-->
<!-- @search="handleExpressSearch"-->
<!-- @change="handleExpressChange"-->
<!-- @blur="handleExpressBlur"-->
<!-- > -->
<a-select placeholder="请选择库存地点" v-model="queryParam.inventoryAddress">
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.inventoryAddress">{{item.inventoryAddress}}</a-select-option>
</a-select>

189
src/views/materialstorage/modules/ProcessMaterialStorageForm.vue

@ -5,33 +5,64 @@
<a-row>
<a-col :span="8">
<a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['supplierId']" placeholder="请输入供应商" ></a-input>
<!-- <a-input v-decorator="['supplierId']" placeholder="请输入供应商" ></a-input>-->
<a-auto-complete
v-decorator="['supplierId']" placeholder="请输入供应商"
:data-source="bigSupplierId"
@select="onSelectRake"
@search="onSearchSupplier"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="物料描述" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['merchandiseNewsId']" placeholder="请输入物料详情" ></a-input>
<!-- <a-input v-decorator="['merchandiseNewsId']" placeholder="请输入物料详情" ></a-input>-->
<a-auto-complete
v-decorator="['merchandiseNewsId']" placeholder="请输入物料详情"
:data-source="bigMerchandiseId"
@select="onSearchMerchandiseNews"
@search="onSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="物料组名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['descriptionId']" placeholder="请输入品名类" ></a-input>
<!-- <a-input v-decorator="['descriptionId']" placeholder="请输入品名类" ></a-input>-->
<a-auto-complete
v-decorator="['descriptionId']" placeholder="请输入品名类"
:data-source="bigId"
@select="onSelectRake"
@search="onSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="库存地点" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-input v-decorator="['inventoryAddress']" placeholder="请输入库存地点" ></a-input>-->
<a-select placeholder="请选择库存地点" v-decorator="['inventoryAddress']">
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.id">{{item.supplierName}}</a-select-option>
</a-select>
<!-- <a-select placeholder="请选择库存地点" v-decorator="['inventoryAddress']">-->
<!-- <a-select-option v-for="(item,index) in bigId" :key="index" :value="item.id">{{item.supplierName}}</a-select-option>-->
<!-- </a-select>-->
<a-auto-complete
placeholder="请选择库存地点" v-decorator="['inventoryAddress']"
:data-source="bigIdRake"
@select="onSelectRake"
@search="onSearchRake"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-input v-decorator="['unit']" placeholder="请输入单位" ></a-input>-->
<a-select placeholder="请选择库存地点" v-decorator="['unit']">
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.id">{{item.supplierName}}</a-select-option>
</a-select>
<!-- <a-select placeholder="请选择库存地点" v-decorator="['unit']">-->
<!-- <a-select-option v-for="(item,index) in bigId" :key="index" :value="item.id">{{item.supplierName}}</a-select-option>-->
<!-- </a-select>-->
<a-auto-complete
placeholder="请选择库存地点" v-decorator="['inventoryAddress']"
:data-source="bigIdUnit"
@select="onSelectRake"
@search="onSearchRake"
/>
</a-form-item>
</a-col>
<!-- <a-col :span="8">-->
@ -89,8 +120,16 @@
},
data () {
return {
bigIdRake:[],
bigIdUnit:[],
form: this.$form.createForm(this),
bigId:[],
bigIdList:[],
bigMerchandiseId:[],
bigMerchandiseIdList:[],
bigSupplierId: [],
bigSupplierIdList:[],
model: {},
labelCol: {
xs: { span: 24 },
@ -106,7 +145,11 @@
url: {
add: "/materialstorage/processMaterialStorage/add",
edit: "/materialstorage/processMaterialStorage/edit",
queryById: "/materialstorage/processMaterialStorage/queryById"
queryById: "/materialstorage/processMaterialStorage/queryById",
addressUrl:"/materialstorage/processMaterialStorage/materialStorageAddress",
descriptionRake: "/description/processDescription/list",
supplierId: "/supplier/processSupplier/list",
merchandiseNewsList: "/merchandisenews/processMerchandiseNews/list",
}
}
},
@ -132,8 +175,111 @@
created () {
//data
this.showFlowData();
this.fetchDataRake();
this.fetchData();
this.fetchDataSupplier();
this.fetchDataMerchandiseNews()
},
methods: {
onSearchSupplier(searchText) { //
console.log(searchText)
// this.dataSource = !searchText ? [] : [searchText];
this.fetchDataSupplier(searchText);
},
onSearchRake(searchText) { //
console.log(searchText)
// this.dataSource = !searchText ? [] : [searchText];
this.fetchDataRake(searchText);
},
onSearch(searchText) { //
console.log(searchText)
// this.dataSource = !searchText ? [] : [searchText];
this.fetchData(searchText);
},
onSearchMerchandiseNews(searchText) { //
console.log(searchText)
// this.dataSource = !searchText ? [] : [searchText];
this.fetchDataMerchandiseNews(searchText);
},
onSelectRake(value) {
console.log('onSelect', value);
},
fetchDataMerchandiseNews (value){
//
let par = {
delFlag: 0,
merchandiseName: value,
pageSize: 100
}
this.bigMerchandiseId = [];
getAction(this.url.merchandiseNewsList,par).then((res)=>{
if(res.success){
console.log(res.result);
// this.bigId = res.result.records;
res.result.records.forEach( item => {
this.bigMerchandiseId.push(item.merchandiseName);
})
this.bigMerchandiseIdList = res.result.records;
}
});
},
fetchData(value){
//
let par = {
delFlag: 0,
descriptionName: value,
pageSize: 100
}
this.bigId = [];
getAction(this.url.descriptionRake,par).then((res)=>{
if(res.success){
console.log(res.result);
// this.bigId = res.result.records;
res.result.records.forEach( item => {
this.bigId.push(item.descriptionName);
})
this.bigIdList = res.result.records;
}
});
},
fetchDataSupplier(value){
//
let par = {
delFlag: 0,
state: 0,
supplierName: value,
pageSize: 100
}
this.bigSupplierId = [];
getAction(this.url.supplierId,par).then((res)=>{
if(res.success){
// console.log("bigSupplierIdId")
// console.log(res.result.records);
// this.bigId = res.result.records;
res.result.records.forEach( item => {
this.bigSupplierId.push(item.supplierName);
})
this.bigSupplierIdList = res.result.records;
}
});
},
fetchDataRake(http,value){
//
let par = {
inventoryAddress: value,
pageSize: 100
}
this.bigIdRake = [];
getAction(this.url.addressUrl,par).then((res)=>{
if(res.success){
// console.log(res.result);
// this.bigId = res.result.records;
res.result.forEach( item => {
this.bigIdRake.push(item.inventoryAddress);
})
}
});
},
add () {
this.edit({});
},
@ -172,7 +318,9 @@
method = 'put';
}
let formData = Object.assign(this.model, values);
this.dispose(formData);
console.log("表单提交数据",formData)
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
@ -187,6 +335,27 @@
})
},
dispose(item){
// console.log(this.bigSupplierIdList);
// console.log(this.bigIdList);
// console.log(this.bigMerchandiseIdList);
this.bigSupplierIdList.forEach( is => { //
if(is.supplierName === item.supplierId){
item.supplierId = is.id;
}
});
this.bigIdList.forEach(is =>{
if(is.descriptionName === item.descriptionId){
item.descriptionId = is.id;
}
});
this.bigMerchandiseIdList.forEach(is =>{
if(is.merchandiseName === item.merchandiseNewsId){
item.merchandiseNewsId = is.id;
}
});
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'supplierId','merchandiseNewsId','descriptionId','inventoryAddress','unit','delFlag','delTime'))
},

90
src/views/merchandisenews/ProcessMerchandiseNewsList.vue

@ -17,9 +17,30 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="供应商">
<!-- <a-input placeholder="供应商" v-model="queryParam.materialsUnit"></a-input>-->
<a-select v-model="queryParam.materialsUnit" placeholder="请选择" >
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.id">{{item.supplierName}}</a-select-option>
</a-select>
<!-- <a-select v-model="queryParam.materialsUnit" placeholder="请选择" @popupScroll="handlePopupScroll">-->
<!-- <a-select-option v-for="(item,index) in bigId" :key="index" :value="item.id">{{item.supplierName}}</a-select-option>-->
<!-- </a-select>-->
<a-auto-complete
v-model="queryParam.supplierId"
:data-source="bigId"
placeholder="请选择"
@select="onSelect"
@search="onSearch"
/>
<!-- <a-select-->
<!-- mode="multiple"-->
<!-- label-in-value-->
<!-- v-model="queryParam.materialsUnits"-->
<!-- placeholder="请选择"-->
<!-- style="width: 100%"-->
<!-- :filter-option="false"-->
<!-- :not-found-content="fetching ? undefined : null"-->
<!-- @search="fetchUser"-->
<!-- @change="handleChange"-->
<!-- >-->
<!-- <a-spin v-if="fetching" slot="notFoundContent" size="small" />-->
<!-- <a-select-option v-for="(item,index) in bigId" :key="index" :value="item.id">{{item.supplierName}}</a-select-option>-->
<!-- </a-select>-->
</a-form-item>
</a-col>
@ -120,9 +141,9 @@
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<!-- <a-menu-item>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- </a-menu-item>-->
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
@ -156,7 +177,12 @@
JSuperQuery,
},
data () {
// this.lastFetchId = 0;
// this.fetchUser = debounce(this.fetchUser, 800);
return {
data: [],
value: [],
fetching: false,
description: '物资清单表管理页面',
bigId:[],
//
@ -252,6 +278,35 @@
},
},
methods: {
onSearch(searchText) {
console.log(searchText)
// this.dataSource = !searchText ? [] : [searchText];
this.fetchData(searchText);
},
onSelect(value) {
console.log('onSelect', value);
},
fetchData(value){
//
let par = {
delFlag: 0,
state: 0,
supplierName: value,
pageSize: 100
}
this.bigId = [];
getAction(this.url.supplierId,par).then((res)=>{
if(res.success){
// console.log(res.result.records);
// this.bigId = res.result.records;
res.result.records.forEach( item => {
this.bigId.push(item.supplierName);
})
}
});
},
initDictConfig(){
},
getSuperFieldList(){
@ -267,17 +322,22 @@
fieldList.push({type:'string',value:'synopsis',text:'简介概要',dictCode:''})
fieldList.push({type:'int',value:'classify',text:'分类',dictCode:''})
this.superFieldList = fieldList;
this.fetchData();
//
let par = {
delFlag: 0,
state: 0
}
getAction(this.url.supplierId,par).then((res)=>{
if(res.success){
// let par = {
// delFlag: 0,
// state: 0
// }
// this.bigId = [];
// getAction(this.url.supplierId,par).then((res)=>{
// if(res.success){
// console.log(res.result.records);
this.bigId = res.result.records;
}
});
// res.result.records.forEach( item => {
// this.bigId.push(item.supplierName);
// })
//
// }
// });
}
}
}

90
src/views/merchandisenews/modules/ProcessMerchandiseNewsForm.vue

@ -10,7 +10,14 @@
</a-col>
<a-col :span="8">
<a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['supplierId']" placeholder="请输入供应商ID" ></a-input>
<!-- <a-input v-decorator="['supplierId']" placeholder="请输入供应商" ></a-input>-->
<a-auto-complete
v-decorator="['supplierId']"
:data-source="bigId"
placeholder="请选择"
@select="onSelectSupplier"
@search="onSearchSupplier"
/>
</a-form-item>
</a-col>
<a-col :span="8">
@ -20,7 +27,14 @@
</a-col>
<a-col :span="8">
<a-form-item label="品名分类" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['descriptionId']" placeholder="请输入品名编号ID" ></a-input>
<!-- <a-input v-decorator="['descriptionId']" placeholder="请输入品名编号ID" ></a-input>-->
<a-auto-complete
v-decorator="['descriptionId']"
:data-source="bigIdRake"
placeholder="请选择"
@select="onSelectRake"
@search="onSearchRake"
/>
</a-form-item>
</a-col>
<a-col :span="8">
@ -48,11 +62,11 @@
<a-input v-decorator="['synopsis']" placeholder="请输入简介概要" ></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="分类" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number v-decorator="['classify']" placeholder="请输入分类" style="width: 100%" />
</a-form-item>
</a-col>
<!-- <a-col :span="8">-->
<!-- <a-form-item label="分类" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!-- <a-input-number v-decorator="['classify']" placeholder="请输入分类" style="width: 100%" />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
<a-button @click="submitForm"> </a-button>
</a-col>
@ -96,6 +110,8 @@
},
data () {
return {
bigId:[],
bigIdRake:[],
form: this.$form.createForm(this),
model: {},
labelCol: {
@ -112,7 +128,9 @@
url: {
add: "/merchandisenews/processMerchandiseNews/add",
edit: "/merchandisenews/processMerchandiseNews/edit",
queryById: "/merchandisenews/processMerchandiseNews/queryById"
queryById: "/merchandisenews/processMerchandiseNews/queryById",
supplierId: "/supplier/processSupplier/list",
descriptionRake: "/description/processDescription/list",
}
}
},
@ -138,8 +156,64 @@
created () {
//data
this.showFlowData();
this.fetchDataSupplier();
this.fetchDataRake();
},
methods: {
onSearchSupplier(searchText) {
console.log(searchText)
// this.dataSource = !searchText ? [] : [searchText];
this.fetchDataSupplier(searchText);
},
onSelectSupplier(value) {
console.log('onSelect', value);
},
fetchDataSupplier(value){
//
let par = {
delFlag: 0,
state: 0,
supplierName: value,
pageSize: 100
}
this.bigId = [];
getAction(this.url.supplierId,par).then((res)=>{
if(res.success){
// console.log(res.result.records);
// this.bigId = res.result.records;
res.result.records.forEach( item => {
this.bigId.push(item.supplierName);
})
}
});
},
onSearchRake(searchText) {
console.log(searchText)
// this.dataSource = !searchText ? [] : [searchText];
this.fetchDataRake(searchText);
},
onSelectRake(value) {
console.log('onSelect', value);
},
fetchDataRake(value){
//
let par = {
delFlag: 0,
descriptionName: value,
pageSize: 100
}
this.bigIdRake = [];
getAction(this.url.descriptionRake,par).then((res)=>{
if(res.success){
console.log(res.result);
// this.bigId = res.result.records;
res.result.records.forEach( item => {
this.bigIdRake.push(item.descriptionName);
})
}
});
},
add () {
this.edit({});
},

2
src/views/merchandisenews/modules/ProcessMerchandiseNewsModal.vue

@ -23,7 +23,7 @@
data () {
return {
title:'',
width:1024,
width:1524,
visible: false,
disableSubmit: false
}

22
src/views/supplier/ProcessSupplierList.vue

@ -18,9 +18,16 @@
<a-col :xl="6" :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="请选择级别" >
<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>
<!-- <a-auto-complete-->
<!-- :data-source="bigId"-->
<!-- style="width: 200px"-->
<!-- placeholder="请选择级"-->
<!-- :filter-option="filterOption"-->
<!-- />-->
</a-form-item>
</a-col>
<!-- <template v-if="toggleSearchStatus">-->
@ -139,7 +146,7 @@
</a-card>
</template>
<script >
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
@ -148,8 +155,6 @@
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'
import { getAction } from '@api/manage'
export default {
name: 'ProcessSupplierList',
mixins:[JeecgListMixin, mixinDevice],
@ -247,6 +252,7 @@
},
created() {
this.getSuperFieldList();
// this.getRake();
},
computed: {
importExcelUrl: function(){
@ -295,13 +301,17 @@
fieldList.push({type:'int',value:'state',text:'状态',dictCode:''})
fieldList.push({type:'int',value:'delFlag',text:'删除标志',dictCode:''})
this.superFieldList = fieldList;
},
getRake(){
this.bigId = [];
getAction(this.url.supplierRake,null).then((res)=>{
if(res.success){
// console.log(res.result);
console.log(res.result);
this.bigId = res.result;
}
});
}
},
}
}
</script>

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

@ -17,9 +17,18 @@
<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="请选择级别" >
<a-select-option v-for="(item,index) in bigId" :key="index" :value="item.rank">{{item.rank}}</a-select-option>
<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>
<a-auto-complete
v-if="hideDis"
v-decorator="['rank']"
:data-source="bigId"
style="width: 200px"
placeholder="请选择级"
:filter-option="filterOption"
@mouseenter="getRank"
/>
</a-form-item>
</a-col>
<a-col :span="8">
@ -79,7 +88,9 @@
return {
form: this.$form.createForm(this),
model: {},
hideDis: true,
bigId:[],
bigIder: [],
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -122,8 +133,15 @@
created () {
//data
this.showFlowData();
// this.getRank();
},
methods: {
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
);
},
add () {
this.edit({});
},
@ -138,16 +156,12 @@
this.visible = true;
this.$nextTick(() => {
if(dis){
this.hideDis = false;
if(this.model.state === 0){
this.model.state = "正常";
}else{
this.model.state = "停用"
}
// if(this.model.rank === 0){
// this.model.rank = "";
// }else{
// this.model.rank = ""
// }
}
this.form.setFieldsValue(pick(this.model,'coding','supplierName','rank','state','delFlag'))
})
@ -166,7 +180,20 @@
getAction(this.url.supplierRake,null).then((res)=>{
if(res.success){
// console.log(res.result);
this.bigId = res.result;
this.bigIder = res.result;
}
});
},
getRank(){
this.bigId = [];
getAction(this.url.supplierRake,null).then((res)=>{
if(res.success){
// console.log(res.result);
res.result.forEach ( item => {
this.$nextTick(() => {
this.bigId.push( item.rank);
})
} );
}
});
},

Loading…
Cancel
Save