2024-08-01 18:40:06 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="zd_container">
|
|
|
|
|
|
<!-- <nav-bar title="子卷装箱"></nav-bar> -->
|
|
|
|
|
|
<nav-bar :title="title"></nav-bar>
|
|
|
|
|
|
<view class="zd_content">
|
|
|
|
|
|
<view class="zd_wrapper">
|
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
|
<view class="filter_label_wraper">
|
|
|
|
|
|
<span class="filter_label">子卷号</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
|
<search-box v-model="val1" @handleChange="handleChange" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="zd_wrapper grid-wraper">
|
|
|
|
|
|
<view class="slide_new">
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>选择</th>
|
|
|
|
|
|
<th class="th_2">订单号</th>
|
|
|
|
|
|
<th>客户名称</th>
|
|
|
|
|
|
<th>子卷号</th>
|
|
|
|
|
|
<th>子卷规格</th>
|
|
|
|
|
|
<th>子卷重量</th>
|
|
|
|
|
|
<th>子管重量</th>
|
|
|
|
|
|
<th>木箱料号</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr v-for="(e, i) in dataList" :key="i">
|
|
|
|
|
|
<td><span class="iconfont icon_minus-filled" @click="toCheck(e, i)">−</span></td>
|
|
|
|
|
|
<td class="td_2">{{e.sale_order_name}}</td>
|
|
|
|
|
|
<td>{{e.customer_description}}</td>
|
|
|
|
|
|
<td>{{e.container_name}}</td>
|
|
|
|
|
|
<td>{{e.paper_tube_description}}</td>
|
|
|
|
|
|
<td>{{e.paper_weight}}</td>
|
|
|
|
|
|
<td>{{e.box_weight}}</td>
|
2024-08-01 19:57:41 +08:00
|
|
|
|
<td>{{e.box_type}}</td>
|
2024-08-01 18:40:06 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="zd-row submitbar">
|
|
|
|
|
|
<button class="zd-col-6 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
|
|
|
|
|
|
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !dataList.length}" @tap="toSure">组盘</button>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
|
|
|
|
|
<view class="pop-line"></view>
|
|
|
|
|
|
<view class="zd_wrapper-2">
|
|
|
|
|
|
<view class="zd-row filter_item">
|
|
|
|
|
|
<view :class="!disabled ? 'zd-col-18' : 'zd-col-24'">
|
|
|
|
|
|
<input type="text" placeholder="输入关键字搜索" class="filter_input" :class="{'filter_input_disabled': disabled}" :disabled="disabled" v-model="val2">
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view v-show="!disabled" class="zd-col-5"><button class="btn-submit btn-success" @tap="_queryBoxSpec">查询</button></view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="msg_content msg_content_1 pdb110">
|
|
|
|
|
|
<view class="zd_wrapper grid-wraper">
|
|
|
|
|
|
<view class="slide_new">
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>木箱规格</th>
|
|
|
|
|
|
<th>物料名称</th>
|
|
|
|
|
|
<th>木箱长度</th>
|
|
|
|
|
|
<th>木箱宽度</th>
|
|
|
|
|
|
<th>木箱高度</th>
|
|
|
|
|
|
<th>木箱库存数</th>
|
|
|
|
|
|
<th>最大装卷数</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr v-for="(e, i) in popData" :key="'pop' + i" @click="popCheck(e)" :class="{'checked': e.material_code === pkId}">
|
|
|
|
|
|
<td>{{e.material_code}}</td>
|
|
|
|
|
|
<td>{{e.material_name}}</td>
|
|
|
|
|
|
<td>{{e.box_length}}</td>
|
|
|
|
|
|
<td>{{e.box_width}}</td>
|
|
|
|
|
|
<td>{{e.box_high}}</td>
|
|
|
|
|
|
<td>{{e.ivt_num}}</td>
|
|
|
|
|
|
<td>{{e.num}}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="zd-row submitbar">
|
2024-08-08 19:41:18 +08:00
|
|
|
|
<button class="zd-col-6 btn-submit btn-success letter-30" @tap="show = false, pkId = '', pkObj = {}">取消</button>
|
2024-08-01 18:40:06 +08:00
|
|
|
|
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !pkId}" :disabled="disabled1" @tap="popSure">确定</button>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view v-if="show" class="msg_mask"></view>
|
|
|
|
|
|
<view class="msg_modal" :class="modalShow ? 'popshow1' : 'pophide1'">
|
|
|
|
|
|
<view class="msg_tip">提示</view>
|
|
|
|
|
|
<view class="zd_content pdt26">
|
|
|
|
|
|
<view class="msg_p1">请仔细核对子卷与木箱规格是否匹配,</view>
|
|
|
|
|
|
<view class="msg_p2">木箱规格为:{{this.pkObj.material_name}},</view>
|
|
|
|
|
|
<view class="msg_p2">子卷规格为:{{this.current.paper_tube_description}},</view>
|
|
|
|
|
|
<view class="msg_p1">击确定后将立即生成空木箱出库任务,无法更改!</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="zd-row submitbar">
|
|
|
|
|
|
<button class="zd-col-6 btn-submit btn-success letter-30" @tap.stop="modalShow = false">取消</button>
|
|
|
|
|
|
<button class="zd-col-15 btn-submit btn-success letter-30" @tap="modalSure">确定</button>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view v-if="modalShow" class="msg_mask msg_mask_1"></view>
|
2024-08-08 19:24:27 +08:00
|
|
|
|
<view class="msg_modal" :class="modalShow1 ? 'popshow1' : 'pophide1'">
|
|
|
|
|
|
<view class="msg_tip">提示</view>
|
|
|
|
|
|
<view class="zd_content pdt26">
|
|
|
|
|
|
<view class="msg_p1">请仔细核对当前扫描子卷数与木箱装卷数是否一致,</view>
|
|
|
|
|
|
<view class="msg_p2">当前扫描子卷数: {{dataList.length}}卷,该木箱装卷数为:{{pkObj.num}}卷,</view>
|
|
|
|
|
|
<view class="msg_p1">点击确定后将立即生成空木箱出库任务,无法更改!</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="zd-row submitbar">
|
|
|
|
|
|
<button class="zd-col-6 btn-submit btn-success letter-30" @tap.stop="modalShow1 = false">取消</button>
|
|
|
|
|
|
<button class="zd-col-15 btn-submit btn-success letter-30" @tap="modalSure1">确定</button>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view v-if="modalShow1" class="msg_mask msg_mask_1"></view>
|
2024-08-01 18:40:06 +08:00
|
|
|
|
<up-top ref="UT" :scrollTop="top"></up-top>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import NavBar from '@/components/NavBar.vue'
|
|
|
|
|
|
import SearchBox from '@/components/SearchBox.vue'
|
|
|
|
|
|
import UpTop from '@/components/upTop.vue'
|
|
|
|
|
|
import {queryContainerNameBySaleOrder, queryBoxSpec, updateEntityList} from '@/utils/getData3.js'
|
|
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
|
|
|
|
|
NavBar,
|
|
|
|
|
|
SearchBox,
|
|
|
|
|
|
UpTop
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
title: '',
|
|
|
|
|
|
top: 0,
|
|
|
|
|
|
val1: '',
|
|
|
|
|
|
dataList: [],
|
|
|
|
|
|
popData: [],
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
disabled: false,
|
|
|
|
|
|
val2: '',
|
|
|
|
|
|
pkId: '',
|
|
|
|
|
|
pkObj: {},
|
|
|
|
|
|
paper: '',
|
|
|
|
|
|
modalShow: false,
|
2024-08-08 19:24:27 +08:00
|
|
|
|
modalShow1: false,
|
2024-08-01 18:40:06 +08:00
|
|
|
|
disabled1: false
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
current () {
|
|
|
|
|
|
let res = {paper_tube_description: '', sale_order_name: ''}
|
|
|
|
|
|
if (this.dataList.length > 0) {
|
|
|
|
|
|
res = this.dataList[0]
|
|
|
|
|
|
}
|
|
|
|
|
|
return res
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onPageScroll(e) {
|
|
|
|
|
|
this.$refs.UT.topData(e.scrollTop)
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad (options) {
|
|
|
|
|
|
this.title = options.title
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
handleChange (e) {
|
|
|
|
|
|
this._queryContainerNameBySaleOrder(e)
|
|
|
|
|
|
},
|
|
|
|
|
|
async _queryContainerNameBySaleOrder (e) {
|
|
|
|
|
|
let res = await queryContainerNameBySaleOrder(e)
|
|
|
|
|
|
if (res.content.length) {
|
2024-08-01 19:57:41 +08:00
|
|
|
|
if (res.content[0].paper_tube_description === null || res.content[0].paper_tube_description === '') {
|
2024-08-01 18:40:06 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '未查询到该子卷规格信息,请检查子卷的分切计划信息!',
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 5000
|
|
|
|
|
|
})
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.dataList.length >= 1 && res.content[0].paper_tube_description !== this.current.paper_tube_description) {
|
|
|
|
|
|
uni.showToast({
|
2024-08-01 19:57:41 +08:00
|
|
|
|
title: `扫描的规格为:${res.content[0].paper_tube_description},与列表中的子卷规格不一致,请检查!`,
|
2024-08-01 18:40:06 +08:00
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 5000
|
|
|
|
|
|
})
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.dataList.length >= 1 && res.content[0].sale_order_name !== this.current.sale_order_name) {
|
|
|
|
|
|
uni.showToast({
|
2024-08-01 19:57:41 +08:00
|
|
|
|
title: `当前扫描的订单号为:${res.content[0].sale_order_name},与列表中的订单号不一致,请检查!`,
|
2024-08-01 18:40:06 +08:00
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 5000
|
|
|
|
|
|
})
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
2024-08-01 19:57:41 +08:00
|
|
|
|
if (res.content[0].status !== '99') {
|
2024-08-01 18:40:06 +08:00
|
|
|
|
uni.showToast({
|
2024-08-01 19:57:41 +08:00
|
|
|
|
title: `该子卷状态为已分配木箱规格,请检查!`,
|
2024-08-01 18:40:06 +08:00
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
let flag = false
|
|
|
|
|
|
this.dataList.map(el => {
|
|
|
|
|
|
if (el.container_name === res.content[0].container_name) {
|
|
|
|
|
|
flag = true
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
if (flag) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: `该子卷已存在,请检查!`,
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
this.dataList = [...this.dataList, ...res.content]
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
toCheck (e, i) {
|
|
|
|
|
|
this.dataList.splice(i, 1)
|
|
|
|
|
|
},
|
|
|
|
|
|
toSure () {
|
2024-08-01 19:57:41 +08:00
|
|
|
|
if (!this.dataList.length) {
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
2024-08-01 18:40:06 +08:00
|
|
|
|
let code = ''
|
|
|
|
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
|
|
|
|
if (this.dataList[i].box_type !== '') {
|
|
|
|
|
|
code = this.dataList[i].box_type
|
|
|
|
|
|
break
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.disabled = code !== ''
|
|
|
|
|
|
this.val2 = code
|
|
|
|
|
|
this._queryBoxSpec()
|
|
|
|
|
|
},
|
|
|
|
|
|
async _queryBoxSpec () {
|
|
|
|
|
|
let res = await queryBoxSpec(this.val2)
|
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
this.popData = [...res.content]
|
|
|
|
|
|
this.show = true
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
clearUp () {
|
|
|
|
|
|
this.val1 = ''
|
|
|
|
|
|
this.dataList = []
|
|
|
|
|
|
this.disabled = false
|
|
|
|
|
|
this.disabled1 = false
|
|
|
|
|
|
this.show = false
|
|
|
|
|
|
this.modalShow = false
|
|
|
|
|
|
},
|
|
|
|
|
|
popCheck (e) {
|
|
|
|
|
|
this.pkId = this.pkId === e.material_code ? '' : e.material_code
|
|
|
|
|
|
this.pkObj = this.pkId === e.material_code ? e : {}
|
|
|
|
|
|
},
|
|
|
|
|
|
async _updateEntityList () {
|
|
|
|
|
|
this.disabled1 = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
let res = await updateEntityList(this.pkId, this.dataList)
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '操作成功!',
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
this.clearUp()
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
this.disabled1 = false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
popSure () {
|
2024-08-01 19:57:41 +08:00
|
|
|
|
if (this.dataList.length > Number(this.pkObj.num)) {
|
2024-08-01 18:40:06 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '子卷数量超过木箱的最大装卷数!',
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 5000
|
|
|
|
|
|
})
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
2024-08-08 19:24:27 +08:00
|
|
|
|
if (this.dataList.length < Number(this.pkObj.num)) {
|
|
|
|
|
|
this.modalShow1 = true
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
2024-08-01 18:40:06 +08:00
|
|
|
|
this.modalShow = true
|
|
|
|
|
|
},
|
|
|
|
|
|
modalSure () {
|
|
|
|
|
|
this._updateEntityList()
|
|
|
|
|
|
this.modalShow = false
|
2024-08-08 19:24:27 +08:00
|
|
|
|
},
|
|
|
|
|
|
modalSure1 () {
|
|
|
|
|
|
this.modalShow1 = false
|
|
|
|
|
|
this.modalShow = true
|
2024-08-01 18:40:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|