Browse Source

发运单管理优化

pull/137/head
wangxy 3 years ago
parent
commit
2db3212c60
3 changed files with 60 additions and 6 deletions
  1. +29
    -4
      src/views/productexe/basic/component/artComponent.vue
  2. +27
    -2
      src/views/productexe/basic/component/pkgComponent.vue
  3. +4
    -0
      src/views/productexe/basic/dispatchOrder.vue

+ 29
- 4
src/views/productexe/basic/component/artComponent.vue View File

@ -1,10 +1,19 @@
<template>
<el-dialog title="零件明细" width="80%" :visible.sync="currentVisible" :close-on-click-modal="false" :before-close="cancel">
<el-table v-loading="loading" :data="dataList" border height="500px">
<el-table-column v-for="(item, index) in headers" :key="index" width="120" :label="getColumnName(item)" :show-overflow-tooltip="true">
<el-table v-loading="loading" :data="dataList" border height="500px" >
<el-table-column
v-for="(item, index) in headers"
:key="index"
width="120"
align="center"
:label="getColumnName(item)"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="item === 'JIT_ShipOrderItemlst-PlantNr'">{{ getValue(scope.row['JIT_ShipOrderItemlst-PlantNr']) }}</span>
<span v-if="item === 'JIT_ShipOrderItemlst-ItemType'">{{ fieldTrans(scope.row['JIT_ShipOrderItemlst-ItemType']) }}</span>
<span v-else-if="item === 'JIT_ShipOrderItemlst-ItemType'">{{ fieldTrans(scope.row['JIT_ShipOrderItemlst-ItemType']) }}</span>
<div
v-else-if="item === 'JIT_ShipOrderItemlst-Status'"
:class="[colorData[scope.row[item]], 'bg-div']"> {{ fieldTransOrder(scope.row[item]) }} </div>
<span v-else-if="item === 'JIT_ShipOrderItemlst-ShortTime'"> {{ parseTime(scope.row[item]) }} </span>
<span v-else>{{ scope.row[item] }}</span>
</template>
@ -27,6 +36,12 @@ export default {
},
item: {
default: {},
},
colorData: {
default: {},
},
orderStatusArray: {
default: []
}
},
data() {
@ -69,7 +84,6 @@ export default {
}
},
created() {
//
this.getStanderOne({ statid: 'ItemType' }).then(res => {
this.itemTypeArray = res.data
})
@ -89,6 +103,17 @@ export default {
return fieldValue
}
},
fieldTransOrder(value) {
if (this.orderStatusArray.length > 0) {
let fieldValue = ''
this.orderStatusArray.forEach(el => {
if (value === Number(el['stdeftab-stdeftyp'])) {
fieldValue = el['stdeftab-bez']
}
})
return fieldValue
}
},
},
mounted() {
this.dataList = []


+ 27
- 2
src/views/productexe/basic/component/pkgComponent.vue View File

@ -1,9 +1,17 @@
<template>
<el-dialog title="包装单明细" width="80%" :visible.sync="currentVisible" :close-on-click-modal="false" :before-close="cancel">
<el-table v-loading="loading" :data="dataList" border height="500px">
<el-table-column v-for="(item, index) in headers" :key="index" :label="getColumnName(item)" :show-overflow-tooltip="true">
<el-table-column
v-for="(item, index) in headers"
align="center"
:key="index"
:label="getColumnName(item)"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="item === 'JIT_ShipOrderDatalst-PlantNr'">{{ getValue(scope.row['JIT_ShipOrderDatalst-PlantNr']) }}</span>
<div
v-else-if="item === 'JIT_ShipOrderDatalst-Status'"
:class="[colorData[scope.row[item]], 'bg-div']"> {{ fieldTrans(scope.row[item]) }} </div>
<span v-else>{{ scope.row[item] }}</span>
</template>
</el-table-column>
@ -25,6 +33,12 @@ export default {
},
item: {
default: {},
},
colorData: {
default: {},
},
orderStatusArray: {
default: []
}
},
data() {
@ -32,9 +46,9 @@ export default {
currentVisible: this.isPkgVisible,
loading: false,
headers: [
"JIT_ShipOrderDatalst-Pos",
"JIT_ShipOrderDatalst-PlantNr",
"JIT_ShipOrderDatalst-ShipOrderId",
"JIT_ShipOrderDatalst-Pos",
"JIT_ShipOrderDatalst-ShipObjId",
"JIT_ShipOrderDatalst-ShipObjBarcode",
"JIT_ShipOrderDatalst-ItemId",
@ -49,6 +63,17 @@ export default {
cancel() {
this.$emit('completeCallBack', false)
},
fieldTrans(value) {
if (this.orderStatusArray.length > 0) {
let fieldValue = ''
this.orderStatusArray.forEach(el => {
if (value === Number(el['stdeftab-stdeftyp'])) {
fieldValue = el['stdeftab-bez']
}
})
return fieldValue
}
},
},
mounted() {
this.dataList = []


+ 4
- 0
src/views/productexe/basic/dispatchOrder.vue View File

@ -79,11 +79,15 @@
v-if="isVisible"
:isVisible="isVisible"
:item="item"
:colorData="colorData"
:orderStatusArray="orderStatusArray"
@completeCallBack="completeCallBackArt"/>
<pkgComponent
v-if="isPkgVisible"
:isPkgVisible="isPkgVisible"
:item="item"
:colorData="colorData"
:orderStatusArray="orderStatusArray"
@completeCallBack="completeCallBackPkg"/>
</div>
</template>


Loading…
Cancel
Save