Browse Source

Merge branch 'develop' of http://101.201.121.115:3000/leo/LAPP_GAAS_GFrame_WEBFRONT into liwei

pull/138/head
liwei 3 years ago
parent
commit
3eed39fb17
8 changed files with 142 additions and 40 deletions
  1. +1
    -1
      src/api/quality/shipment.js
  2. +46
    -2
      src/views/productexe/basic/component/artComponent.vue
  3. +27
    -2
      src/views/productexe/basic/component/pkgComponent.vue
  4. +57
    -6
      src/views/productexe/basic/dispatchOrder.vue
  5. +0
    -23
      src/views/quality/component/shipmentCode.vue
  6. +0
    -1
      src/views/quality/component/shipmentList.vue
  7. +10
    -3
      src/views/quality/component/shipmentSearch.vue
  8. +1
    -2
      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
})


+ 46
- 2
src/views/productexe/basic/component/artComponent.vue View File

@ -1,9 +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-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>
@ -26,6 +36,12 @@ export default {
},
item: {
default: {},
},
colorData: {
default: {},
},
orderStatusArray: {
default: []
}
},
data() {
@ -64,12 +80,40 @@ 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
}
},
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 = []


+ 57
- 6
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>
@ -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>

+ 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()


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

@ -41,9 +41,8 @@ export default {
this.tableData = data.tableData
},
handleSuccessCode(data) {
console.log(data)
if (data.shipOrderId) {
this.$refs.shipmentList.getInfo(data)
this.$refs.shipmentList.getInfo(data.shipOrderId)
} else {
this.$refs.shipmentSearch.handleCurrentChange(data.currentShipOrder)
}


Loading…
Cancel
Save