Browse Source

Merge pull request '客户需求管理工作台优化' (#77) from wangxy into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_AdvancedPlanner_Front/pulls/77
pull/78/head
wangxy 3 years ago
parent
commit
c25074e017
3 changed files with 59 additions and 8 deletions
  1. +4
    -0
      src/assets/css/base.css
  2. +50
    -4
      src/components/queryComponent/index.vue
  3. +5
    -4
      src/views/plan/workbench/homePage/beta/predict/index.vue

+ 4
- 0
src/assets/css/base.css View File

@ -294,6 +294,10 @@ li {
background: #2D9B8E;
color: #fff;
}
.el-input__suffix {
height: 32px;
line-height: 32px;
}
.el-form .el-select .el-input__suffix {
right: 0;
width: 48px;


+ 50
- 4
src/components/queryComponent/index.vue View File

@ -7,11 +7,29 @@
</span>
<template #dropdown>
<div class="predict-search-container">
<el-select v-if="isShowAddButton"
v-model="valid"
style="width: 150px;margin-right:10px;" placeholder="请选择是否有效" >
<el-option
v-for="item in validArrray"
:key="item['value']"
:label="item['label']"
:value="item['value']">
</el-option>
</el-select>
<el-input
v-if="isShowAddButton"
v-model="SearchId"
placeholder="检索条件:版本号/零件号"
placeholder="检索条件:零件号"
clearable
style="width: 240px"
style="width: 200px"
/>
<el-input
v-else
v-model="SearchId"
placeholder="检索条件:零件号/版本号"
clearable
style="width: 200px"
/>
<el-button icon="el-icon-search" size="mini" class="search-button-style" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" class="reset-button-style" @click="resetQuery">重置</el-button>
@ -43,7 +61,18 @@ export default {
notalReadyPic: require('../../assets/img/notalready.png'),
//
SearchId: undefined,
valid: undefined,
isShowDialog: '',
validArrray: [
{
label: '有效',
value: true
},
{
label: '无效',
value: false
}
],
}
},
methods: {
@ -78,11 +107,28 @@ export default {
}})
},
handleQuery() {
this.$emit('searchEmit', this.SearchId)
if (this.isShowAddButton) {
let editData = {
artId: this.SearchId,
valid: this.valid
}
this.$emit('searchEmit', editData)
} else {
this.$emit('searchEmit', this.SearchId)
}
},
resetQuery() {
this.SearchId = undefined
this.$emit('resetEmit', this.SearchId)
this.valid = undefined
if (this.isShowAddButton) {
let editData = {
artId: this.SearchId,
valid: this.valid
}
this.$emit('resetEmit', editData)
} else {
this.$emit('resetEmit', this.SearchId)
}
}
},
beforeDestroy() {


+ 5
- 4
src/views/plan/workbench/homePage/beta/predict/index.vue View File

@ -22,7 +22,6 @@
<span v-if="item === 'AP_CustDemandVerHead-PlantNr'">{{ getWorkshopName(scope.row['AP_CustDemandVerHead-PlantNr']) }}</span>
<span v-else-if="item === 'AP_CustDemandVerHead-Status'">{{ scope.row['AP_CustDemandVerHead-Status'] == '1' ? '已发布':'未发布' }}</span>
<span v-else-if="item === 'AP_CustDemandVerHead-Valid'">{{ scope.row['AP_CustDemandVerHead-Valid'] == true ? '当前使用':'' }}</span>
<!-- AP_CustDemandVerHead-Valid -->
<span v-else>{{ scope.row[item] }}</span>
</template>
</el-table-column>
@ -88,9 +87,11 @@ export default {
this.getWithRingStatus(newData)
},
//
getPredictList(id, data) {
getPredictList(id, data, valid) {
this.loading = true
get(`/admin/ap/custdemandverhead/selectlist`, {customerId: id, ...{VersionId: data}}).then(({ code, data }) => {
get(`/admin/ap/custdemandverhead/selectdata`, {
customerId: id, ...{artId: data}, valid: valid
}).then(({ code, data }) => {
if (code === 200) {
this.loading = false
this.tableData = data
@ -98,7 +99,7 @@ export default {
})
},
searchEmitHandle(data) {
this.getPredictList(this.customerId, data)
this.getPredictList(this.customerId, data.artId, data.valid)
},
resetEmitHandle() {
this.getPredictList(this.customerId)


Loading…
Cancel
Save