Browse Source

发运

pull/132/head
wangxy 3 years ago
parent
commit
f22bb8a2b0
6 changed files with 141 additions and 52 deletions
  1. +30
    -0
      src/api/quality/shipment.js
  2. +3
    -1
      src/utils/request.js
  3. +38
    -7
      src/views/quality/component/shipmentCode.vue
  4. +33
    -23
      src/views/quality/component/shipmentList.vue
  5. +27
    -16
      src/views/quality/component/shipmentSearch.vue
  6. +10
    -5
      src/views/quality/shipment.vue

+ 30
- 0
src/api/quality/shipment.js View File

@ -0,0 +1,30 @@
import request from '@/utils/request'
//获取待发运列表
export function getShiporderList (data) {
return request({
url: `/admin/jit/shiporder/query`,
method: 'get',
params: data
})
}
// 查询发运明细
export function getShiporderDetail (data) {
return request({
url: `/admin/jit/shiporder/selectone/` + data,
method: 'get'
})
}
// 扫码校验
export function checkScancarpack (data) {
return request({
url: `/admin/jit/shiporder/scancarpack`,
method: 'get',
params: data
})
}

+ 3
- 1
src/utils/request.js View File

@ -78,7 +78,9 @@ service.interceptors.response.use(
type: 'error',
duration: 3 * 1000
})
} else if (code !== 200) {
} else if (code === 202) {
return response.data
} else if (code !== 200) {
Notification.error({
title: response.data.msg
})


+ 38
- 7
src/views/quality/component/shipmentCode.vue View File

@ -2,7 +2,7 @@
<div class="shipment-code-wrap">
<div class="pick-info">
<strong>状态栏</strong>
请扫描下一个待发运零件
<span :class="isSuccess ? 'green' : 'red'">{{statusInfo}}</span>
</div>
<div class="pick-info pick-code">
<strong>扫描条码</strong>
@ -13,28 +13,53 @@
placeholder="条码"
autofocus
@keyup.enter.native="enterPress"></el-input>
<el-button type="trimary" class="reset-code">重置扫描</el-button>
<el-button type="trimary" @click="resetCode" class="reset-code">重置扫描</el-button>
</div>
</div>
</template>
<script>
import { checkScancarpack } from '@/api/quality/shipment.js'
export default {
props: {
isVisible: {
default: false,
shipOrderId: {
default: '',
}
},
data() {
return {
pickCode: '',
statusInfo: '',
isSuccess: false,
}
},
methods: {
enterPress(e) {
console.log(e)
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)
} else {
this.isSuccess = false
}
this.statusInfo = res.msg
}).catch(res => {
this.statusInfo = res.msg
this.isSuccess = false
})
},
resetCode() {
this.pickCode = ''
}
},
}
}
</script>
@ -45,6 +70,12 @@ export default {
background: #f5f7fc;
padding: 10px;
margin-right: 20px;
.green {
color: green;
}
.red {
color: red;
}
strong {
width: 100px;
display: inline-block;


+ 33
- 23
src/views/quality/component/shipmentList.vue View File

@ -2,58 +2,68 @@
<div class="shipment-list-wrap">
<div class="shipment-list-info clearfix">
<div class="pick-info pick-info1 fl">
<strong>捡料单号</strong>20210920-F39-2
<strong>捡料单号</strong>{{dataObj['JIT_ShipOrder-ShipOrderId']}}
</div>
<div class="pick-info pick-info2 fl">
<strong>描述</strong>第二车包装
<strong>描述</strong>{{dataObj['JIT_ShipOrder-Descr']}}
</div>
<div class="pick-info pick-info3 fl">
<strong>计划/实际(数量)</strong>6/666
<strong>实际/计划(数量)</strong>{{dataObj['JIT_ShipOrder-ActualQty']}}/{{dataObj['JIT_ShipOrder-PlanQty']}}
</div>
</div>
<div class="pick-table">
<el-table
v-loading="loading"
:data="tableData"
:data="dataObj['JIT_ShipOrder-ShipOrderItemlst']"
border
height="100%"
>
<el-table-column prop="date" label="位置" show-overflow-tooltip></el-table-column>
<el-table-column prop="name" label="零件号" show-overflow-tooltip></el-table-column>
<el-table-column prop="date" label="项目号" show-overflow-tooltip></el-table-column>
<el-table-column prop="name" label="描述" show-overflow-tooltip></el-table-column>
<el-table-column prop="date" label="标包" show-overflow-tooltip></el-table-column>
<el-table-column prop="name" label="需求包装数" show-overflow-tooltip></el-table-column>
<el-table-column prop="date" label="计划数量" show-overflow-tooltip></el-table-column>
<el-table-column prop="name" label="实际数量" show-overflow-tooltip></el-table-column>
<el-table-column prop="date" label="状态" show-overflow-tooltip></el-table-column>
<el-table-column type="index" label="位置" width="50"></el-table-column>
<el-table-column prop="JIT_ShipOrderItemlst-ItemId" label="零件号" show-overflow-tooltip></el-table-column>
<!-- <el-table-column prop="JIT_ShipOrderItemlst-ProjectId" label="项目号" show-overflow-tooltip></el-table-column> -->
<el-table-column prop="JIT_ShipOrderItemlst-Descr" label="描述" show-overflow-tooltip></el-table-column>
<!-- <el-table-column prop="date" label="标包" show-overflow-tooltip></el-table-column>
<el-table-column prop="name" label="需求包装数" show-overflow-tooltip></el-table-column> -->
<el-table-column prop="JIT_ShipOrderItemlst-PlanQty" label="计划数量" show-overflow-tooltip></el-table-column>
<el-table-column prop="JIT_ShipOrderItemlst-ActualQty" label="实际数量" show-overflow-tooltip></el-table-column>
<el-table-column prop="JIT_ShipOrderItemlst-Status" label="状态" show-overflow-tooltip></el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import { getShiporderDetail } from '@/api/quality/shipment.js'
export default {
props: {
isVisible: {
default: false,
shipOrderId: {
default: '',
}
},
data() {
return {
tableData: [{
date: '第一本包装',
name: '12',
},{
date: '第一本包装',
name: '376',
}],
tableData: [],
loading: false,
dataObj: {},
}
},
methods: {
getInfo(orderId) {
getShiporderDetail(orderId).then(({code, data}) => {
if (code === 200) {
this.dataObj = data
}
})
},
},
watch: {
shipOrderId: {
handler(newValue, oldValue) {
this.getInfo(newValue)
},
deep: true,
},
},
}
</script>


+ 27
- 16
src/views/quality/component/shipmentSearch.vue View File

@ -21,51 +21,62 @@
border
@current-change="handleCurrentChange"
height="calc(100% - 50px)">
<el-table-column prop="date" label="描述" show-overflow-tooltip></el-table-column>
<el-table-column prop="name" label="计划数量" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="JIT_ShipOrder-Descr" label="描述" show-overflow-tooltip></el-table-column>
<el-table-column prop="JIT_ShipOrder-PlanQty" label="计划数量" width="100" show-overflow-tooltip></el-table-column>
</el-table>
</div>
</template>
<script>
import { getShiporderList } from '@/api/quality/shipment.js'
import moment from 'moment'
export default {
props: {
isVisible: {
default: false,
}
},
data() {
return {
dateValue: moment().format('YYYY-MM-DD'),
tableData: [{
date: '第一本包装',
name: '12',
},{
date: '第一本包装',
name: '376',
}],
tableData: [],
loading: false,
}
},
created() {
this.getList()
},
methods: {
moment,
//
getList() {
this.loading = true
let params = {
deliverDate: this.dateValue
}
getShiporderList(params).then(({code, data}) => {
if (code === 200) {
this.tableData = data.records || []
this.total = data.count
this.loading = false
}
})
},
//
handleCurrentChange(val) {
console.log(val)
this.$emit('handleCurrentChange', val)
},
//
beforeDayHandle() {
let afterDay = moment(this.dateValue).subtract(1,"days").format("YYYY-MM-DD")
this.dateValue = afterDay
this.getList()
},
//
currentDayHandle(value) {
console.log(value)
this.dateValue = value
this.getList()
},
//
afterDayHandle() {
let afterDay = moment(this.dateValue).add(1,"days").format("YYYY-MM-DD")
this.dateValue = afterDay
this.getList()
}
},
}


+ 10
- 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 />
<shipmentSearch @handleCurrentChange="handleCurrentChange" />
</div>
</div>
<div class="shipment-right-wrap">
<shipmentList />
<shipmentList ref="shipmentSearch" :shipOrderId="shipOrderId" />
</div>
</div>
<div class="shipment-bottom-wrap">
<shipmentCode />
<shipmentCode :shipOrderId="shipOrderId" @handleSuccessCode="handleSuccessCode" />
</div>
</div>
</template>
@ -29,11 +29,16 @@ export default {
},
data() {
return {
shipOrderId: '',
}
},
methods: {
handleCurrentChange(data) {
this.shipOrderId = data['JIT_ShipOrder-ShipOrderId']
},
handleSuccessCode(data) {
this.$refs.shipmentSearch.getInfo(data)
}
},
}
</script>


Loading…
Cancel
Save