|
|
@ -28,10 +28,21 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table v-loading="loading" :data="dataList" border> |
|
|
|
<el-table-column v-for="(item, index) in headers" :key="index" width="150" :label="getColumnName(item)" :show-overflow-tooltip="true"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item, index) in headers" |
|
|
|
:key="index" |
|
|
|
width="150" |
|
|
|
align="center" |
|
|
|
:label="getColumnName(item)" |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="item === 'JIT_ShipOrder-PlantNr'">{{ getValue(scope.row['JIT_ShipOrder-PlantNr']) }}</span> |
|
|
|
<span v-else-if="item === 'JIT_ShipOrder-DeliverDate' || item === 'JIT_ShipOrder-ShipDate'"> |
|
|
|
{{ moment(scope.row[item]).format('YYYY-MM-DD') }} </span> |
|
|
|
<span v-else-if="item === 'JIT_ShipOrder-LastModify'"> {{ parseTime(scope.row[item]) }} </span> |
|
|
|
<div |
|
|
|
v-else-if="item === 'JIT_ShipOrder-Status'" |
|
|
|
:class="[colorData[scope.row[item]], 'bg-div']"> {{ fieldTrans(scope.row[item]) }} </div> |
|
|
|
<span v-else-if="item === 'JIT_ShipOrder-CreateTime'"> {{ parseTime(scope.row[item]) }} </span> |
|
|
|
<span v-else>{{ scope.row[item] }}</span> |
|
|
|
</template> |
|
|
@ -68,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> |
|
|
@ -86,6 +101,7 @@ import { |
|
|
|
} from '@/api/productexe/shipment'; |
|
|
|
import artComponent from './component/artComponent.vue' |
|
|
|
import pkgComponent from './component/pkgComponent.vue' |
|
|
|
import moment from 'moment' |
|
|
|
export default { |
|
|
|
name: 'dispatchOrder', |
|
|
|
components: { |
|
|
@ -112,8 +128,8 @@ export default { |
|
|
|
"JIT_ShipOrder-TemplateFile", |
|
|
|
"JIT_ShipOrder-PlanQty", |
|
|
|
"JIT_ShipOrder-ActualQty", |
|
|
|
"JIT_ShipOrder-OpenTime", |
|
|
|
"JIT_ShipOrder-CloseTime", |
|
|
|
// "JIT_ShipOrder-OpenTime", |
|
|
|
// "JIT_ShipOrder-CloseTime", |
|
|
|
"JIT_ShipOrder-Operator", |
|
|
|
"JIT_ShipOrder-SupplierCode", |
|
|
|
"JIT_ShipOrder-PurchaseOrderId", |
|
|
@ -124,7 +140,7 @@ export default { |
|
|
|
"JIT_ShipOrder-CreateTime", |
|
|
|
], |
|
|
|
// 遮罩层 |
|
|
|
loading: true, |
|
|
|
loading: false, |
|
|
|
// 总条数 |
|
|
|
total: 0, |
|
|
|
// 查询参数 |
|
|
@ -139,14 +155,30 @@ export default { |
|
|
|
uploadLoading: false, |
|
|
|
excel: '', |
|
|
|
uploadmustpic: '', |
|
|
|
colorData:{ |
|
|
|
10:'not-plan-bg', |
|
|
|
20:'has-plan-bg', |
|
|
|
24:'has-lock-bg', |
|
|
|
26:'has-issued-bg', |
|
|
|
39:'interrupt-bg', |
|
|
|
40:'in-production-bg', |
|
|
|
80:'has-complete-bg', |
|
|
|
90:'has-shipment-bg', |
|
|
|
95:'freeze-bg', |
|
|
|
98:'has-cancel-bg', |
|
|
|
}, |
|
|
|
orderStatusArray: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getList() |
|
|
|
this.getStanderOne({ statid: 'shipStatus' }).then(res => { |
|
|
|
this.orderStatusArray = res.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
/** 查询列表 */ |
|
|
|
getList() { |
|
|
|
moment, |
|
|
|
getList() { // 查询列表 |
|
|
|
this.loading = true |
|
|
|
getShiporderList(this.queryParams).then( |
|
|
|
response => { |
|
|
@ -156,8 +188,20 @@ export default { |
|
|
|
} |
|
|
|
) |
|
|
|
}, |
|
|
|
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 |
|
|
|
} |
|
|
|
}, |
|
|
|
// 上传文件预览 |
|
|
|
previewUpload(file) { |
|
|
|
this.uploadLoading = false |
|
|
|
this.excle = file.target.files[0] |
|
|
|
const uploadData = new FormData() |
|
|
|
uploadData.append('upload', this.excle) |
|
|
@ -246,3 +290,10 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.bg-div { |
|
|
|
height: 30px; |
|
|
|
line-height: 30px; |
|
|
|
} |
|
|
|
</style> |