Browse Source

生产查询

master
常熟吴彦祖 4 months ago
parent
commit
e7067643ac
  1. 5
      src/api/boxManage/boxManage.js
  2. 251
      src/views/modules/boxManage/com_saleBoxManage_boxing.vue
  3. 346
      src/views/modules/boxManage/saleBoxManage.vue
  4. 4
      src/views/modules/clodopLabel/kuCunLabel.js
  5. 4
      src/views/modules/clodopLabel/poPartLabel.js

5
src/api/boxManage/boxManage.js

@ -0,0 +1,5 @@
import { createAPI } from "@/utils/httpRequest.js";
export const searchSoReceiveBoxesData = data => createAPI('/boxForNotification/searchSoReceiveBoxesData','post',data)
export const newSoReceiveBoxesData = data => createAPI('/boxForNotification/newSoReceiveBoxesData','post',data)

251
src/views/modules/boxManage/com_saleBoxManage_boxing.vue

@ -0,0 +1,251 @@
<template>
<div class="customer-css">
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-form-item >
<el-button type="primary" @click="searchTable()">查询</el-button>
<el-button type="primary" @click="newBox()">新增箱</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
:height=searchData.height
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {newSoReceiveBoxesData, searchSoReceiveBoxesData} from '../../../api/boxManage/boxManage'
export default {
components: {
},
data() {
return {
dataList: [],
searchData: {
site: '',
username: '',
buNo: '',
orderNo: '',
boxType: '',
height:'300',
page: 1,
limit: 1000
},
dataListLoading: false,
currentRow:'',
columnList: [
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table2BoxNo',
tableId: "750001Table2",
tableName: "装箱清单",
columnProp: "boxNo",
headerAlign: "center",
align: "left",
columnLabel: "外箱标签",
columnWidth: '120',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table2Status',
tableId: "750001Table2",
tableName: "装箱清单",
columnProp: "status",
headerAlign: "center",
align: "center",
columnLabel: "状态",
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table2RollsQty',
tableId: "750001Table2",
tableName: "装箱清单",
columnProp: "rollsQty",
headerAlign: "center",
align: "right",
columnLabel: "卷数",
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table2WareHouseID',
tableId: "750001Table2",
tableName: "装箱清单",
columnProp: "wareHouseID",
headerAlign: "center",
align: "left",
columnLabel: "所在仓库",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table2WareHouseName',
tableId: "750001Table2",
tableName: "装箱清单",
columnProp: "wareHouseName",
headerAlign: "center",
align: "left",
columnLabel: "所在仓库名称",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table2CreatedBy',
tableId: "750001Table2",
tableName: "装箱清单",
columnProp: "createdBy",
headerAlign: "center",
align: "left",
columnLabel: "创建人",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table2CreatedDate',
tableId: "750001Table2",
tableName: "装箱清单",
columnProp: "createdDate",
headerAlign: "center",
align: "left",
columnLabel: "创建时间",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
modelList:[],
}
},
methods: {
//
init(inData) {
//
this.searchData = JSON.parse(JSON.stringify(inData));
//
this.searchTable();
},
searchTable(){
searchSoReceiveBoxesData(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList = data.rows
console.log(this.dataList)
} else {
this.dataList = [];
}
});
},
newBox(){
this.$confirm(`确定为此销售发货单新建箱?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let inData={
site: this.searchData.site,
createdBy: this.$store.state. user.name,
buNo: this.searchData.buNo,
orderNo: this.searchData.orderNo,
boxType: this.searchData.boxType,
status:'未封箱',
rollsQty: 0,
}
newSoReceiveBoxesData(inData).then(({data}) => {
if (data && data.code == 0) {
this.$message.success( '操作成功')
this.searchTable();
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
},
}
</script>
<style scoped lang="scss">
.rq .auto /deep/ .el-form-item__content{
height: auto;
line-height: 1.5;
}
/deep/ .el-table__fixed-right-patch {
display: none !important;
}
</style>

346
src/views/modules/boxManage/saleBoxManage.vue

@ -0,0 +1,346 @@
<template>
<div class="customer-css" >
<!-- 查询时间和产品 -->
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;" >
<el-row>
<el-col :span="24" style="">
<el-form-item :label="'BU:'">
<el-input v-model="searchData.buNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'发货通知单号:'">
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'客户编号:'">
<el-input v-model="searchData.customerId" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'客户名称:'">
<el-input v-model="searchData.customerName" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'单据状态'">
<el-select multiple collapse-tags v-model="searchData.orderStatusList" clearable style="width: 160px">
<el-option label="待出库" value="待出库"></el-option>
<el-option label="已出库" value="已出库"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '" >
<el-button class="customer-bun-min" type="primary" @click="getMainData" style="">Query</el-button>
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:height="height"
:data="mainDataList"
border
ref="mainTable"
highlight-current-row
@row-click="changeData"
v-loading="dataListLoading"
style="margin-top: 0px; width: 100%;">
<!-- <el-table-column-->
<!-- fixed="left"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="220"-->
<!-- :label="'操作'">-->
<!-- <template slot-scope="scope">-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
v-for="(item,index) in columnArray1" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-tabs v-model="activeName" style="margin-top: 0px; width: 99%;" @tab-click="tabClick" class="customer-tab" type="border-card">
<el-tab-pane label="装箱清单" name="boxing" style="">
<boxing ref="boxing"></boxing>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
/*组件*/
import excel from "@/utils/excel-util.js";
import boxing from "./com_saleBoxManage_boxing.vue"
import {searchOutboundNotification} from '../../../api/qc/outbound_notification'
export default {
data() {
return {
functionId: this.$route.meta.menuId,
height: 200,
currentRow: {},
searchData:{
orderNo:'',
customerId:'',
orderType:'销售出库',
orderStatus: '',
orderStatusList: ['待出库'],
buNo:'',
customerName:'',
site:this.$store.state.user.site,
userName:this.$store.state.user.name,
page: 1,
limit: 10,
},
pageIndex: 1,
pageSize: 50,
totalPage: 0,
tagNo:'',
mainDataList:[],
dataListLoading: false,
activeName: 'boxing',
columnArray1: [
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table1BU',
tableId: "750001Table1",
tableName: "销售发货清单",
columnProp: "buNo",
headerAlign: "center",
align: "left",
columnLabel: "BU",
columnWidth: '60',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table1OrderNo',
tableId: "750001Table1",
tableName: "销售发货清单",
columnProp: "orderNo",
headerAlign: "center",
align: "left",
columnLabel: "发货通知单号",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table1OrderStatus',
tableId: "750001Table1",
tableName: "销售发货清单",
columnProp: "orderStatus",
headerAlign: "center",
align: "left",
columnLabel: "通知单状态",
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table1CustomerId',
tableId: "750001Table1",
tableName: "销售发货清单",
columnProp: "customerId",
headerAlign: "center",
align: "left",
columnLabel: "客户编号",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table1CustomerName',
tableId: "750001Table1",
tableName: "销售发货清单",
columnProp: "customerName",
headerAlign: "center",
align: "left",
columnLabel: "客户编号",
columnWidth: '240',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750001Table1RequiredOutboundDate',
tableId: "750001Table1",
tableName: "销售发货清单",
columnProp: "requiredOutboundDate",
headerAlign: "center",
align: "left",
columnLabel: "要求发货日期",
columnWidth: '120',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
exportName: '发货通知单'+this.dayjs().format('YYYYMMDDHHmmss'),
}
},
/*组件*/
components: {
boxing,
},
mounted() {
this.$nextTick(() => {
this.height = ( window.innerHeight - 220)/2;
})
},
methods: {
getMainData(){
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
searchOutboundNotification(this.searchData).then(({data}) => {
if (data.code === 0) {
this.mainDataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
//
if (this.totalPage > 0) {
//
this.$refs.mainTable.setCurrentRow(this.mainDataList[0])
this.changeData(this.mainDataList[0])
}else {
this.changeData(null)
}
}
this.dataListLoading = false
})
},
tabClick(tab, event){
this.refreshCurrentTabTable()
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getMainData()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getMainData()
},
changeData(row){
this.currentRow=JSON.parse(JSON.stringify(row))
this.refreshCurrentTabTable ();
},
refreshCurrentTabTable(){
if(this.currentRow===''||this.currentRow===null){
this.currentRow={site:'',supplierNo:''}
}
if(this.activeName==='boxing'){
this.refreshBoxingTable();
}
},
async exportExcel() {
this.searchData.limit = -1
this.searchData.page = 1
excel.exportTable({
url: "/outbound/searchOutboundNotification",
columnMapping: this.columnArray1,//table
mergeSetting: [],//
params: this.searchData,
fileName: this.exportName+".xlsx",
rowFetcher: res => res.data,
columnFormatter: [],
dropColumns: [],//dropColumns: ["netWeight"]
});
},
refreshBoxingTable(){
let inData={
site: this.currentRow.site,
buNo: this.currentRow.buNo,
orderNo: this.currentRow.orderNo,
boxType: this.currentRow.orderType,
height:Number(this.height)-25
}
this.$refs.boxing.init(inData)
},
},
created() {
//
this.getMainData();
},
}
</script>
<!--当前页面的标签样式-->
<style scoped lang="scss">
/deep/ .customer-tab .el-tabs__content {
padding: 5px !important;
}
</style>

4
src/views/modules/clodopLabel/kuCunLabel.js

@ -19,8 +19,8 @@ export function kuCunLabelPrint(dataList,type) {
} }
} }
LODOP.PRINT_DESIGN();
// LODOP.PREVIEW();
// LODOP.PRINT_DESIGN();
LODOP.PREVIEW();
// LODOP.PRINT(); // LODOP.PRINT();
} }

4
src/views/modules/clodopLabel/poPartLabel.js

@ -16,8 +16,8 @@ export function poPartLabelPrint(dataList) {
LODOP.ADD_PRINT_TEXT(53,72,155,20,"Product Date:"+row.productionDate); LODOP.ADD_PRINT_TEXT(53,72,155,20,"Product Date:"+row.productionDate);
} }
LODOP.PRINT_DESIGN();
// LODOP.PREVIEW();
// LODOP.PRINT_DESIGN();
LODOP.PREVIEW();
// LODOP.PRINT(); // LODOP.PRINT();
} }

Loading…
Cancel
Save