基础显示
parent
3b266595ae
commit
3c212d6476
|
|
@ -10,6 +10,6 @@ ENV = 'production'
|
|||
#VUE_APP_WS_API = 'ws://47.103.100.52:8000'
|
||||
#VUE_APP_REPORT_API = 'http://47.103.100.52:8055'
|
||||
|
||||
VUE_APP_BASE_API = 'http://8.133.200.233:8000'
|
||||
VUE_APP_WS_API = 'ws://8.133.200.233:8000'
|
||||
VUE_APP_REPORT_API = 'http://8.133.200.233:8055'
|
||||
VUE_APP_BASE_API = 'http://172.22.158.46:8000'
|
||||
VUE_APP_WS_API = 'ws://172.22.158.46:8000'
|
||||
VUE_APP_REPORT_API = 'http://172.22.158.46:8055'
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ module.exports = {
|
|||
// add your custom rules here
|
||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||
rules: {
|
||||
'vue/no-unused-components': 'off', // 关闭指定规则
|
||||
"vue/max-attributes-per-line": [2, {
|
||||
"singleline": 10,
|
||||
"multiline": {
|
||||
|
|
|
|||
|
|
@ -51,5 +51,11 @@ export function edit(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function mutilPutawaySys(data) {
|
||||
return request({
|
||||
url: 'api/asn/mutilPutawaySys',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del,mutilPutawaySys }
|
||||
|
|
|
|||
|
|
@ -53,19 +53,27 @@ export function edit(data) {
|
|||
})
|
||||
}
|
||||
|
||||
export function queryBomPrintList(data) {
|
||||
export function queryBomPrintListD(data) {
|
||||
return request({
|
||||
url: 'api/bomAccount/queryBomPrintList' + '?' + qs.stringify(data, { indices: false }),
|
||||
url: 'api/bomAccount/queryBomPrintListD' + '?' + qs.stringify(data, { indices: false }),
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function bomPrintBiaoQianList() {
|
||||
export function queryBomPrintListX(data) {
|
||||
return request({
|
||||
url: 'api/bomAccount/bomPrintBiaoQianList',
|
||||
url: 'api/bomAccount/queryBomPrintListX' + '?' + qs.stringify(data, { indices: false }),
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function bomPrintBiaoQianList(dxw) {
|
||||
return request({
|
||||
url: `api/bomAccount/bomPrintBiaoQianList/${dxw}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, queryBomAccountPoints, queryBomPrintList }
|
||||
export default { add, edit, del, queryBomAccountPoints, bomPrintBiaoQianList,queryBomPrintListD,queryBomPrintListX }
|
||||
|
|
|
|||
|
|
@ -188,4 +188,12 @@ export function queryDetails(id) {
|
|||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del ,pickingOperations,queryDetails,shipmentRegistration,xppPickGoods,xbjsVerify,pickWhole,pickBatch,pickSingle,pickForXpp}
|
||||
export function xdckPick(data) {
|
||||
return request({
|
||||
url: 'api/pickTicket/xdckPick',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del ,pickingOperations,queryDetails,shipmentRegistration,xppPickGoods,xbjsVerify,pickWhole,pickBatch,pickSingle,pickForXpp,xdckPick}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<el-input v-model="query.bigItemName" clearable placeholder="完成品名" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<el-input v-model="query.itemCode" clearable placeholder="部品品番" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<el-input v-model="query.itemName" clearable placeholder="部品品名" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<el-input v-model="query.ns" clearable placeholder="纳所" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<!--<el-select v-model="query.rAreaCode" clearable placeholder="工位" filterable style="width: 185px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery" clearable>
|
||||
<el-option
|
||||
|
|
@ -27,7 +28,7 @@
|
|||
:value="baseStatus.value"
|
||||
/>
|
||||
</el-select>-->
|
||||
<el-select v-model="query.rAreaCode" value-key="id" filterable placeholder="接收库区" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" clearable>
|
||||
<el-select v-model="query.rAreaCode" value-key="id" filterable placeholder="库区" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" clearable>
|
||||
<el-option
|
||||
v-for="item in rAreaList"
|
||||
:key="item.id"
|
||||
|
|
@ -100,11 +101,22 @@
|
|||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="saveBomPrint()"
|
||||
@click="saveBomPrintD()"
|
||||
v-permission="permission.showReport"
|
||||
icon="el-icon-document-add"
|
||||
>
|
||||
打印库位标签
|
||||
中大物标签
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="saveBomPrintX()"
|
||||
v-permission="permission.showReport"
|
||||
icon="el-icon-document-add"
|
||||
>
|
||||
小物标签
|
||||
</el-button>
|
||||
<el-link href="/jmreport/view/912967151437389824" >导出</el-link>
|
||||
</crudOperation>
|
||||
|
|
@ -214,6 +226,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="singles" label="单用" width="50"/>
|
||||
<el-table-column prop="zcfq" label="制材分区" />
|
||||
<el-table-column prop="zPoint.area.name" label="库区" />
|
||||
<el-table-column prop="zPoint.code" label="货位" />
|
||||
<el-table-column prop="xz" label="箱种"/>
|
||||
<el-table-column prop="srs" label="收容数"/>
|
||||
|
|
@ -265,7 +279,7 @@
|
|||
<script>
|
||||
import {exportExcel} from '@/components/TableToExcel/ExportExcel'
|
||||
import {initData} from '@/api/data'
|
||||
import crudBomAccount ,{queryBomPrintList}from '@/api/bomAccount'
|
||||
import crudBomAccount ,{queryBomPrintListD,queryBomPrintListX}from '@/api/bomAccount'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
|
|
@ -286,7 +300,7 @@ export default {
|
|||
name: 'BomAccount',
|
||||
components: {Link, DateRangePicker, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['process_content', 'out_type', 'station_type', 'bp_type','bonded_type','ac_type'],
|
||||
dicts: ['process_content', 'out_type', 'station_type', 'bp_type','bonded_type','ac_type','zdw_type'],
|
||||
cruds() {
|
||||
return CRUD({ title: 'BOM工位清单', url: 'api/bomAccount', idField: 'id', sort: 'id,desc', crudMethod: { ...crudBomAccount }})
|
||||
},
|
||||
|
|
@ -391,7 +405,7 @@ export default {
|
|||
})
|
||||
},
|
||||
getRAreaList() {
|
||||
queryAreaList({bexb:true,enabled:true}).then(res=>{
|
||||
queryAreaList({enabled:true}).then(res=>{
|
||||
this.rAreaList = res
|
||||
})
|
||||
// getAreas().then(res => {
|
||||
|
|
@ -428,14 +442,23 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
saveBomPrint() {
|
||||
console.log("打印")
|
||||
queryBomPrintList(this.crud.getQueryParams2()).then(res => {
|
||||
this.showEwmReport();
|
||||
saveBomPrintD() {
|
||||
console.log("打印中大物标签")
|
||||
queryBomPrintListD(this.crud.getQueryParams2()).then(res => {
|
||||
this.showEwmReportD();
|
||||
})
|
||||
},
|
||||
showEwmReport(){
|
||||
this.$router.push({path:'/base-data/base-ware/point_print',query:{tableID: '打印中大物标签'}})
|
||||
saveBomPrintX() {
|
||||
console.log("打印小物标签")
|
||||
queryBomPrintListX(this.crud.getQueryParams2()).then(res => {
|
||||
this.showEwmReportX();
|
||||
})
|
||||
},
|
||||
showEwmReportD(){
|
||||
this.$router.push({path:'/base-data/base-ware/point_print_d',query:{tableID: '打印中大物标签'}})
|
||||
},
|
||||
showEwmReportX(){
|
||||
this.$router.push({path:'/base-data/base-ware/point_print_x',query:{tableID: '打印小物标签'}})
|
||||
},
|
||||
showReport(){
|
||||
this.$router.push({path:'/DaoChu/ExcelDaoChu',query:{tableID: 'Bom工位清单导出'}})
|
||||
|
|
|
|||
|
|
@ -30,10 +30,6 @@
|
|||
:value="baseStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
<label class="el-form-item-label">组合编码</label>
|
||||
<el-input v-model="query.largeClass" clearable placeholder="请输入编码" style="width: 185px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation :crud="crud"/>
|
||||
</div>
|
||||
|
||||
|
|
@ -68,29 +64,6 @@
|
|||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" style="width: 180px;"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="类型" prop="goodType">
|
||||
<el-select v-model="form.goodType" filterable placeholder="请选择" style="width: 180px;"
|
||||
:default-first-option="true">
|
||||
<el-option
|
||||
v-for="item in dict.item_type"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-select v-model="form.unit" filterable placeholder="请选择" style="width: 180px;"
|
||||
:default-first-option="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.item_unit"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="specs">
|
||||
<el-input v-model="form.specs" style="width: 180px;"/>
|
||||
</el-form-item>
|
||||
|
|
@ -115,9 +88,6 @@
|
|||
<el-form-item label="收容数" prop="extendD3">
|
||||
<el-input v-model="form.extendD3" style="width: 180px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组合编码" prop="largeClass">
|
||||
<el-input v-model="form.largeClass" style="width: 180px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-input v-model="form.description" :rows="3" type="textarea" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
|
|
@ -139,14 +109,12 @@
|
|||
border
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<!-- <el-table-column label="序号" type="index" width="50"/>-->
|
||||
<el-table-column prop="id" label="序号" type="index" width="100"/>
|
||||
<el-table-column prop="code" label="品番" />
|
||||
<el-table-column prop="name" label="名称"/>
|
||||
<el-table-column prop="extendStr3" label="荷资" />
|
||||
<el-table-column prop="extendD3" label="收容数"/>
|
||||
<el-table-column prop="specs" label="规格"/>
|
||||
<el-table-column prop="largeClass" label="组合编码"/>
|
||||
<el-table-column prop="enabled" label="启用" width="50">
|
||||
<el-table-column prop="enabled" label="启用">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.enabled"
|
||||
|
|
@ -156,8 +124,6 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agvScene.name" label="AGV场景" v-if="false">
|
||||
</el-table-column>
|
||||
<el-table-column v-if="checkPer(['admin','item:edit'])" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<template>
|
||||
<div style="background: #ffffff">
|
||||
<div class="button-container">
|
||||
<el-button v-print="'#printMe'" type="primary">打印</el-button>
|
||||
<el-button @click="yulandayin" type="primary">打印预览</el-button>
|
||||
<el-button @click="yulandayin" type="primary">打印中大物标签预览</el-button>
|
||||
</div>
|
||||
<div id="printMe" v-for="(kw3,groupIndex) in kwfenzu" :key="groupIndex" class="group-container">
|
||||
<div
|
||||
|
|
@ -10,38 +9,37 @@
|
|||
class="label-item" >
|
||||
<table class="label-table">
|
||||
<tr>
|
||||
<td class="td-item" style="width:45mm" colspan="3">纳所/品番</td>
|
||||
<td class="td-item-value" colspan="9">{{ k2.ns }}</td>
|
||||
<td class="td-item" colspan="3">箱种</td>
|
||||
<td class="td-item-value" colspan="2">{{ k2.xz }}</td>
|
||||
<td class="td-item" style="width:25mm">纳所/品番</td>
|
||||
<td class="td-item-value" colspan="5" style="width:125mm">{{ k2.ns }}</td>
|
||||
<td class="td-item" style="width:15mm">箱种</td>
|
||||
<td class="td-item-value2" style="width:25mm">{{ k2.xz }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="td-item" colspan="3">品名</td>
|
||||
<td class="td-item-value" colspan="9">{{ k2.pm }}</td>
|
||||
<td class="td-item" colspan="3">收容数</td>
|
||||
<td class="td-item-value" colspan="2">{{ k2.srs }}</td>
|
||||
<td class="td-item">品名</td>
|
||||
<td class="td-item-value" colspan="5">{{ k2.pm }}</td>
|
||||
<td class="td-item">收容数</td>
|
||||
<td class="td-item-value" >{{ k2.srs }}</td>
|
||||
</tr>
|
||||
<tr style="height: 13mm">
|
||||
<td class="td-item" colspan="3">材库</td>
|
||||
<td class="td-item-value" colspan="4">{{ k2.hw }}</td>
|
||||
<td class="td-item" colspan="2">制库</td>
|
||||
<td class="td-item-value" colspan="4">{{ k2.hw }}</td>
|
||||
<td class="td-item" colspan="2">税别</td>
|
||||
<td class="td-item-value" colspan="2">{{ k2.bonded }}</td>
|
||||
<td class="td-item">货位</td>
|
||||
<td class="td-item-value" colspan="5">{{ k2.hw }}</td>
|
||||
<td class="td-item" >税别</td>
|
||||
<td class="td-item-value2">{{ k2.bonded }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="td-item" colspan="3">供应商</td>
|
||||
<td class="td-item-value" colspan="14">{{ k2.supplier }}</td>
|
||||
<td class="td-item">供应商</td>
|
||||
<td class="td-item-value2" colspan="7">{{ k2.supplier }}</td>
|
||||
|
||||
</tr>
|
||||
<tr style="height: 13mm">
|
||||
<td class="td-item" colspan="3">适用机型</td>
|
||||
<td class="td-item" style="width:45mm" colspan="2">{{ k2.jxs[0] }}</td>
|
||||
<td class="td-item" style="width:45mm" colspan="2">{{ k2.jxs[1] }}</td>
|
||||
<td class="td-item" style="width:45mm" colspan="2">{{ k2.jxs[2] }}</td>
|
||||
<td class="td-item" style="width:45mm" colspan="2">{{ k2.jxs[3] }}</td>
|
||||
<td class="td-item" style="width:45mm" colspan="2">{{ k2.jxs[4] }}</td>
|
||||
<td class="td-item" colspan="4" rowspan="2" style="width: 40mm;height: 20mm;">
|
||||
<td class="td-item">适用机型</td>
|
||||
|
||||
<td class="td-item-value3" style="width:45mm">{{ k2.jxs[0] }}</td>
|
||||
<td class="td-item-value3" style="width:45mm" >{{ k2.jxs[1] }}</td>
|
||||
<td class="td-item-value3" style="width:45mm" >{{ k2.jxs[2] }}</td>
|
||||
<td class="td-item-value3" style="width:45mm" >{{ k2.jxs[3] }}</td>
|
||||
<td class="td-item-value3" style="width:45mm" >{{ k2.jxs[4] }}</td>
|
||||
<td class="td-item" colspan="2" rowspan="2" style="width: 40mm;height: 20mm;">
|
||||
<vue-qrcode
|
||||
:value="getQrContent(k2)"
|
||||
:options="qrOptions"
|
||||
|
|
@ -51,12 +49,12 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr style="height: 13mm">
|
||||
<td class="td-item" colspan="3">使用数量</td>
|
||||
<td class="td-item" colspan="2">{{ k2.tyls[0] }}</td>
|
||||
<td class="td-item" colspan="2">{{ k2.tyls[1] }}</td>
|
||||
<td class="td-item" colspan="2">{{ k2.tyls[2] }}</td>
|
||||
<td class="td-item" colspan="2">{{ k2.tyls[3] }}</td>
|
||||
<td class="td-item" colspan="2">{{ k2.tyls[4] }}</td>
|
||||
<td class="td-item">使用数量</td>
|
||||
<td class="td-item-value" >{{ k2.tyls[0] }}</td>
|
||||
<td class="td-item-value" >{{ k2.tyls[1] }}</td>
|
||||
<td class="td-item-value" >{{ k2.tyls[2] }}</td>
|
||||
<td class="td-item-value" >{{ k2.tyls[3] }}</td>
|
||||
<td class="td-item-value" >{{ k2.tyls[4] }}</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -117,12 +115,14 @@ export default {
|
|||
new VuePrintNext({
|
||||
el: '#printMe', /* 其他参数 */
|
||||
popTitle: '打印拣货单',
|
||||
preview: true,// 启用打印预览
|
||||
paperSize: 'A4'
|
||||
preview: false,// 启用打印预览
|
||||
paperSize: 'A4',
|
||||
orientation: 'portrait'
|
||||
});
|
||||
},
|
||||
getPrintList(){
|
||||
bomPrintBiaoQianList().then(res => {
|
||||
console.log('打印标签')
|
||||
bomPrintBiaoQianList('_BiaoQian_D').then(res => {
|
||||
console.log(res)
|
||||
this.kkkk2=res;
|
||||
|
||||
|
|
@ -165,26 +165,48 @@ body {
|
|||
.label-item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
font-size: 12pt;
|
||||
background: #ffffff;
|
||||
justify-content: center;
|
||||
}
|
||||
.td-item{
|
||||
text-align: center;
|
||||
border: #000000 2px solid;
|
||||
word-wrap: break-word;
|
||||
font-size: 12pt;
|
||||
|
||||
}
|
||||
|
||||
.td-item-value{
|
||||
font-size: 12pt;
|
||||
font-size: 25pt;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border: #000000 2px solid;
|
||||
}
|
||||
.td-item-value2{
|
||||
font-size: 18pt;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border: #000000 2px solid;
|
||||
}
|
||||
|
||||
.td-item-value3{
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border: #000000 2px solid;
|
||||
font-size: 10pt;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; /*不允许换行
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;*/
|
||||
width: 10ch
|
||||
}
|
||||
|
||||
|
||||
.qr-code {
|
||||
padding: 1mm;
|
||||
width: 28mm; /* 控制显示大小 */
|
||||
height: 28mm;
|
||||
width: 22mm; /* 控制显示大小 */
|
||||
height: 22mm;
|
||||
image-rendering: crisp-edges; /* 保持清晰度 */
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
|
@ -199,6 +221,14 @@ body {
|
|||
background: #ffffff;
|
||||
border-collapse: collapse;
|
||||
font-size: 13px;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.shrink-content {
|
||||
/* 备选方案:使用scale变换 */
|
||||
transform-origin: left;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,221 @@
|
|||
<template>
|
||||
<div style="background: #ffffff">
|
||||
<div class="button-container">
|
||||
<el-button @click="yulandayin" type="primary">打印小物标签预览</el-button>
|
||||
</div>
|
||||
<div id="printMe" v-for="(kw3,groupIndex) in kwfenzu" :key="groupIndex" class="group-container">
|
||||
<div class="grid-container">
|
||||
<div
|
||||
v-for="k2 in kw3"
|
||||
class="label-item" >
|
||||
<table class="label-table">
|
||||
<tr style="height: 8mm">
|
||||
<td class="td-item-value2" colspan="2" style="width: 46mm">{{ k2.hw }}</td>
|
||||
<td class="td-item" rowspan="5" style="width: 23mm;height: 20mm;">
|
||||
<vue-qrcode
|
||||
:value="getQrContent(k2)"
|
||||
:options="qrOptions"
|
||||
tag="img"
|
||||
class="qr-code"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 6mm">
|
||||
<td class="td-item-value" colspan="2">{{ k2.code }}</td>
|
||||
</tr>
|
||||
<tr style="height: 6mm">
|
||||
<td class="td-item-value" colspan="2">{{ k2.pm }}</td>
|
||||
</tr>
|
||||
<tr style="height: 4mm">
|
||||
<td class="td-item" >{{ k2.jxs[0] }}</td>
|
||||
<td class="td-item" >{{ k2.jxs[1] }}</td>
|
||||
</tr>
|
||||
<tr style="height: 4mm">
|
||||
<td class="td-item-value3" >{{ k2.tyls[0] }}</td>
|
||||
<td class="td-item-value3" >{{ k2.tyls[1] }}</td>
|
||||
</tr>
|
||||
<tr style="height: 4mm">
|
||||
<td class="td-item" >{{ k2.jxs[2] }}</td>
|
||||
<td class="td-item" >{{ k2.jxs[3] }}</td>
|
||||
<td class="td-item" >{{ k2.jxs[4] }}</td>
|
||||
</tr>
|
||||
<tr style="height: 4mm">
|
||||
<td class="td-item-value3" >{{ k2.tyls[2] }}</td>
|
||||
<td class="td-item-value3" >{{ k2.tyls[3] }}</td>
|
||||
<td class="td-item-value3" >{{ k2.tyls[4] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { vPrint } from 'vue-print-next';
|
||||
import { VuePrintNext } from 'vue-print-next';
|
||||
import {bomPrintBiaoQianList} from "@/api/bomAccount";
|
||||
|
||||
import VueQrcode from '@chenfengyuan/vue-qrcode';
|
||||
|
||||
export default {
|
||||
name: 'PointPrint',
|
||||
components: {
|
||||
VueQrcode
|
||||
},
|
||||
directives: {
|
||||
print: vPrint
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
kkkk2: [],
|
||||
kwfenzuAll: [],
|
||||
kwfenzu: [],
|
||||
qrOptions: {
|
||||
width: 60, // 二维码宽度
|
||||
margin: 0, // 边距
|
||||
errorCorrectionLevel: 'H' // 容错级别(高)
|
||||
},
|
||||
qrSize: 120, // 二维码尺寸
|
||||
// 示例数据 - 实际应用中可从API获取
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPrintList();
|
||||
},
|
||||
methods: {
|
||||
getQrContent(location) {
|
||||
// 自定义二维码内容,这里用箱种和品番组合
|
||||
return `${location.ewm}`;
|
||||
|
||||
// 如果只需要箱种,可以直接用:
|
||||
// return location.boxType;
|
||||
},
|
||||
//获取点位表的数据
|
||||
yulandayin(){
|
||||
new VuePrintNext({
|
||||
el: '#printMe', /* 其他参数 */
|
||||
popTitle: '打印小物标签',
|
||||
preview: false,// 启用打印预览
|
||||
paperSize: 'A4',
|
||||
orientation: 'landscape'
|
||||
});
|
||||
},
|
||||
getPrintList(){
|
||||
console.log('打印小物标签')
|
||||
bomPrintBiaoQianList('_BiaoQian_X').then(res => {
|
||||
console.log(res)
|
||||
this.kkkk2=res;
|
||||
|
||||
this.kwfenzu=[]
|
||||
for (let i = 0; i < this.kkkk2.length; i += 20) {
|
||||
this.kwfenzu.push(this.kkkk2.slice(i, i + 20));
|
||||
}
|
||||
console.log(kwfenzu)
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Microsoft YaHei', sans-serif;
|
||||
}
|
||||
body {
|
||||
background: linear-gradient(35deg, #f5f7fa 0%, #e4edf5 100%);
|
||||
padding: 20px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.button-container {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
justify-content: center; /* 水平居中 */
|
||||
}
|
||||
.group-container{
|
||||
padding-top: 1mm;
|
||||
box-shadow: none;margin-bottom:0;padding: 0;border-radius: 0;
|
||||
page-break-after: always;
|
||||
break-after: page;
|
||||
}
|
||||
.label-item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
background: #ffffff;
|
||||
justify-content: center;
|
||||
}
|
||||
.td-item{
|
||||
text-align: center;
|
||||
border: #000000 2px solid;
|
||||
font-size: 6pt;
|
||||
font-weight: bold;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.td-item-value{
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border: #000000 2px solid;
|
||||
}
|
||||
|
||||
.td-item-value2{
|
||||
font-size: 15pt;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border: #000000 2px solid;
|
||||
}
|
||||
|
||||
.td-item-value3{
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border: #000000 2px solid;
|
||||
}
|
||||
|
||||
.qr-code {
|
||||
padding: 1mm;
|
||||
width: 22mm; /* 控制显示大小 */
|
||||
height: 22mm;
|
||||
image-rendering: crisp-edges; /* 保持清晰度 */
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.label-table {
|
||||
background: #00a0e9;
|
||||
|
||||
width: 69mm;
|
||||
height: 37mm;
|
||||
background: #ffffff;
|
||||
border-collapse: collapse;
|
||||
font-size: 13px;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr); /* 4列 */
|
||||
grid-template-rows: repeat(5, 1fr); /* 5行 */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
gap: 1mm 1mm; /* 标签之间的间隙 */
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -7,8 +7,6 @@
|
|||
<!-- <label class="el-form-item-label">单号</label>-->
|
||||
<el-input v-model="query.code" clearable placeholder="单号" style="width: 185px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
<!-- <label class="el-form-item-label">库区</label>-->
|
||||
<!-- <el-input v-model="query.areaId" clearable placeholder="库区" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />-->
|
||||
<el-select v-model="query.areaCode" clearable placeholder="库区" value-key="id" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery">
|
||||
<el-option
|
||||
|
|
@ -65,10 +63,10 @@
|
|||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="invVerifySTF"
|
||||
v-permission="permission.invVerify"
|
||||
@click="invVerifyS(crud.selections)">
|
||||
整单入库
|
||||
:disabled="mutilPutawayVisible"
|
||||
v-permission="permission.mutilPutaway"
|
||||
@click="showMutilPutawayBtn(crud.selections)">
|
||||
批量上架
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
|
|
@ -94,65 +92,6 @@
|
|||
<!-- 明细-->
|
||||
<!-- </el-button>-->
|
||||
</crudOperation>
|
||||
<!--自己定义新增表单组件-->
|
||||
<el-dialog :visible.sync="inserAsnOnOff" :title="(this.updateAsnOnOff ? '修改 ':'新增 ')+'收货管理'" width="900px"
|
||||
>
|
||||
<el-form ref="form" :model="asnFrom" :rules="rules" size="small" label-width="80px" style="height: 120px">
|
||||
<el-form-item label="单号" prop="code" style="float: left">
|
||||
<el-input :disabled="true" v-model="asnFrom.code" style="width: 180px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" style="float: left">
|
||||
<el-input :disabled="true" v-model="asnFrom.receivedQuantity" style="width: 180px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库区" prop="area" style="float: left">
|
||||
<!-- <el-input v-model="form.area" style="width: 370px;"/>-->
|
||||
<el-select v-model="asnFrom.area" clearable placeholder="请选择库区" value-key="id">
|
||||
<el-option
|
||||
style="width: 180px"
|
||||
v-for="item in areaOptions"
|
||||
:key="item.id"
|
||||
:label="item.code"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单日期" prop="orderDate" style="float: left">
|
||||
<!-- <el-input v-model="asnFrom.orderDate" style="width: 370px;"/>-->
|
||||
<el-date-picker
|
||||
style="width: 180px"
|
||||
v-model="asnFrom.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型" style="float: left">
|
||||
<!-- <el-input v-model="form.billType" style="width: 370px;"/>-->
|
||||
<el-select @change="billTypeSelect" v-model="asnFrom.billType" clearable placeholder="请选择单据类型"
|
||||
value-key="id"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in billTypeOptions"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" style="float: left">
|
||||
<el-input type="textarea" :rows="2" v-model="asnFrom.description" style="width: 400px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="inserAsnOnOff=false">取消</el-button>
|
||||
<el-button type="primary" @click="submitFrom(asnFrom)">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
||||
|
|
@ -162,34 +101,15 @@
|
|||
<el-form-item label="单号" prop="code">
|
||||
<el-input :disabled="true" v-model="form.code" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库区" prop="area">
|
||||
<!-- <el-input v-model="form.area" style="width: 370px;"/>-->
|
||||
<el-select v-model="form.area" clearable placeholder="请选择库区" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
:key="item.code"
|
||||
:label="item.code"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="托盘号" prop="code">
|
||||
<el-input v-model="form.cusCode" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号" prop="code">
|
||||
<el-input v-model="form.relatedBill1" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单日期" prop="orderDate">
|
||||
<el-input v-model="form.orderDate" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型">
|
||||
<!-- <el-input v-model="form.billType" style="width: 370px;"/>-->
|
||||
<el-select v-model="form.billType" clearable placeholder="请选择单据类型" value-key="id"
|
||||
style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in billTypeOptions"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.description" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
|
|
@ -199,18 +119,38 @@
|
|||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 批量上架 -->
|
||||
<el-dialog title="批量上架" :visible.sync="mutilPutawayVisible" width="500px">
|
||||
<el-form ref="plsjForm" :model="plsjForm" label-width="80px">
|
||||
<el-form-item label="库位" prop="pointId" :rules="[{ required: true, message: '库位不能为空'}]">
|
||||
<el-select v-model="plsjForm.pointId" value-key="id" placeholder="请选择库位" style="width: 250px">
|
||||
<el-option
|
||||
v-for="(item,index) in pointOptions"
|
||||
:key="item.id+''+item.code"
|
||||
:label="item.code"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="mutilPutawayVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="mutilPutawayBtn(crud.selections)">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 导入对话框 -->
|
||||
<el-dialog :visible.sync="importDialogVisible" title="导入" width="800px">
|
||||
<el-tabs v-model="activeImportTab" type="card">
|
||||
<el-tab-pane label="模板一:标准导入" name="template1">
|
||||
<div class="import-content">
|
||||
<div class="template-info">
|
||||
<!-- <div class="template-info">
|
||||
<h4>模板说明:</h4>
|
||||
<p>适用于<span style="color: red">标准</span>导入,包含INVOICE NO.、BOI、PO&LN NO.、PART
|
||||
NO.、DESCRIPTION、Q'TY(PCS) 、C/NO.</p>
|
||||
<el-button type="primary" size="small" @click="downloadTemplate('template1')">下载模板</el-button>
|
||||
</div>
|
||||
</div>-->
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
|
|
@ -232,11 +172,11 @@
|
|||
|
||||
<el-tab-pane label="模板二:大物导入" name="template2">
|
||||
<div class="import-content">
|
||||
<div class="template-info">
|
||||
<!-- <div class="template-info">
|
||||
<h4>模板说明:</h4>
|
||||
<p>适用于<span style="color: red">大物</span>导入,包含INVOICE NO.、BOI、PO&LN NO.、PART
|
||||
NO.、DESCRIPTION、Q'TY(PCS) 、C/NO.</p>
|
||||
</div>
|
||||
</div>-->
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
|
|
@ -259,11 +199,11 @@
|
|||
|
||||
<el-tab-pane label="模板三:空运发票箱单导入" name="template3">
|
||||
<div class="import-content">
|
||||
<div class="template-info">
|
||||
<!-- <div class="template-info">
|
||||
<h4>模板说明:</h4>
|
||||
<p>适用于<span style="color: red">空运发票箱单</span>导入,包含INV.NO.、A-PROS CASE NO、KMT NO. PO&LN NO.、PART NO.、
|
||||
DESCRIPTION、Q'TY 、C/NO.</p>
|
||||
</div>
|
||||
</div>-->
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
|
|
@ -296,40 +236,23 @@
|
|||
@select-all="invVerifySTFAll" border
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="code" label="单号" width="120px" align="center"/>
|
||||
<el-table-column prop="area" label="库区" width="140px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.area.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="billType" label="单据类型">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.billType.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="id" label="序号" width="80px" align="center"/>
|
||||
<el-table-column prop="code" label="单号" align="center"/>
|
||||
<el-table-column prop="cusCode" label="托盘号" align="center"/>
|
||||
<el-table-column prop="relatedBill1" label="发票号" align="center"/>
|
||||
<el-table-column prop="billType.name" label="单据类型"/>
|
||||
<el-table-column prop="status" label="状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.asn_status[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderDate" label="订单日期" width="140px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ formatDate1(scope.row.orderDate) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="receivedDate" label="收货日期" width="140px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ formatDate1(scope.row.receivedDate) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderDate" label="订单日期" width="140px" align="center"/>
|
||||
<el-table-column prop="receivedDate" label="收货日期" width="140px" align="center"/>
|
||||
<el-table-column prop="orderQuantity" label="订单数量" align="center"/>
|
||||
<el-table-column prop="receivedQuantity" label="收货数量" align="center"/>
|
||||
<el-table-column prop="area.name" label="库区" align="center"/>
|
||||
<el-table-column prop="createBy" label="创建人" align="center"/>
|
||||
<el-table-column prop="createTime" label="创建时间" width="140px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ formatDate1(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="140px" align="center"/>
|
||||
<el-table-column v-if="checkPer(['admin','asn:edit','asn:del'])" label="操作" width="175px" align="center"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -360,7 +283,7 @@
|
|||
|
||||
<script>
|
||||
import DateRangePicker from "@/components/DateRangePicker/index.vue";
|
||||
import crudAsn, {getCodeNo, queryAsnAll, save} from '@/api/asn'
|
||||
import crudAsn, {getCodeNo, queryAsnAll, save,mutilPutawaySys} from '@/api/asn'
|
||||
import importData from '@/api/importData'
|
||||
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
|
|
@ -374,6 +297,7 @@ import {queryPointList} from '@/api/point'
|
|||
import {queryItemAll} from '@/api/item'
|
||||
import {formatDate} from '@/utils/commonUtils'
|
||||
import UploadExcelComponent from '@/components/UploadExcel/index.vue'
|
||||
import {cancelReceiv} from "@/api/xppRecord";
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
|
|
@ -417,6 +341,7 @@ export default {
|
|||
reset: false,
|
||||
download: false
|
||||
},
|
||||
query: { billTypeCode: 'XDRK'},
|
||||
queryOnPresenterCreated: true
|
||||
})
|
||||
},
|
||||
|
|
@ -424,12 +349,12 @@ export default {
|
|||
return {
|
||||
permission: {
|
||||
add: ['admin', 'asn:add'],
|
||||
// add1: ['admin', 'asnDetail:add'],
|
||||
edit: ['admin', 'asn:edit'],
|
||||
del: ['admin', 'asn:del'],
|
||||
invVerify: ['admin', 'asn:invVerify'],
|
||||
inserAsn: ['admin', 'asn:inserAsn'],
|
||||
import: ['admin', 'asn:import'],
|
||||
mutilPutaway:['admin', 'asn:mutilPutaway']
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
|
|
@ -448,6 +373,7 @@ export default {
|
|||
{key: 'status', display_name: '状态查询'},
|
||||
],
|
||||
areaOptions: [],
|
||||
pointOptions: [],
|
||||
billTypeOptions: [],
|
||||
//新增数据的弹窗开关
|
||||
inserAsnOnOff: false,
|
||||
|
|
@ -514,9 +440,13 @@ export default {
|
|||
},
|
||||
asnDetailList: [],
|
||||
itemListData: [],
|
||||
pointList: [],
|
||||
asnOptions: [],
|
||||
invVerifySTF: true,
|
||||
mutilPutawayVisible:false,
|
||||
selectIds: {
|
||||
ids: []
|
||||
},
|
||||
plsjForm:{ids: [],pointId: null},
|
||||
// 导入相关数据
|
||||
importDialogVisible: false,
|
||||
activeImportTab: 'template1',
|
||||
|
|
@ -540,14 +470,6 @@ export default {
|
|||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
formatDate1(value) {
|
||||
return formatDate(value);
|
||||
// const date = new Date(value)
|
||||
// const year = date.getUTCFullYear()
|
||||
// const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
||||
// const day = date.getDate().toString().padStart(2, '0')
|
||||
// return `${year}-${month}-${day}`;
|
||||
},
|
||||
getAreaOptionsAll() {
|
||||
getAreas().then(res => {
|
||||
this.areaOptions = res
|
||||
|
|
@ -567,31 +489,6 @@ export default {
|
|||
//新增加的开关
|
||||
inserAsnOnOffM(data) {
|
||||
this.$router.push({path: '/business-asn/viewAsnDetail'})
|
||||
// this.inserAsnOnOff = true
|
||||
// let no = null
|
||||
// for (const billTypDateElement of this.billTypeOptions) {
|
||||
// if (billTypDateElement.code === data) {
|
||||
// this.asnFrom.billType = billTypDateElement
|
||||
// no = billTypDateElement.code
|
||||
// }
|
||||
// }
|
||||
// if (this.asnFrom.billType === null) {
|
||||
// this.$message.error('billType 没有加载 或没有ZC_CK数据')
|
||||
// return
|
||||
// }
|
||||
// getCodeNo(no).then(res => {
|
||||
// this.asnFrom.code = res
|
||||
// })
|
||||
// this.asnFrom.orderDate = this.getNewDate()
|
||||
},
|
||||
//获取当前时间
|
||||
getNewDate() {
|
||||
const date = new Date()
|
||||
const year = date.getUTCFullYear()
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
||||
const day = date.getDate().toString().padStart(2, '0')
|
||||
const formattedDate = `${year}-${month}-${day}`
|
||||
return formattedDate
|
||||
},
|
||||
submitFrom(data) {
|
||||
crudAsn.add(data).then(res => {
|
||||
|
|
@ -616,17 +513,7 @@ export default {
|
|||
})
|
||||
})
|
||||
},
|
||||
getPointData() {
|
||||
queryPointList().then(res => {
|
||||
this.pointList = res
|
||||
})
|
||||
},
|
||||
//queryAsnAll
|
||||
getAsnData() {
|
||||
queryAsnAll().then(res => {
|
||||
this.asnOptions = res
|
||||
})
|
||||
},
|
||||
|
||||
asnDetailRouter(datas) {
|
||||
this.$router.push({path: '/business-asn/viewAsnDetail', query: {ids: datas.id}})
|
||||
},
|
||||
|
|
@ -676,6 +563,29 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
//批量上架-弹出页面
|
||||
showMutilPutawayBtn(data) {
|
||||
this.mutilPutawayVisible = true
|
||||
this.queryPointList()
|
||||
},
|
||||
queryPointList() {
|
||||
queryPointList({"type":"CH"}).then(res => {
|
||||
this.pointOptions = res
|
||||
})
|
||||
},
|
||||
//批量上架
|
||||
mutilPutawayBtn(data) {
|
||||
let data_ = this.plsjForm;
|
||||
data_.ids = data.map(v => v.id);
|
||||
data_.pointId=this.plsjForm.pointId.id;
|
||||
mutilPutawaySys(data_).then(res=>{
|
||||
this.crud.toQuery()
|
||||
this.$message.success(res)
|
||||
this.mutilPutawayVisible = false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 导入相关方法
|
||||
showImportDialog() {
|
||||
this.importDialogVisible = true
|
||||
|
|
|
|||
|
|
@ -82,18 +82,7 @@
|
|||
@click="rkAndQxButtonM(1)"
|
||||
:loading="logining1"
|
||||
>
|
||||
整单入库
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="!(crud.selections.length === 1)"
|
||||
@click="dyrkM(crud.selections)"
|
||||
:loading="logining2"
|
||||
>
|
||||
单一入库
|
||||
整单上架
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
|
|
@ -104,9 +93,9 @@
|
|||
@click="qxshM(crud.selections)"
|
||||
:loading="logining3"
|
||||
>
|
||||
取消收货
|
||||
取消上架
|
||||
</el-button>
|
||||
<el-upload
|
||||
<!-- <el-upload
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
slot='right'
|
||||
|
|
@ -118,7 +107,7 @@
|
|||
:headers="headers"
|
||||
:show-file-list="true">
|
||||
<el-button size="mini" type="success" icon="el-icon-upload">导入</el-button>
|
||||
</el-upload>
|
||||
</el-upload>-->
|
||||
</crudOperation>
|
||||
<!-- 单一入库 -->
|
||||
<el-dialog title="单一入库" :visible.sync="dyrkTf" width="500px">
|
||||
|
|
@ -210,47 +199,15 @@
|
|||
@selection-change="crud.selectionChangeHandler" :height="crud.tableHeight"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="item.code " label="品番号" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.item == null ? '' : scope.row.item.code }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="item.name" label="品番" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.item == null ? '' : scope.row.item.name }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="item.unit" label="单位">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.item == null ? '' : scope.row.item.unit }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="orderQty" label="订单数量">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row == null ? '' : scope.row.orderQty }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="receivedQty" label="收货数量">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row == null ? '' : scope.row.receivedQty }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="point.code" label="库位">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.point == null ? '' : scope.row.point.code }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="propC1" label="批次号">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.propC1 }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="propD1" label="生产日期">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.propD1 }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="remark" label="备注">
|
||||
<el-table-column prop="item.code" label="品番"/>
|
||||
<el-table-column prop="item.name" label="品名"/>
|
||||
<el-table-column prop="po" label="po"/>
|
||||
<el-table-column prop="orderQty" label="订单数量"/>
|
||||
<el-table-column prop="receivedQty" label="收货数量"/>
|
||||
<el-table-column prop="point.code" label="库位"/>
|
||||
<el-table-column prop="propC1" label="批次号"/>
|
||||
<el-table-column prop="propC2" label="税别"/>
|
||||
<el-table-column prop="remark" label="备注">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.remark }}</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,688 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<!-- 卡片头 -->
|
||||
<div style="width: 100%;height: 180px;position: relative;">
|
||||
<el-form ref="asnFromRes" :model="asnFrom" :rules="rules" size="small" label-width="80px">
|
||||
<div style="width: 60%;height: 180px;float: left">
|
||||
<el-form-item label="库区" prop="area">
|
||||
<el-select v-model="asnFrom.area" prop="area" value-key="id" style="width: 100%"
|
||||
placeholder="请选择出库库区" clearable
|
||||
>
|
||||
<el-option v-for="item in areaOptions" :key="item.id" :label="item.code" :value="item"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div style="width: 100%;position: relative;height: 45px;">
|
||||
<div style="width: 50%;float: left">
|
||||
<el-form-item label="单据类型" prop="billType">
|
||||
<el-select v-model="asnFrom.billType" value-key="id" style="width:100%"
|
||||
placeholder="请选择单据类型" clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in billTypeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="width: 50%;float: right">
|
||||
<el-form-item label="订单日期" prop="orderDate">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="asnFrom.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;position: relative;height: 45px;">
|
||||
<div style="width: 50%;float: left">
|
||||
<el-form-item label="单号" prop="code">
|
||||
<el-input :disabled="true" v-model="asnFrom.code" style="width: 100%"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="width: 50%;float: right">
|
||||
<el-form-item label="订单数量">
|
||||
<el-input :disabled="true" v-model="asnFrom.orderQuantity" style="width: 100%;"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;position: relative;">
|
||||
<div style="width: 50%;float: left">
|
||||
<el-button type="primary" :disabled="asnFrom.code != null" @click="submitFromAsn(asnFrom)">提交
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width: 40%;height: 180px;float: right">
|
||||
<el-form-item label="备注:">
|
||||
|
||||
</el-form-item>
|
||||
<el-input v-model="asnFrom.description" type="textarea" :autosize="{ minRows: 5, maxRows: 8}"
|
||||
placeholder="请输入备注" style="width: 90%;height: 100%;float: right"
|
||||
/>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="rkAndQxButtonM(1)"
|
||||
:loading="logining1"
|
||||
>
|
||||
整单入库
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="!(crud.selections.length === 1)"
|
||||
@click="dyrkM(crud.selections)"
|
||||
:loading="logining2"
|
||||
>
|
||||
单一入库
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="qxshM(crud.selections)"
|
||||
:loading="logining3"
|
||||
>
|
||||
取消收货
|
||||
</el-button>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
slot='right'
|
||||
style="float: right;padding-left: 5px"
|
||||
:action="baseApi+'/api/importData/importAsnDetail?asnId='+this.asnId"
|
||||
:file-list="fileList"
|
||||
:on-success=handleSuccess
|
||||
:on-error="handleError"
|
||||
:headers="headers"
|
||||
:show-file-list="true">
|
||||
<el-button size="mini" type="success" icon="el-icon-upload">导入</el-button>
|
||||
</el-upload>
|
||||
</crudOperation>
|
||||
<!-- 单一入库 -->
|
||||
<el-dialog title="单一入库" :visible.sync="dyrkTf" width="500px">
|
||||
<!-- <el-dialog-->
|
||||
<!-- width="30%"-->
|
||||
<!-- title="内层 Dialog"-->
|
||||
<!-- :visible.sync="innerVisible"-->
|
||||
<!-- append-to-body>-->
|
||||
<!-- </el-dialog>-->
|
||||
<el-form ref="formdyrk" :model="asnDetailButton" label-width="80px">
|
||||
<el-form-item label="数量" prop="oneRNumber" :rules="[
|
||||
{ required: true, message: '数量不能为空'},
|
||||
{ type: 'number', message: '数量必须为数字值'}
|
||||
]"
|
||||
>
|
||||
<el-input v-model.number="asnDetailButton.oneRNumber" placeholder="请输入数量" style="width: 250px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库位" prop="oneRPoint" :rules="[
|
||||
{ required: true, message: '库位不能为空'}
|
||||
]"
|
||||
>
|
||||
<el-select v-model="asnDetailButton.oneRPoint" value-key="id" placeholder="请选择库位" style="width: 250px">
|
||||
<el-option
|
||||
v-for="(item,index) in pointOptions"
|
||||
:key="item.id+''+item.code"
|
||||
:label="item.code"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dyrkTf = false">取 消</el-button>
|
||||
<el-button type="primary" @click="rkAndQxButtonM(2)">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title" width="400px"
|
||||
>
|
||||
<el-form ref="form" :rules="asnDetailRules" :model="form" size="small" label-width="80px"
|
||||
style="height: 200px"
|
||||
>
|
||||
<el-form-item label="物料" prop="item" style="float: left">
|
||||
<el-select v-model="form.item" value-key="id" filterable placeholder="请选择品番" style="width: 200px;"
|
||||
@change="getPointList($event.code,asn)"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in itemOptions"
|
||||
:key="item.id"
|
||||
:label="item.code"
|
||||
:value="item"
|
||||
>
|
||||
<span style="float: left">{{ item.code }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单数量" prop="orderQty" style="float: left">
|
||||
<el-input v-model="form.orderQty" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="pointTF" label="库位" prop="point" style="float: left">
|
||||
<el-select v-model="form.point" value-key="id" filterable placeholder="请选择库位" clearable
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointOptions"
|
||||
:key="item.id"
|
||||
:label="item.code"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark" style="float: left">
|
||||
<el-input type="textarea" :rows="2" v-model="form.remark" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler" :height="crud.tableHeight"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="item.code " label="品番号" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.item == null ? '' : scope.row.item.code }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="item.name" label="品番" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.item == null ? '' : scope.row.item.name }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="item.unit" label="单位">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.item == null ? '' : scope.row.item.unit }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="orderQty" label="订单数量">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row == null ? '' : scope.row.orderQty }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="receivedQty" label="收货数量">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row == null ? '' : scope.row.receivedQty }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="point.code" label="库位">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.point == null ? '' : scope.row.point.code }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="propC1" label="批次号">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.propC1 }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="propD1" label="生产日期">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.propD1 }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="remark" label="备注">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.remark }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="checkPer(['admin','asnDetail:edit','asnDetail:del'])" label="操作" width="150px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudAsnDetail, { rkAndQxButton } from '@/api/asnDetail'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
import udOperation from '@crud/UD.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
import { queryItemAll } from '@/api/item'
|
||||
import Search from '@/views/monitor/log/search.vue'
|
||||
import AsnTask from '@/views/business-asn/asnDetail/viewAsnTask.vue'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { queryPointList } from '@/api/point'
|
||||
import { getIdByAsn } from '@/api/asn'
|
||||
import { getAreas } from '@/api/area'
|
||||
import { getBillType } from '@/api/billType'
|
||||
import crudAsn from '@/api/asn'
|
||||
import { queryBomAccountList } from '@/api/bomAccount'
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
asn: null,
|
||||
item: null,
|
||||
stock: null,
|
||||
lineNo: null,
|
||||
po: null,
|
||||
status: 'OPEN',
|
||||
point: null,
|
||||
orderQty: 0,
|
||||
receivedQty: 0,
|
||||
moveQty: 0,
|
||||
putQty: 0,
|
||||
weight: 0,
|
||||
volume: 0,
|
||||
remark: null,
|
||||
propC1: null,
|
||||
propC2: null,
|
||||
propC3: null,
|
||||
propC4: null,
|
||||
propC5: null,
|
||||
propC6: null,
|
||||
propD1: null,
|
||||
propD2: null,
|
||||
deptId: null,
|
||||
sourceName: null,
|
||||
sourceId: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
createTime: null,
|
||||
updateTime: null
|
||||
}
|
||||
const asnQuery = {
|
||||
asnId: 0
|
||||
}
|
||||
export default {
|
||||
name: 'viewXbDetail',
|
||||
components: { DateRangePicker, AsnTask, Search, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['asn_status'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '收货数据',
|
||||
url: 'api/asnDetail',
|
||||
idField: 'id',
|
||||
query: { asnId: 0 },
|
||||
sort: 'id,desc',
|
||||
crudMethod: { ...crudAsnDetail },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: true,
|
||||
reset: false,
|
||||
download: false
|
||||
}
|
||||
})
|
||||
},
|
||||
created() {
|
||||
//判断是否有数据
|
||||
this.crud.query = asnQuery
|
||||
let ids = this.$route.query.ids
|
||||
if (ids != null) {
|
||||
this.crud.query.asnId = ids
|
||||
this.asnId = ids
|
||||
} else {
|
||||
this.crud.query.asnId = 0
|
||||
this.asnId = 0
|
||||
}
|
||||
this.crud.refresh()
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'baseApi'
|
||||
])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
headers: { 'Authorization': getToken() },
|
||||
permission: {
|
||||
add: ['admin', 'asnDetail:add'],
|
||||
edit: ['admin', 'asnDetail:edit'],
|
||||
del: ['admin', 'asnDetail:del']
|
||||
},
|
||||
rules: {
|
||||
area: [
|
||||
{ required: true, message: '出库库区不能为空', trigger: 'blur' }
|
||||
],
|
||||
orderDate: [{
|
||||
required: true, message: '订单日期不能为空', trigger: 'blur'
|
||||
}],
|
||||
billType: [{
|
||||
required: true, message: '单据类型不能为空', trigger: 'blur'
|
||||
}]
|
||||
},
|
||||
asnDetailRules: {
|
||||
item: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
],
|
||||
orderQty: [
|
||||
{ required: true, message: '订单数量不能为空', trigger: 'blur' }
|
||||
]
|
||||
// point: [
|
||||
// { required: true, message: '库位不能为空', trigger: 'blur' }
|
||||
// ]
|
||||
},
|
||||
//下拉物料
|
||||
itemOptions: [],
|
||||
//下拉点位
|
||||
pointOptions: [],
|
||||
pointOption2: [],
|
||||
//下拉库区
|
||||
areaOptions: [],
|
||||
//下拉类型
|
||||
billTypeOptions: [],
|
||||
// 新增主表
|
||||
asnFrom: {
|
||||
id: null,
|
||||
code: null,
|
||||
area: null,
|
||||
status: 'OPEN',
|
||||
cusCode: null,
|
||||
relatedBill1: null,
|
||||
relatedBill2: null,
|
||||
relatedBill3: null,
|
||||
orderDate: null,
|
||||
estimateDate: null,
|
||||
receivedDate: null,
|
||||
fromName: null,
|
||||
fromAddress: null,
|
||||
fromMan: null,
|
||||
fromTel: null,
|
||||
orderQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
putawayQuantity: 0,
|
||||
vehicle: null,
|
||||
billType: null,
|
||||
dept: null,
|
||||
description: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
createTime: null,
|
||||
updateTime: null
|
||||
},
|
||||
//主id
|
||||
asnId: 0,
|
||||
asn: {},
|
||||
asnDetailButton: {
|
||||
button: 0,
|
||||
id: 0,
|
||||
oneRNumber: 0,
|
||||
oneRPoint: {},
|
||||
asnDetailData: {},
|
||||
asnDetailDataS: []
|
||||
},
|
||||
dyrkTf: false,
|
||||
logining1: false,
|
||||
logining2: false,
|
||||
logining3: false,
|
||||
pointTF:true,
|
||||
}
|
||||
},
|
||||
// beforeDestroy() { //页面关闭时清除定时器
|
||||
// clearInterval(this.clearTimeSet);
|
||||
// },
|
||||
mounted() {
|
||||
//查询公用的下拉数据
|
||||
this.getOnceOptionAll()
|
||||
//判断是否是新增主表和是查看明细新政附表
|
||||
// setTimeout(() => {
|
||||
// // 方法区
|
||||
// this.asnTF()
|
||||
// this.crud.toQuery()
|
||||
// }, 100);
|
||||
// this.asnTF()
|
||||
//定时查询 1000 为1s
|
||||
// this.setTime();
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.asnTF()
|
||||
return true
|
||||
},
|
||||
setTime() { //设置定时器
|
||||
// this.clearTimeSet=setInterval(() => {
|
||||
// this.asnTF();
|
||||
// }, 1000*20);
|
||||
},
|
||||
//获取当前时间
|
||||
getNewDate() {
|
||||
const date = new Date()
|
||||
const year = date.getUTCFullYear()
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
||||
const day = date.getDate().toString().padStart(2, '0')
|
||||
//存当前时间
|
||||
this.asnFrom.orderDate = `${year}-${month}-${day}`
|
||||
},
|
||||
//查询库位
|
||||
getPointList(code, data) {
|
||||
if (data.area.bexb) {
|
||||
this.pointTF=true;
|
||||
let selectDate = { rAreaCode: null, itemCode: null }
|
||||
selectDate.rAreaCode = data.area.code
|
||||
selectDate.itemCode = code
|
||||
// if (selectDate.rAreaCode === null) {
|
||||
// if (selectDate.rAreaCode === null) {
|
||||
// this.$message.error('主表未绑定库区')
|
||||
// return
|
||||
// }
|
||||
queryBomAccountList(selectDate).then(res => {
|
||||
this.pointOptions = []
|
||||
if (res != null) {
|
||||
console.log(res)
|
||||
let data_ = []
|
||||
for (const re of res) {
|
||||
data_.push(re.zPoint)
|
||||
}
|
||||
this.pointOptions = this.filterListObj(data_)
|
||||
}
|
||||
if (!(this.pointOptions.length > 0)) {
|
||||
queryPointList({ code: 'ZZKW' }).then(re => {
|
||||
this.pointOptions = re
|
||||
})
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.pointTF=false;
|
||||
}
|
||||
},
|
||||
//过滤重复数据
|
||||
filterListObj(listObj) {
|
||||
let date = []
|
||||
let onOff = true
|
||||
listObj.filter((i) => {
|
||||
onOff = true
|
||||
date.filter((ii) => {
|
||||
if (i.id === ii.id) {
|
||||
onOff = false
|
||||
}
|
||||
})
|
||||
if (onOff) {
|
||||
date.push(i)
|
||||
}
|
||||
})
|
||||
return date
|
||||
},
|
||||
//查询公用的下拉数据
|
||||
getOnceOptionAll() {
|
||||
//物料数据
|
||||
queryItemAll({}).then(res => {
|
||||
this.itemOptions = res
|
||||
}).catch(e => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '物料加载失败',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
//获取库区数据
|
||||
getAreas().then(res => {
|
||||
this.areaOptions = res
|
||||
})
|
||||
//单据类型
|
||||
getBillType().then(res => {
|
||||
this.billTypeOptions = res
|
||||
for (const re of res) {
|
||||
if (re.code === 'RK') {
|
||||
this.asnFrom.billType = re
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//判断是否是新增主表和是查看明细新政附表
|
||||
asnTF() {
|
||||
if (this.asnId != 0) {
|
||||
getIdByAsn(this.asnId).then(res => {
|
||||
//存储主表的对象
|
||||
this.asn = res
|
||||
defaultForm.asn = res
|
||||
//将主表数据在新增哪里展示
|
||||
this.asnFrom = res
|
||||
asnQuery.asnId = res.id
|
||||
//查询点位数据
|
||||
this.pointTF = res.area.bexb
|
||||
// if (res.area.besh){
|
||||
// this.getPointList(res)
|
||||
// }
|
||||
})
|
||||
} else {
|
||||
this.getNewDate()
|
||||
}
|
||||
},
|
||||
//新增主表数据
|
||||
submitFromAsn(data) {
|
||||
//校验
|
||||
this.$refs['asnFromRes'].validate((valid) => {
|
||||
if (valid) {
|
||||
crudAsn.add(data).then(res => {
|
||||
//存主表id
|
||||
this.asnId = res.id
|
||||
//加载数据
|
||||
this.asnTF()
|
||||
this.$message.success('添加成功')
|
||||
// this.crud.toQuery()
|
||||
this.$router.push({ path: '/business-asn/viewAsnDetail', query: { ids: res.id } })
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
rkAndQxButtonM(num) {
|
||||
if (num === 1) { //整单入库
|
||||
this.logining1 = true
|
||||
let data = this.asnDetailButton
|
||||
data.button = num
|
||||
data.id = this.asn.id
|
||||
rkAndQxButton(data).then(res => {
|
||||
this.$message.success(res)
|
||||
this.logining1 = false
|
||||
this.crud.toQuery()
|
||||
}).catch(e => {
|
||||
this.logining1 = false
|
||||
})
|
||||
} else if (num === 2) {
|
||||
this.$refs['formdyrk'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.logining2 = true
|
||||
let data = this.asnDetailButton
|
||||
data.button = num
|
||||
data.id = this.asn.id
|
||||
rkAndQxButton(data).then(res => {
|
||||
this.$message.success(res)
|
||||
this.dyrkTf = false
|
||||
this.logining2 = false
|
||||
this.crud.toQuery()
|
||||
}).catch(e => {
|
||||
this.logining2 = false
|
||||
})
|
||||
} else {
|
||||
// console.log('error submit!!');
|
||||
return false
|
||||
}
|
||||
})
|
||||
} else if (num === 3) {
|
||||
this.logining3 = true
|
||||
let data = this.asnDetailButton
|
||||
data.button = num
|
||||
data.id = this.asn.id
|
||||
rkAndQxButton(data).then(res => {
|
||||
this.$message.success(res)
|
||||
this.logining3 = false
|
||||
this.crud.toQuery()
|
||||
}).catch(e => {
|
||||
this.logining3 = false
|
||||
})
|
||||
}
|
||||
},
|
||||
//单一入库
|
||||
dyrkM(data) {
|
||||
this.dyrkTf = !this.dyrkTf
|
||||
console.log(data[0].item.code)
|
||||
this.getPointList(data[0].item.code, this.asn)
|
||||
this.asnDetailButton.asnDetailData = data[0]
|
||||
},
|
||||
//取消收货
|
||||
qxshM(data) {
|
||||
this.asnDetailButton.asnDetailDataS = data
|
||||
this.rkAndQxButtonM(3)
|
||||
},
|
||||
handleSuccess(response, file, fileList) {
|
||||
this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.$refs.upload.clearFiles()
|
||||
this.crud.status.add = CRUD.STATUS.NORMAL
|
||||
this.crud.resetForm()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 监听上传失败
|
||||
handleError(e, file, fileList) {
|
||||
const msg = JSON.parse(e.message)
|
||||
this.$notify({
|
||||
title: msg.message,
|
||||
type: 'error',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,817 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<!-- 搜索 -->
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<!-- <label class="el-form-item-label">单号</label>-->
|
||||
<el-input v-model="query.code" clearable placeholder="单号" style="width: 185px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
<el-select v-model="query.areaCode" clearable placeholder="库区" value-key="id" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery">
|
||||
<el-option
|
||||
style="width: 180px"
|
||||
v-for="item in areaOptions"
|
||||
:key="item.id"
|
||||
:label="item.code"
|
||||
:value="item.code"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<!-- <el-input v-model="query.orderDate" clearable placeholder="订单日期" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />-->
|
||||
<!-- <label class="el-form-item-label">状态</label>-->
|
||||
<el-select v-model="query.status" clearable placeholder="状态" value-key="id" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery">
|
||||
<el-option
|
||||
style="width: 180px"
|
||||
v-for="item in this.dict.asn_status"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<rrOperation :crud="crud"/>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<!-- <el-button-->
|
||||
<!-- slot="right"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="inserAsnOnOffM()"-->
|
||||
<!-- >-->
|
||||
<!-- 新增-->
|
||||
<!-- </el-button>-->
|
||||
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-permission="permission.inserAsn"
|
||||
@click="inserAsnOnOffM()"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="invVerifySTF"
|
||||
v-permission="permission.invVerify"
|
||||
@click="invVerifyS(crud.selections)">
|
||||
整单入库
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
v-permission="permission.import"
|
||||
@click="showImportDialog">
|
||||
导入
|
||||
</el-button>
|
||||
|
||||
<!-- <el-button-->
|
||||
<!-- slot="right"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="crud.selections.length!=1"-->
|
||||
<!-- @click="asnDetailRouter(crud.selections)"-->
|
||||
<!-- >-->
|
||||
<!-- 明细-->
|
||||
<!-- </el-button>-->
|
||||
</crudOperation>
|
||||
<!--自己定义新增表单组件-->
|
||||
<el-dialog :visible.sync="inserAsnOnOff" :title="(this.updateAsnOnOff ? '修改 ':'新增 ')+'收货管理'" width="900px"
|
||||
>
|
||||
<el-form ref="form" :model="asnFrom" :rules="rules" size="small" label-width="80px" style="height: 120px">
|
||||
<el-form-item label="单号" prop="code" style="float: left">
|
||||
<el-input :disabled="true" v-model="asnFrom.code" style="width: 180px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" style="float: left">
|
||||
<el-input :disabled="true" v-model="asnFrom.receivedQuantity" style="width: 180px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库区" prop="area" style="float: left">
|
||||
<!-- <el-input v-model="form.area" style="width: 370px;"/>-->
|
||||
<el-select v-model="asnFrom.area" clearable placeholder="请选择库区" value-key="id">
|
||||
<el-option
|
||||
style="width: 180px"
|
||||
v-for="item in areaOptions"
|
||||
:key="item.id"
|
||||
:label="item.code"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单日期" prop="orderDate" style="float: left">
|
||||
<!-- <el-input v-model="asnFrom.orderDate" style="width: 370px;"/>-->
|
||||
<el-date-picker
|
||||
style="width: 180px"
|
||||
v-model="asnFrom.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型" style="float: left">
|
||||
<!-- <el-input v-model="form.billType" style="width: 370px;"/>-->
|
||||
<el-select @change="billTypeSelect" v-model="asnFrom.billType" clearable placeholder="请选择单据类型"
|
||||
value-key="id"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in billTypeOptions"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" style="float: left">
|
||||
<el-input type="textarea" :rows="2" v-model="asnFrom.description" style="width: 400px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="inserAsnOnOff=false">取消</el-button>
|
||||
<el-button type="primary" @click="submitFrom(asnFrom)">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title" width="400px" :height="crud.tableHeight" border
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||
<el-form-item label="单号" prop="code">
|
||||
<el-input :disabled="true" v-model="form.code" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库区" prop="area">
|
||||
<!-- <el-input v-model="form.area" style="width: 370px;"/>-->
|
||||
<el-select v-model="form.area" clearable placeholder="请选择库区" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
:key="item.code"
|
||||
:label="item.code"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单日期" prop="orderDate">
|
||||
<el-input v-model="form.orderDate" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型">
|
||||
<!-- <el-input v-model="form.billType" style="width: 370px;"/>-->
|
||||
<el-select v-model="form.billType" clearable placeholder="请选择单据类型" value-key="id"
|
||||
style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in billTypeOptions"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.description" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 导入对话框 -->
|
||||
<el-dialog :visible.sync="importDialogVisible" title="导入" width="800px">
|
||||
<el-tabs v-model="activeImportTab" type="card">
|
||||
<el-tab-pane label="模板一:标准导入" name="template1">
|
||||
<div class="import-content">
|
||||
<div class="template-info">
|
||||
<h4>模板说明:</h4>
|
||||
<p>适用于<span style="color: red">标准</span>导入,包含INVOICE NO.、BOI、PO&LN NO.、PART
|
||||
NO.、DESCRIPTION、Q'TY(PCS) 、C/NO.</p>
|
||||
<el-button type="primary" size="small" @click="downloadTemplate('template1')">下载模板</el-button>
|
||||
</div>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
accept=".xlsx,.xls,.csv"
|
||||
action="#"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList1"
|
||||
:on-change="handleExcelChange"
|
||||
:on-remove="handleExcelRemove"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip" slot="tip" style="color: red">注意:更新文件后请重新上传(支持.xlsx, .xls,
|
||||
.csv 格式文件)
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="模板二:大物导入" name="template2">
|
||||
<div class="import-content">
|
||||
<div class="template-info">
|
||||
<h4>模板说明:</h4>
|
||||
<p>适用于<span style="color: red">大物</span>导入,包含INVOICE NO.、BOI、PO&LN NO.、PART
|
||||
NO.、DESCRIPTION、Q'TY(PCS) 、C/NO.</p>
|
||||
</div>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
accept=".xlsx,.xls,.csv"
|
||||
action="#"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList2"
|
||||
:before-upload="beforeExcelUpload"
|
||||
:on-change="handleExcelChange"
|
||||
:on-remove="handleExcelRemove"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip" slot="tip" style="color: red">注意:更新文件后请重新上传(支持.xlsx, .xls,
|
||||
.csv 格式文件)
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="模板三:空运发票箱单导入" name="template3">
|
||||
<div class="import-content">
|
||||
<div class="template-info">
|
||||
<h4>模板说明:</h4>
|
||||
<p>适用于<span style="color: red">空运发票箱单</span>导入,包含INV.NO.、A-PROS CASE NO、KMT NO. PO&LN NO.、PART NO.、
|
||||
DESCRIPTION、Q'TY 、C/NO.</p>
|
||||
</div>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
accept=".xlsx,.xls,.csv"
|
||||
action="#"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList3"
|
||||
:before-upload="beforeExcelUpload"
|
||||
:on-change="handleExcelChange"
|
||||
:on-remove="handleExcelRemove"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip" slot="tip" style="color: red">注意:更新文件后请重新上传(支持.xlsx, .xls,
|
||||
.csv 格式文件)
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancelImport">取消</el-button>
|
||||
<el-button type="primary" @click="confirmImport" :loading="importLoading">确认导入</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler" :height="crud.tableHeight" @select="invVerifySTFM"
|
||||
@select-all="invVerifySTFAll" border
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="code" label="单号" width="120px" align="center"/>
|
||||
<el-table-column prop="billType.name" label="单据类型"/>
|
||||
<el-table-column prop="area.name" label="库区" width="140px" align="center"/>
|
||||
<el-table-column prop="status" label="状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.asn_status[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderDate" label="订单日期" width="140px" align="center"/>
|
||||
<el-table-column prop="receivedDate" label="收货日期" width="140px" align="center"/>
|
||||
<el-table-column prop="orderQuantity" label="订单数量" align="center"/>
|
||||
<el-table-column prop="receivedQuantity" label="收货数量" align="center"/>
|
||||
<el-table-column prop="createBy" label="创建人" align="center"/>
|
||||
<el-table-column prop="createTime" label="创建时间" width="140px" align="center"/>
|
||||
<el-table-column v-if="checkPer(['admin','asn:edit','asn:del'])" label="操作" width="175px" align="center"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
style="float: right"
|
||||
@click="asnDetailRouter(scope.row)"
|
||||
>
|
||||
明细
|
||||
</el-button>
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
>
|
||||
</udOperation>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<div style="float: right;">
|
||||
<pagination/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DateRangePicker from "@/components/DateRangePicker/index.vue";
|
||||
import crudAsn, {getCodeNo, queryAsnAll, save} from '@/api/asn'
|
||||
import importData from '@/api/importData'
|
||||
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
import udOperation from '@crud/UD.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
import {getAreas} from '@/api/area'
|
||||
import {getBillType} from '@/api/billType'
|
||||
import {add, invVerify, queryAsnDetailAll} from '@/api/asnDetail'
|
||||
import {queryPointList} from '@/api/point'
|
||||
import {queryItemAll} from '@/api/item'
|
||||
import {formatDate} from '@/utils/commonUtils'
|
||||
import UploadExcelComponent from '@/components/UploadExcel/index.vue'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
code: null,
|
||||
area: null,
|
||||
status: 'OPEN',
|
||||
cusCode: null,
|
||||
relatedBill1: null,
|
||||
relatedBill2: null,
|
||||
relatedBill3: null,
|
||||
orderDate: null,
|
||||
estimateDate: null,
|
||||
receivedDate: null,
|
||||
fromName: null,
|
||||
fromAddress: null,
|
||||
fromMan: null,
|
||||
fromTel: null,
|
||||
orderQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
putawayQuantity: 0,
|
||||
vehicle: null,
|
||||
billType: null,
|
||||
dept: null,
|
||||
description: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
createTime: null,
|
||||
updateTime: null
|
||||
}
|
||||
export default {
|
||||
name: 'Xbrk',
|
||||
components: {pagination, crudOperation, rrOperation, udOperation, DateRangePicker, UploadExcelComponent},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['asn_status'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: 'asn', url: 'api/asn', idField: 'id', sort: 'id,desc', crudMethod: {...crudAsn}, optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: true,
|
||||
reset: false,
|
||||
download: false
|
||||
},
|
||||
query: { billTypeCode: 'XBRK'},
|
||||
queryOnPresenterCreated: true
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
add: ['admin', 'asn:add'],
|
||||
// add1: ['admin', 'asnDetail:add'],
|
||||
edit: ['admin', 'asn:edit'],
|
||||
del: ['admin', 'asn:del'],
|
||||
invVerify: ['admin', 'asn:invVerify'],
|
||||
inserAsn: ['admin', 'asn:inserAsn'],
|
||||
import: ['admin', 'asn:import'],
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{required: true, message: '单号不能为空', trigger: 'blur'}
|
||||
],
|
||||
area: [
|
||||
{required: true, message: '库区不能为空', trigger: 'blur'}
|
||||
],
|
||||
orderDate: [
|
||||
{required: true, message: '订单日期不能为空', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
queryTypeOptions: [
|
||||
{key: 'code', display_name: '单号'},
|
||||
{key: 'areaCode', display_name: '库区'},
|
||||
{key: 'status', display_name: '状态查询'},
|
||||
],
|
||||
areaOptions: [],
|
||||
billTypeOptions: [],
|
||||
//新增数据的弹窗开关
|
||||
inserAsnOnOff: false,
|
||||
updateAsnOnOff: false,
|
||||
asnFrom: {
|
||||
id: null,
|
||||
code: null,
|
||||
area: null,
|
||||
status: 'OPEN',
|
||||
cusCode: null,
|
||||
relatedBill1: null,
|
||||
relatedBill2: null,
|
||||
relatedBill3: null,
|
||||
orderDate: null,
|
||||
estimateDate: null,
|
||||
receivedDate: null,
|
||||
fromName: null,
|
||||
fromAddress: null,
|
||||
fromMan: null,
|
||||
fromTel: null,
|
||||
orderQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
putawayQuantity: 0,
|
||||
vehicle: null,
|
||||
billType: null,
|
||||
dept: null,
|
||||
description: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
createTime: null,
|
||||
updateTime: null
|
||||
},
|
||||
asnDetailFrom: {
|
||||
id: null,
|
||||
asn: null,
|
||||
item: null,
|
||||
stock: null,
|
||||
lineNo: null,
|
||||
po: null,
|
||||
status: 'OPEN',
|
||||
point: null,
|
||||
orderQty: 0,
|
||||
receivedQty: 0,
|
||||
moveQty: 0,
|
||||
putQty: 0,
|
||||
weight: 0,
|
||||
volume: 0,
|
||||
remark: null,
|
||||
propC1: null,
|
||||
propC2: null,
|
||||
propC3: null,
|
||||
propC4: null,
|
||||
propC5: null,
|
||||
propC6: null,
|
||||
propD1: null,
|
||||
propD2: null,
|
||||
deptId: null,
|
||||
sourceName: null,
|
||||
sourceId: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
createTime: null,
|
||||
updateTime: null
|
||||
},
|
||||
asnDetailList: [],
|
||||
itemListData: [],
|
||||
pointList: [],
|
||||
asnOptions: [],
|
||||
invVerifySTF: true,
|
||||
// 导入相关数据
|
||||
importDialogVisible: false,
|
||||
activeImportTab: 'template1',
|
||||
importLoading: false,
|
||||
fileList1: [], // 用于存储当前文件
|
||||
fileList2: [],
|
||||
fileList3: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//数据加载
|
||||
// this.getAreaOptionsAll()
|
||||
// this.getBillTypeAll()
|
||||
// this.getAsnDetailAll()
|
||||
// this.itemDataGet()
|
||||
// this.getPointData()
|
||||
// this.getAsnData()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
formatDate1(value) {
|
||||
return formatDate(value);
|
||||
// const date = new Date(value)
|
||||
// const year = date.getUTCFullYear()
|
||||
// const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
||||
// const day = date.getDate().toString().padStart(2, '0')
|
||||
// return `${year}-${month}-${day}`;
|
||||
},
|
||||
getAreaOptionsAll() {
|
||||
getAreas().then(res => {
|
||||
this.areaOptions = res
|
||||
})
|
||||
},
|
||||
getBillTypeAll() {
|
||||
getBillType().then(res => {
|
||||
this.billTypeOptions = res
|
||||
})
|
||||
},
|
||||
getAsnDetailAll() {
|
||||
let obj = {}
|
||||
queryAsnDetailAll(obj).then(res => {
|
||||
this.asnDetailList = res
|
||||
})
|
||||
},
|
||||
//新增加的开关
|
||||
inserAsnOnOffM(data) {
|
||||
this.$router.push({path: '/business-asn/viewXbDetail'})
|
||||
},
|
||||
//获取当前时间
|
||||
getNewDate() {
|
||||
const date = new Date()
|
||||
const year = date.getUTCFullYear()
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
||||
const day = date.getDate().toString().padStart(2, '0')
|
||||
const formattedDate = `${year}-${month}-${day}`
|
||||
return formattedDate
|
||||
},
|
||||
submitFrom(data) {
|
||||
crudAsn.add(data).then(res => {
|
||||
this.$message.success('新增成功')
|
||||
this.inserAsnOnOff = false
|
||||
this.asnFrom = defaultForm;
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
billTypeSelect(value) {
|
||||
this.inserAsnOnOffM(value.code)
|
||||
},
|
||||
//物料数据
|
||||
itemDataGet() {
|
||||
queryItemAll({}).then(res => {
|
||||
this.itemListData = res
|
||||
}).catch(e => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '物料加载失败',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
getPointData() {
|
||||
queryPointList().then(res => {
|
||||
this.pointList = res
|
||||
})
|
||||
},
|
||||
//queryAsnAll
|
||||
getAsnData() {
|
||||
queryAsnAll().then(res => {
|
||||
this.asnOptions = res
|
||||
})
|
||||
},
|
||||
asnDetailRouter(datas) {
|
||||
this.$router.push({path: '/business-asn/viewXbDetail', query: {ids: datas.id}})
|
||||
},
|
||||
//入库批量确认
|
||||
invVerifyS(data) {
|
||||
console.log(data)
|
||||
let ids = [];
|
||||
for (const idsKey of data) {
|
||||
ids.push(idsKey.id);
|
||||
}
|
||||
invVerify(ids).then(res => {
|
||||
// if (res != null){
|
||||
// this.$message.error(res)
|
||||
// }else {
|
||||
this.$message.success(res)
|
||||
this.crud.toQuery()
|
||||
// }
|
||||
}).catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
invVerifySTFM(selection, row) {
|
||||
if (selection.length > 0) {
|
||||
this.invVerifySTF = false;
|
||||
} else {
|
||||
return
|
||||
}
|
||||
//判断
|
||||
for (const selectionElement of selection) {
|
||||
//打开/收货中
|
||||
if (!(selectionElement.status === 'OPEN' || selectionElement.status === 'RECEIVING')) {
|
||||
this.invVerifySTF = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
invVerifySTFAll(selection) {
|
||||
if (selection.length > 0) {
|
||||
this.invVerifySTF = false;
|
||||
} else {
|
||||
return
|
||||
}
|
||||
//判断
|
||||
for (const selectionElement of selection) {
|
||||
//打开/收货中
|
||||
if (!(selectionElement.status === 'OPEN' || selectionElement.status === 'RECEIVING')) {
|
||||
this.invVerifySTF = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 导入相关方法
|
||||
showImportDialog() {
|
||||
this.importDialogVisible = true
|
||||
},
|
||||
|
||||
downloadTemplate(templateType) {
|
||||
const templateConfig = {
|
||||
template1: {
|
||||
filename: '标准导入模板.xlsx',
|
||||
headers: ['INVOICE NO.', 'BOI', 'PO&LN NO.', 'PART NO.', 'DESCRIPTION', 'Q\'TY ', 'C/NO.'],
|
||||
sampleData: [
|
||||
['KCWT04108SM', 'EXP -', '7291-5366', 'RD829-6640-7', 'ASSY BRACKET,SWING', '3', '7074786'],
|
||||
['KCWT04108SM', 'EXP -', '7291-5366', 'RD829-6640-7', 'ASSY BRACKET,SWING', '3', '7074785']
|
||||
]
|
||||
}
|
||||
}
|
||||
const config = templateConfig[templateType]
|
||||
if (!config) {
|
||||
this.$message.error('模板类型不存在')
|
||||
return
|
||||
}
|
||||
|
||||
// 创建Excel文件并下载
|
||||
this.createAndDownloadExcel(config)
|
||||
},
|
||||
|
||||
createAndDownloadExcel(config) {
|
||||
// 这里需要引入XLSX库来创建Excel文件
|
||||
// 由于项目可能没有XLSX,我们使用简单的CSV格式
|
||||
let csvContent = '\uFEFF' // BOM for UTF-8
|
||||
csvContent += config.headers.join(',') + '\n'
|
||||
|
||||
config.sampleData.forEach(row => {
|
||||
csvContent += row.join(',') + '\n'
|
||||
})
|
||||
|
||||
const blob = new Blob([csvContent], {type: 'text/csv;charset=utf-8;'})
|
||||
const link = document.createElement('a')
|
||||
const url = URL.createObjectURL(blob)
|
||||
link.setAttribute('href', url)
|
||||
link.setAttribute('download', config.filename.replace('.xlsx', '.csv'))
|
||||
link.style.visibility = 'hidden'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
},
|
||||
|
||||
async confirmImport() {
|
||||
// 提取当前 tab 对应的文件信息
|
||||
const getFileFromTab = (tab) => {
|
||||
const fileMap = {
|
||||
template1: this.fileList1,
|
||||
template2: this.fileList2,
|
||||
template3: this.fileList3,
|
||||
};
|
||||
const list = fileMap[tab] || [];
|
||||
return list.length > 0 ? list[0] : null;
|
||||
};
|
||||
|
||||
const currentFile = getFileFromTab(this.activeImportTab);
|
||||
if (!currentFile || !currentFile.raw) {
|
||||
this.crud.notify('请先上传文件', CRUD.NOTIFICATION_TYPE.WARNING);
|
||||
return;
|
||||
}
|
||||
|
||||
const fileName = currentFile.name;
|
||||
this.importLoading = true;
|
||||
console.log(`开始导入 ${this.activeImportTab} 文件: ${fileName}`);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('file', currentFile.raw);
|
||||
formData.append('templateType', this.activeImportTab);
|
||||
|
||||
try {
|
||||
const response = await importData.importAsnData(formData);
|
||||
console.log(response);
|
||||
if (response.status === 200) {
|
||||
this.crud.notify(response.message, CRUD.NOTIFICATION_TYPE.SUCCESS);
|
||||
this.importDialogVisible = false;
|
||||
this.crud.toQuery(); // 刷新列表
|
||||
|
||||
// 动态清空 fileList
|
||||
['fileList1', 'fileList2', 'fileList3'].forEach(key => {
|
||||
this[key] = [];
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('导入失败:', error);
|
||||
} finally {
|
||||
this.importLoading = false;
|
||||
}
|
||||
},
|
||||
cancelImport() {
|
||||
this.fileList1 = [];
|
||||
this.fileList2 = [];
|
||||
this.fileList3 = [];
|
||||
this.importDialogVisible = false
|
||||
},
|
||||
// el-upload专用:校验文件大小和类型
|
||||
beforeExcelUpload(file) {
|
||||
const isExcel = /\.(xlsx|xls|csv)$/.test(file.name)
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
if (!isExcel) {
|
||||
this.crud.notify('只支持.xlsx, .xls, .csv 格式文件', CRUD.NOTIFICATION_TYPE.ERROR);
|
||||
return false
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.crud.notify('文件大小不能超过2MB', CRUD.NOTIFICATION_TYPE.ERROR);
|
||||
return false
|
||||
}
|
||||
return false
|
||||
},
|
||||
// el-upload专用:文件列表改变时;显示最新的文件
|
||||
handleExcelChange(file, fileList) {
|
||||
this.beforeExcelUpload(file)
|
||||
// 只保留当前tab的文件,其它tab清空
|
||||
if (this.activeImportTab === 'template1') {
|
||||
this.fileList1 = [file];
|
||||
this.fileList2 = [];
|
||||
this.fileList3 = [];
|
||||
} else if (this.activeImportTab === 'template2') {
|
||||
this.fileList1 = [];
|
||||
this.fileList2 = [file];
|
||||
this.fileList3 = [];
|
||||
} else if (this.activeImportTab === 'template3') {
|
||||
this.fileList1 = [];
|
||||
this.fileList2 = [];
|
||||
this.fileList3 = [file];
|
||||
}
|
||||
},
|
||||
// el-upload专用:文件移除
|
||||
handleExcelRemove() {
|
||||
if (this.activeImportTab === 'template1') {
|
||||
this.fileList1 = [];
|
||||
} else if (this.activeImportTab === 'template2') {
|
||||
this.fileList2 = [];
|
||||
} else if (this.activeImportTab === 'template3') {
|
||||
this.fileList3 = [];
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.import-content {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.template-info {
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
border-left: 4px solid #409eff;
|
||||
}
|
||||
|
||||
.template-info h4 {
|
||||
margin: 0 0 10px 0;
|
||||
color: #303133;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.template-info p {
|
||||
margin: 0 0 10px 0;
|
||||
color: #606266;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -40,7 +40,6 @@
|
|||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select>
|
||||
|
||||
<el-input v-model="query.ddbh" clearable placeholder="订单编号" style="width: 185px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
|
|
@ -528,12 +527,7 @@ export default {
|
|||
},
|
||||
getPointList() {
|
||||
queryPointList({"type":"CH"}).then(res => {
|
||||
this.pointList = res.map(function (obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
this.pointList = res
|
||||
})
|
||||
},
|
||||
//现品票留样出库
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@
|
|||
<el-input v-model="query.pointCode" clearable placeholder="库位号" style="width: 150px;"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input v-model="query.stockCode" clearable placeholder="箱单号" style="width: 150px;"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.propD1"
|
||||
type="date"
|
||||
|
|
@ -53,7 +56,7 @@
|
|||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
||||
<el-button
|
||||
<!--<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
|
|
@ -63,7 +66,7 @@
|
|||
v-permission="permission.viewDetail"
|
||||
>
|
||||
查看占用
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</crudOperation>
|
||||
<el-dialog
|
||||
title="库内移位"
|
||||
|
|
@ -197,11 +200,12 @@
|
|||
<el-table-column prop="point.code" label="库位号" align="center"/>
|
||||
<el-table-column prop="itemKey.item.code" label="品番"/>
|
||||
<el-table-column prop="itemKey.item.name" label="品番名称"/>
|
||||
<el-table-column prop="stockCode" label="箱单号" align="center"/>
|
||||
<el-table-column prop="quantity" label="数量"/>
|
||||
<el-table-column prop="queuedQty" label="占用数"/>
|
||||
<el-table-column prop="itemKey.propC1" label="批次号"/>
|
||||
<el-table-column prop="zzkw.code" label="制造库位" align="center"/>
|
||||
<el-table-column prop="area.pointCode" label="缓存库位" align="center"/>
|
||||
<!-- <el-table-column prop="zzkw.code" label="制造库位" align="center"/>
|
||||
<el-table-column prop="area.pointCode" label="缓存库位" align="center"/>-->
|
||||
<el-table-column label="操作" width="200px" align="center" fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
|
|
|||
|
|
@ -146,13 +146,13 @@
|
|||
>
|
||||
<el-table-column type="selection" width="50"/>
|
||||
<el-table-column prop="id" label="序号" align="center"/>
|
||||
<el-table-column prop="area.code" label="工位" width="80"/>
|
||||
<el-table-column prop="area.name" label="指示纳所" width="200"/>
|
||||
<!-- <el-table-column prop="area.code" label="库区" width="80"/>-->
|
||||
<el-table-column prop="area.name" label="库区" width="200"/>
|
||||
<el-table-column prop="point.code" label="库位号" align="center"/>
|
||||
<el-table-column prop="itemKey.item.code" label="品番"/>
|
||||
<el-table-column prop="itemKey.item.name" label="品番名称"/>
|
||||
<el-table-column prop="quantity" label="数量"/>
|
||||
<el-table-column prop="zzkw.code" label="制造库位" align="center"/>
|
||||
<!-- <el-table-column prop="zzkw.code" label="制造库位" align="center"/>
|
||||
<el-table-column prop="area.pointCode" label="缓存库位" align="center"/>
|
||||
<el-table-column v-if="checkPer(['admin','fileManagement:edit','fileManagement:del'])" label="操作"
|
||||
width="150px" align="center" fixed="right"
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
>
|
||||
</udOperation>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<div style="float: right;">
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@
|
|||
<el-input v-model="query.pointCode" clearable placeholder="库位号" style="width: 150px;"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input v-model="query.stockCode" clearable placeholder="箱单号" style="width: 150px;"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.propD1"
|
||||
type="date"
|
||||
|
|
@ -153,10 +156,11 @@
|
|||
<el-table-column prop="point.code" label="库位号" align="center"/>
|
||||
<el-table-column prop="itemKey.item.code" label="品番"/>
|
||||
<el-table-column prop="itemKey.item.name" label="品番名称"/>
|
||||
<el-table-column prop="stockCode" label="箱单号" align="center"/>
|
||||
<el-table-column prop="quantity" label="数量"/>
|
||||
<el-table-column prop="queuedQty" label="占用数"/>
|
||||
<el-table-column prop="itemKey.propC1" label="批次号"/>
|
||||
<el-table-column v-if="checkPer(['admin','fileManagement:edit','fileManagement:del'])" label="操作"
|
||||
<!-- <el-table-column v-if="checkPer(['admin','fileManagement:edit','fileManagement:del'])" label="操作"
|
||||
width="150px" align="center" fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -176,7 +180,7 @@
|
|||
>
|
||||
</udOperation>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<div style="float: right;">
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="zzkw.code" label="制造库位" width="80px" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="dstStockCode" label="托盘号" align="center"/>
|
||||
<el-table-column prop="srcQty" label="源数量" width="80px"/>
|
||||
<el-table-column prop="dstQty" label="目标数量" width="80px"/>
|
||||
<!-- 发生数量-->
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<!-- <label class="el-form-item-label">单号</label>-->
|
||||
<el-input v-model="query.code" clearable placeholder="备货单号" style="width: 150px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
<el-input v-model="query.relatedBill1" clearable placeholder="备货计划单号" style="width: 150px;" class="filter-item"
|
||||
<el-input v-model="query.cusCode" clearable placeholder="箱单号" style="width: 150px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
<el-input v-model="query.pc" clearable placeholder="批次" style="width: 150px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
|
|
@ -61,8 +61,7 @@
|
|||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
||||
<!-- <el-button type="primary" v-if="false" @click="getCodeNoM()" icon="el-icon-plus" slot="left" class="filter-item" size="mini">-->
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
|
|
@ -76,6 +75,17 @@
|
|||
</el-button>
|
||||
<el-button type="primary" v-permission="permission.savepickTicket" @click="getCodeNoM()" icon="el-icon-plus" slot="left" class="filter-item" size="mini">
|
||||
新增
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
v-permission="permission.savepickTicket"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="xdckVisible = true"
|
||||
icon="el-icon-document-add"
|
||||
>
|
||||
箱单出库
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
|
|
@ -111,7 +121,7 @@
|
|||
>
|
||||
拣货确认
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
|
|
@ -121,7 +131,7 @@
|
|||
v-permission="permission.cancelPickInfo"
|
||||
>
|
||||
取消拣货
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
|
|
@ -133,7 +143,7 @@
|
|||
>
|
||||
查看详情
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
|
|
@ -143,9 +153,20 @@
|
|||
@click="pickStatusUpdateBtn(crud.selections)"
|
||||
>
|
||||
状态更新
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</crudOperation>
|
||||
|
||||
<!-- 箱单出库-->
|
||||
<el-dialog title="箱单出库" :visible.sync="xdckVisible" width="400px">
|
||||
<el-form ref="xdckFrom" :model="xdckFrom" :rules="rules" size="small" label-width="80px">
|
||||
<el-form-item label="箱单号" prop="stockCode">
|
||||
<el-input v-model="xdckFrom.stockCode" :rows="3" type="textarea" style="width: 270px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="xdckVisible= false">取 消</el-button>
|
||||
<el-button type="primary" @click="xdckBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 取消拣货弹窗 -->
|
||||
<el-dialog title="拣货取消-拣货确认的记录" :visible.sync="taskLogTF" :close-on-click-modal="false" width="88%">
|
||||
<div>
|
||||
|
|
@ -249,7 +270,7 @@
|
|||
>
|
||||
整单拣货
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
|
|
@ -275,7 +296,7 @@
|
|||
@click="xppPickGoodsOnOff()"
|
||||
>
|
||||
现品票拣货
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</div>
|
||||
<el-table :data="taskData" :height="dialogTableHight+'px'" :max-height="dialogTableHight+'px'" style="width: 100%;margin-top: 10px;" border @selection-change="taskSelection">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
|
|
@ -494,22 +515,22 @@
|
|||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="id" label="序号"/>
|
||||
<el-table-column prop="code" label="备货单号" width="120px" align="center"/>
|
||||
<el-table-column prop="relatedBill1" label="备货计划单号" width="120px" align="center"/>
|
||||
<el-table-column prop="cusCode" label="箱单号" width="120px" align="center"/>
|
||||
<el-table-column :show-overflow-tooltip="true" width="150px" prop="orderDate" label="订单日期" align="center"/>
|
||||
<!-- 相关单号2 -->
|
||||
<!-- 相关单号2
|
||||
<el-table-column prop="relatedBill2" width="130px" label="发货单号" align="center"/>
|
||||
<el-table-column prop="gcCode" label="接收工厂" align="center"/>
|
||||
<el-table-column prop="pc" label="批次" align="center" width="60px"/>
|
||||
<el-table-column prop="pc" label="批次" align="center" width="60px"/>-->
|
||||
<el-table-column prop="status" label="状态" width="80px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.pick_status[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="xqQty" label="需求数" width="60px" align="center"/>
|
||||
<!-- 纯需求数量-->
|
||||
<el-table-column prop="pureReqQty" label="纯需求数" width="70px" align="center"/>
|
||||
<!-- 纯需求数量
|
||||
<el-table-column prop="pureReqQty" label="纯需求数" width="70px" align="center"/>-->
|
||||
<!-- 备货需求数量-->
|
||||
<el-table-column prop="orderQuantity" label="备货需求数" width="90px" align="center"/>
|
||||
<el-table-column prop="orderQuantity" label="需求数" width="90px" align="center"/>
|
||||
<!-- 未出单数量-->
|
||||
<el-table-column prop="wcdn" label="未出单数" width="70px" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -517,12 +538,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="allocatedQuantity" label="出单数" width="60px" align="center"/>
|
||||
<el-table-column prop="pickedQuantity" label="备货数" width="60px" align="center"/>
|
||||
<el-table-column prop="shippedQuantity" label="在途数" width="60px" align="center"/>
|
||||
<el-table-column prop="xbQty" label="线边数" width="60px" align="center"/>
|
||||
<el-table-column prop="pickedQuantity" label="拣货数" width="60px" align="center"/>
|
||||
<!--<el-table-column prop="shippedQuantity" label="在途数" width="60px" align="center"/>
|
||||
<el-table-column prop="xbQty" label="线边数" width="60px" align="center"/>-->
|
||||
<!-- 出单日期-->
|
||||
<el-table-column :show-overflow-tooltip="true" width="150px" prop="outOrderDate" label="出单日期" align="center"/>
|
||||
<el-table-column width="150px" prop="shipDate" label="发货日期" align="center"/>
|
||||
<!--<el-table-column :show-overflow-tooltip="true" width="150px" prop="outOrderDate" label="出单日期" align="center"/>
|
||||
<el-table-column width="150px" prop="shipDate" label="发货日期" align="center"/>-->
|
||||
<el-table-column width="160px" prop="area.name" label="出库库区" align="center"/>
|
||||
<el-table-column prop="createBy" label="创建人" align="center"/>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="description" label="描述" align="center"/>
|
||||
|
|
@ -554,7 +575,15 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import crudPickTicket, { getCodeNo, pickingCancel, pickingOperations, queryTaskLogDataS,xppPickGoods,pickStatusUpdate } from '@/api/pickTicket'
|
||||
import crudPickTicket, {
|
||||
getCodeNo,
|
||||
pickingCancel,
|
||||
pickingOperations,
|
||||
queryTaskLogDataS,
|
||||
xppPickGoods,
|
||||
pickStatusUpdate,
|
||||
xdckPick,pickWhole
|
||||
} from '@/api/pickTicket'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
|
|
@ -626,7 +655,7 @@ export default {
|
|||
dicts: ['pick_status','station_type','factory'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '出库',
|
||||
title: '箱单备货',
|
||||
url: 'api/pickTicket',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
|
|
@ -637,8 +666,9 @@ export default {
|
|||
reset: true,
|
||||
download: false
|
||||
},
|
||||
query: { billTypeCode: ['SGDD','单点'] },
|
||||
queryOnPresenterCreated: true
|
||||
query: { billTypeCode: ['XDBH','单点'] },
|
||||
queryOnPresenterCreated: true,
|
||||
|
||||
})
|
||||
},
|
||||
data() {
|
||||
|
|
@ -766,6 +796,8 @@ export default {
|
|||
//拣货记录 data_task_log
|
||||
pickingRecords:[]
|
||||
},
|
||||
xdckVisible:false,
|
||||
xdckFrom: { stockCode: null },
|
||||
//当前标签页
|
||||
activeName: 'first',
|
||||
key:1
|
||||
|
|
@ -847,6 +879,21 @@ export default {
|
|||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
xdckBtn() {
|
||||
crudPickTicket.xdckPick(this.xdckFrom.stockCode).then(res => {
|
||||
this.xdckVisible = false
|
||||
this.crud.toQuery()
|
||||
this.resetForm()
|
||||
},e=>{
|
||||
this.xdckVisible=false;
|
||||
})
|
||||
},
|
||||
|
||||
//重置表单
|
||||
resetForm() {
|
||||
this.$refs['xdckFrom'].resetFields()
|
||||
this.$data.xdckFrom = JSON.parse(JSON.stringify(this.$options.data().xdckFrom))
|
||||
},
|
||||
pickDetailRouter(datas) {
|
||||
this.$router.push({ path: '/business-pick/viewPickDetailPlan', query: { ids: datas.id } })
|
||||
},
|
||||
|
|
@ -961,13 +1008,13 @@ export default {
|
|||
this.$message.error('状态必须是已分配的才能取消拣货')
|
||||
}
|
||||
},
|
||||
//整单分配
|
||||
//整单拣货
|
||||
singlePick(data) {
|
||||
if (data.status === 'ALLOCATE'||data.status ==='PICKUP') {
|
||||
let data_ = this.pickTicketButton
|
||||
data_.pickConfirmNo = 1
|
||||
data_.pickTicketId = data.id
|
||||
pickingOperations(data_).then(res => {
|
||||
pickWhole(data_).then(res => {
|
||||
this.pickConfirmTF = false
|
||||
this.$message.success(res)
|
||||
this.crud.toQuery()
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div style="width: 50%;float: right">
|
||||
<el-form-item label="备货计划" prop="relatedBill1">
|
||||
<el-input :disabled="true" v-model="pickTicketFromSave.relatedBill1" style="width: 100%"/>
|
||||
<el-form-item label="箱单号" prop="cusCode">
|
||||
<el-input :disabled="true" v-model="pickTicketFromSave.cusCode" style="width: 100%"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -152,44 +152,44 @@
|
|||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="id" label="序号"/>
|
||||
<el-table-column prop="shArea.name" label="指示纳所" width="150px"/>
|
||||
<el-table-column prop="item.code" label="品番" width="100px">
|
||||
<!--<el-table-column prop="shArea.name" label="指示纳所" width="150px"/>-->
|
||||
<el-table-column prop="item.code" label="品番" >
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.item == null ? '' : scope.row.item.code }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="item.name " label="品名" width="120px">
|
||||
<el-table-column prop="item.name " label="品名" >
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.item == null ? '' : scope.row.item.name }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--需求数量-->
|
||||
<el-table-column prop="xqQty" label="需求数" width="60px"/>
|
||||
<el-table-column prop="item.extendD3" label="收容数" width="60px" align="center"/>
|
||||
<!--纯需求-->
|
||||
<el-table-column prop="propC4" label="纯需求数" width="80px"/>
|
||||
<!--需求数量
|
||||
<el-table-column prop="xqQty" label="需求数" width="60px"/>-->
|
||||
<el-table-column prop="item.extendD3" label="收容数" align="center"/>
|
||||
<!--纯需求
|
||||
<el-table-column prop="propC4" label="纯需求数" width="80px"/>-->
|
||||
<!--纯需求数量-->
|
||||
<el-table-column prop="orderQty" label="备货需求数" width="90px"/>
|
||||
<el-table-column prop="orderQty" label="需求数" />
|
||||
<!--未单数量 未出单=纯需求-出单数-->
|
||||
<el-table-column prop="wcdn" label="未单数" width="60px">
|
||||
<el-table-column prop="wcdn" label="未单数" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderQty - scope.row.allocatedQty }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--出单数量 分配 出单数=分配时候写入的数量-->
|
||||
<el-table-column prop="allocatedQty" label="出单数" width="60px"/>
|
||||
<el-table-column prop="allocatedQty" label="出单数"/>
|
||||
<!--备货数量 拣货-->
|
||||
<el-table-column prop="pickedQty" label="备货数" width="60px"/>
|
||||
<el-table-column prop="pickedQty" label="拣货数" />
|
||||
<!--在途数量 发运-->
|
||||
<el-table-column prop="shippedQty" label="在途数" width="60px"/>
|
||||
<!-- <el-table-column prop="shippedQty" label="在途数" width="60px"/>-->
|
||||
<!--线边数量-->
|
||||
<el-table-column prop="bcQty" label="补料数" width="60px"/>
|
||||
<!-- <el-table-column prop="bcQty" label="补料数" width="60px"/>
|
||||
<el-table-column prop="supplier" label="供应商" width="120"/>
|
||||
<el-table-column prop="xbQty" label="线边数" width="70px"/>
|
||||
<el-table-column prop="xbBhQty" label="线边备货数" width="120px"/>
|
||||
<el-table-column prop="xbBhQty" label="线边备货数" width="120px"/>-->
|
||||
<!--制造库位 点位-->
|
||||
<el-table-column prop="point.code" label="制造库位" width="100px"/>
|
||||
<el-table-column v-if="checkPer(['admin','pickDetail:edit','pickDetail:del'])" label="操作" width="150px"
|
||||
<!-- <el-table-column prop="point.code" label="制造库位" width="100px"/>-->
|
||||
<!-- <el-table-column v-if="checkPer(['admin','pickDetail:edit','pickDetail:del'])" label="操作" width="150px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<div style="float: right;">
|
||||
|
|
@ -273,7 +273,7 @@ export default {
|
|||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: true,
|
||||
del: false,
|
||||
reset: false,
|
||||
download: false
|
||||
},
|
||||
|
|
@ -337,6 +337,7 @@ export default {
|
|||
area: null,
|
||||
status: 'OPEN',
|
||||
code: null,
|
||||
cusCode:null,
|
||||
orderQuantity: 0,
|
||||
orderDate: null,
|
||||
billType: null,
|
||||
|
|
|
|||
Loading…
Reference in New Issue