Browse Source

需求变更,字段回显

pull/137/head
wangxy 3 years ago
parent
commit
437b55a78e
7 changed files with 81 additions and 34 deletions
  1. +1
    -1
      src/api/quality/shipment.js
  2. +19
    -0
      src/views/productexe/basic/component/artComponent.vue
  3. +51
    -5
      src/views/productexe/basic/dispatchOrder.vue
  4. +0
    -23
      src/views/quality/component/shipmentCode.vue
  5. +0
    -1
      src/views/quality/component/shipmentList.vue
  6. +10
    -3
      src/views/quality/component/shipmentSearch.vue
  7. +0
    -1
      src/views/quality/shipment.vue

+ 1
- 1
src/api/quality/shipment.js View File

@ -3,7 +3,7 @@ import request from '@/utils/request'
//获取待发运列表
export function getShiporderList (data) {
return request({
url: `/admin/jit/shiporder/query`,
url: `/admin/jit/shiporder/selectlist`,
method: 'get',
params: data
})


+ 19
- 0
src/views/productexe/basic/component/artComponent.vue View File

@ -4,6 +4,7 @@
<el-table-column v-for="(item, index) in headers" :key="index" width="120" :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-ShortTime'"> {{ parseTime(scope.row[item]) }} </span>
<span v-else>{{ scope.row[item] }}</span>
</template>
@ -64,12 +65,30 @@ export default {
"JIT_ShipOrderItemlst-ShortTime",
],
dataList: [],
itemTypeArray: [],
}
},
created() {
//
this.getStanderOne({ statid: 'ItemType' }).then(res => {
this.itemTypeArray = res.data
})
},
methods: {
cancel() {
this.$emit('completeCallBack', false)
},
fieldTrans(value) {
if (this.itemTypeArray.length > 0) {
let fieldValue = ''
this.itemTypeArray.forEach(el => {
if (value === (el['stdeftab-stdeftyp'])) {
fieldValue = el['stdeftab-bez']
}
})
return fieldValue
}
},
},
mounted() {
this.dataList = []


+ 51
- 5
src/views/productexe/basic/dispatchOrder.vue View File

@ -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>
@ -86,6 +97,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 +124,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",
@ -139,14 +151,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,6 +184,17 @@ 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.excle = file.target.files[0]
@ -246,3 +285,10 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.bg-div {
height: 30px;
line-height: 30px;
}
</style>

+ 0
- 23
src/views/quality/component/shipmentCode.vue View File

@ -42,7 +42,6 @@ export default {
//
enterPress() {
this.statusInfo = ''
// this.checkCode()
if (this.pickCode.indexOf('PACK-') != -1) { //
if (!this.shipOrderId) {
this.msgInfo('请先扫描发运单!')
@ -77,33 +76,11 @@ export default {
}
this.$emit('handleSuccessCode', this.newEmitObj)
} else {
this.statusInfo = '发运单信息不存在!'
return
}
})
}
},
//
checkCode() {
if (this.pickCode.indexOf('PACK-') != -1) { //
if (!this.shipOrderId) {
this.msgInfo('请先选择发运单!')
return
}
} else { //
this.tableData.forEach(el => {
if (el['JIT_ShipOrder-ShipOrderId'] === this.pickCode) {
this.currentShipOrder = el['JIT_ShipOrder-ShipOrderId']
this.newEmitObj = {
currentShipOrder: this.currentShipOrder,
}
this.$emit('handleSuccessCode', this.newEmitObj)
} else {
}
})
}
},
//
resetCode() {
this.pickCode = ''


+ 0
- 1
src/views/quality/component/shipmentList.vue View File

@ -64,7 +64,6 @@ export default {
}
},
created() {
//
this.getStanderOne({ statid: 'shipStatus' }).then(res => {
this.orderStatusArray = res.data
})


+ 10
- 3
src/views/quality/component/shipmentSearch.vue View File

@ -34,7 +34,7 @@ import moment from 'moment'
export default {
data() {
return {
dateValue: moment().format('YYYY-MM-DD'),
dateValue: undefined,
tableData: [],
loading: false,
newObj: {},
@ -53,8 +53,7 @@ export default {
}
getShiporderList(params).then(({code, data}) => {
if (code === 200) {
this.tableData = data.records || []
this.total = data.count
this.tableData = data || []
this.loading = false
this.newObj = {
tableData: this.tableData
@ -74,6 +73,10 @@ export default {
},
//
beforeDayHandle() {
if (!this.dateValue) {
this.msgInfo('请先选择日期!')
return
}
let afterDay = moment(this.dateValue).subtract(1,"days").format("YYYY-MM-DD")
this.dateValue = afterDay
this.getList()
@ -85,6 +88,10 @@ export default {
},
//
afterDayHandle() {
if (!this.dateValue) {
this.msgInfo('请先选择日期!')
return
}
let afterDay = moment(this.dateValue).add(1,"days").format("YYYY-MM-DD")
this.dateValue = afterDay
this.getList()


+ 0
- 1
src/views/quality/shipment.vue View File

@ -41,7 +41,6 @@ export default {
this.tableData = data.tableData
},
handleSuccessCode(data) {
console.log(data)
if (data.shipOrderId) {
this.$refs.shipmentList.getInfo(data)
} else {


Loading…
Cancel
Save