Browse Source

Merge pull request '发运' (#134) from feature_supplier into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_GAAS_GFrame_WEBFRONT/pulls/134
Reviewed-by: Liwei <wei.li@le-it.com.cn>
pull/136/head
Liwei 3 years ago
parent
commit
a67d2c69c9
3 changed files with 93 additions and 24 deletions
  1. +67
    -18
      src/views/quality/component/shipmentCode.vue
  2. +12
    -1
      src/views/quality/component/shipmentSearch.vue
  3. +14
    -5
      src/views/quality/shipment.vue

+ 67
- 18
src/views/quality/component/shipmentCode.vue View File

@ -24,6 +24,9 @@ export default {
props: {
shipOrderId: {
default: '',
},
tableData: {
default: []
}
},
data() {
@ -31,31 +34,77 @@ export default {
pickCode: '',
statusInfo: '',
isSuccess: false,
currentShipOrder: '',
newEmitObj: {},
}
},
methods: {
//
enterPress() {
if (!this.shipOrderId) {
this.msgInfo('请先选择发运单!')
return
}
let params = {
shipOrderId: this.shipOrderId,
packOrderId: this.pickCode
}
checkScancarpack(params).then(res => {
if (res.code === 200) {
this.isSuccess = true
this.$emit('handleSuccessCode', this.shipOrderId)
this.statusInfo = ''
// this.checkCode()
if (this.pickCode.indexOf('PACK-') != -1) { //
if (!this.shipOrderId) {
this.msgInfo('请先扫描发运单!')
return
} else {
this.isSuccess = false
let params = {
shipOrderId: this.shipOrderId,
packOrderId: this.pickCode
}
checkScancarpack(params).then(res => {
if (res.code === 200) {
this.isSuccess = true
this.newEmitObj = {
shipOrderId: this.shipOrderId,
}
this.$emit('handleSuccessCode', this.newEmitObj)
} else {
this.isSuccess = false
}
this.statusInfo = res.msg
}).catch(res => {
this.statusInfo = res.msg
this.isSuccess = false
})
}
this.statusInfo = res.msg
}).catch(res => {
this.statusInfo = res.msg
this.isSuccess = false
})
} else { //
this.tableData.forEach(el => {
if (el['JIT_ShipOrder-ShipOrderId'] === this.pickCode) {
this.currentShipOrder = el
this.newEmitObj = {
currentShipOrder: el,
}
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 = ''
}


+ 12
- 1
src/views/quality/component/shipmentSearch.vue View File

@ -14,6 +14,7 @@
<el-button class="before-after-day fr" @click="afterDayHandle">后一天</el-button>
</div>
<el-table
ref="tableRef"
v-loading="loading"
:data="tableData"
highlight-current-row
@ -36,6 +37,7 @@ export default {
dateValue: moment().format('YYYY-MM-DD'),
tableData: [],
loading: false,
newObj: {},
}
},
created() {
@ -54,12 +56,21 @@ export default {
this.tableData = data.records || []
this.total = data.count
this.loading = false
this.newObj = {
tableData: this.tableData
}
this.$emit('handleCurrentChange', this.newObj)
}
})
},
//
handleCurrentChange(val) {
this.$emit('handleCurrentChange', val)
this.newObj = {
currentData: val,
tableData: this.tableData
}
this.$refs.tableRef.setCurrentRow(val)
this.$emit('handleCurrentChange', this.newObj)
},
//
beforeDayHandle() {


+ 14
- 5
src/views/quality/shipment.vue View File

@ -3,15 +3,15 @@
<div class="shipment-top-wrap">
<div class="shipment-left-wrap">
<div class="shipment-search">
<shipmentSearch @handleCurrentChange="handleCurrentChange" />
<shipmentSearch ref="shipmentSearch" @handleCurrentChange="handleCurrentChange" />
</div>
</div>
<div class="shipment-right-wrap">
<shipmentList ref="shipmentSearch" :shipOrderId="shipOrderId" />
<shipmentList ref="shipmentList" :shipOrderId="shipOrderId" />
</div>
</div>
<div class="shipment-bottom-wrap">
<shipmentCode :shipOrderId="shipOrderId" @handleSuccessCode="handleSuccessCode" />
<shipmentCode :shipOrderId="shipOrderId" :tableData="tableData" @handleSuccessCode="handleSuccessCode" />
</div>
</div>
</template>
@ -30,14 +30,23 @@ export default {
data() {
return {
shipOrderId: '',
tableData: [],
}
},
methods: {
handleCurrentChange(data) {
this.shipOrderId = data['JIT_ShipOrder-ShipOrderId']
if (data.currentData) {
this.shipOrderId = data['currentData']['JIT_ShipOrder-ShipOrderId']
}
this.tableData = data.tableData
},
handleSuccessCode(data) {
this.$refs.shipmentSearch.getInfo(data)
console.log(data)
if (data.shipOrderId) {
this.$refs.shipmentList.getInfo(data)
} else {
this.$refs.shipmentSearch.handleCurrentChange(data.currentShipOrder)
}
}
},
}


Loading…
Cancel
Save