Browse Source

Merge pull request '客户主数据维护优化' (#26) from wangxy into develop

Reviewed-on: #26
Reviewed-by: Liwei <wei.li@le-it.com.cn>
pull/27/head
Liwei 3 years ago
parent
commit
9fbed02fab
1 changed files with 16 additions and 3 deletions
  1. +16
    -3
      src/views/factoryModel/customer/associatePart.vue

+ 16
- 3
src/views/factoryModel/customer/associatePart.vue View File

@ -2,6 +2,7 @@
<el-dialog title="关联物料" <el-dialog title="关联物料"
custom-class="customer-user-container" custom-class="customer-user-container"
model-value model-value
width="80%"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="cancel"> :before-close="cancel">
<div class="users-wrap"> <div class="users-wrap">
@ -12,9 +13,12 @@
filterable filterable
:props="{ :props="{
key: 'Article-ArtId', key: 'Article-ArtId',
label: 'Article-ArtId'
label: 'Article-Descr1'
}" }"
:data="artList"> :data="artList">
<template #default="{option}">
<span>{{ option['Article-ArtId'] }} - {{ option['Article-Descr1'] }}</span>
</template>
</el-transfer> </el-transfer>
</div> </div>
<template #footer> <template #footer>
@ -50,7 +54,7 @@ export default {
} }
}, },
methods: { methods: {
//
//
getArtList() { getArtList() {
this.loading = true this.loading = true
get("/admin/base/article/selectdata",{artSpec1: 'FINISHED'}).then((res) => { get("/admin/base/article/selectdata",{artSpec1: 'FINISHED'}).then((res) => {
@ -76,10 +80,19 @@ export default {
let records = [] let records = []
if (this.chooseArts.length > 0) { if (this.chooseArts.length > 0) {
this.chooseArts.map((el) => { this.chooseArts.map((el) => {
let Descr1 = ''; //
if (this.artList.length > 0) { //
this.artList.map((mapItem) => {
if (el === mapItem['Article-ArtId']) {
Descr1 = mapItem['Article-Descr1']
}
})
}
records.push({ records.push({
"AP_CustArtlst-PlantNr": this.item["Customer-PlantNr"], "AP_CustArtlst-PlantNr": this.item["Customer-PlantNr"],
"AP_CustArtlst-CustomerId": this.item["Customer-CustomerId"], "AP_CustArtlst-CustomerId": this.item["Customer-CustomerId"],
"AP_CustArtlst-ArtId": el
"AP_CustArtlst-ArtId": el,
"AP_CustArtlst-Descr1": Descr1
}) })
}) })
this.item['Customer-ArtList'] = records this.item['Customer-ArtList'] = records


Loading…
Cancel
Save