7 changed files with 857 additions and 11 deletions
-
2src/api/material/productionStock.js
-
9src/api/shipment/box.js
-
6src/api/shipment/roll.js
-
57src/views/modules/finshProduct/outWarehouse.vue
-
6src/views/modules/finshProduct/outWarehouse/outWarehouseDetail.vue
-
259src/views/modules/finshProduct/outWarehouse/shipmentBox.vue
-
527src/views/modules/material/finalRollSearch.vue
@ -0,0 +1,9 @@ |
|||||
|
import {createAPI} from '../../utils/httpRequest' |
||||
|
|
||||
|
export const getShipmentBoxList = (data)=>createAPI('/shipment/box/list','post',data) |
||||
|
|
||||
|
export const addShipmentBox = (data)=>createAPI('/shipment/box/add','post',data) |
||||
|
|
||||
|
export const removeShipmentBox = (data)=>createAPI('/shipment/box/remove','post',data) |
||||
|
export const updateShipmentBox = (data)=>createAPI('/shipment/box/update','post',data) |
||||
|
export const updateShipmentBoxStatus = (data)=>createAPI('/shipment/box/update/status','post',data) |
||||
@ -0,0 +1,6 @@ |
|||||
|
import {createAPI} from '../../utils/httpRequest' |
||||
|
|
||||
|
export const getShipmentRollDataList = (data) => createAPI(`/shipment/roll/list`,'post',data) |
||||
|
export const saveShipmentRollData = (data) => createAPI(`/shipment/roll/add`,'post',data) |
||||
|
export const removeShipmentRollData = (data) => createAPI(`/shipment/roll/remove`,'post',data) |
||||
|
export const getShipmentRollAllData = (data) => createAPI(`/shipment/roll/all`,'post',data) |
||||
@ -0,0 +1,527 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form :inline="true" label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
||||
|
<el-form-item :label="'最终卷'"> |
||||
|
<el-input v-model="searchData.finalRollNo" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'物料编码'"> |
||||
|
<el-input v-model="searchData.partNo" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'派工单号'"> |
||||
|
<el-input v-model="searchData.seqNo" type="number" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'生产订单'"> |
||||
|
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'状态'"> |
||||
|
<el-select filterable v-model="searchData.statusCode" > |
||||
|
<el-option label="all" value=""></el-option> |
||||
|
<el-option label="created" value="0"></el-option> |
||||
|
<el-option label="checked" value="1"></el-option> |
||||
|
<el-option label="stocked" value="2"></el-option> |
||||
|
<el-option label="shipped" value="3"></el-option> |
||||
|
<el-option label="isolation" value="8"></el-option> |
||||
|
<el-option label="discarded" value="9"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'生产日期'"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="searchData.startDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'至'"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="searchData.endDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="' '"> |
||||
|
<el-button type="primary" @click="searchTable()">查询</el-button> |
||||
|
<download-excel |
||||
|
:fields="fields()" |
||||
|
:data="exportData" |
||||
|
type="xls" |
||||
|
:name="exportName" |
||||
|
:header="exportHeader" |
||||
|
:footer="exportFooter" |
||||
|
:fetch="createExportData" |
||||
|
:before-generate="startDownload" |
||||
|
:before-finish="finishDownload" |
||||
|
worksheet="导出信息" |
||||
|
class="el-button el-button--primary el-button--medium"> |
||||
|
{{ '导出' }} |
||||
|
</download-excel> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
:height="height" |
||||
|
border |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList1" :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-column |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="120" |
||||
|
fixed="left" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<a type="text" size="small" v-if="scope.row.statusCode===2" @click="isolationRoll(scope.row)">隔离</a> |
||||
|
<a type="text" size="small" v-if="scope.row.statusCode===2" @click="discardedRoll(scope.row)">报废</a> |
||||
|
<a type="text" size="small" v-if="scope.row.statusCode===8||scope.row.statusCode===9" @click="returnStatusRoll(scope.row)">撤销状态</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100, 1000]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
soFinalRollSearch, |
||||
|
updateRollStatus, |
||||
|
} from "@/api/material/productionStock.js" |
||||
|
import Chooselist from '@/views/modules/common/Chooselist' |
||||
|
export default { |
||||
|
components: { |
||||
|
Chooselist |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
dataList: [], |
||||
|
searchData: { |
||||
|
page: 1, |
||||
|
limit: 100, |
||||
|
site:this.$store.state.user.site, |
||||
|
username: this.$store.state.user.name, |
||||
|
finalRollNo: '', |
||||
|
partNo :'', |
||||
|
seqNo:'', |
||||
|
orderNo:'', |
||||
|
statusCode:'', |
||||
|
startDate:'', |
||||
|
endDate:'', |
||||
|
}, |
||||
|
exportList:[], |
||||
|
pageIndex: 1, |
||||
|
pageSize: 100, |
||||
|
totalPage: 0, |
||||
|
visible:false, |
||||
|
dataListLoading: false, |
||||
|
columnList1:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1FinalRollNo', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "finalRollNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "成品卷号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1PartNo', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "partNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料编码", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1PartDesc', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "partDesc", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料名称", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 150 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1OrderNo', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "orderNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "生产订单", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1SeqNo', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "seqNo", |
||||
|
headerAlign: "center", |
||||
|
align: "right", |
||||
|
columnLabel: "派工单号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1RollQty', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "rollQty", |
||||
|
headerAlign: "center", |
||||
|
align: "right", |
||||
|
columnLabel: "卷数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1Status', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "status", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "状态", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1Remark', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "createdByName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "创建人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1CreatedDate', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "createdDate", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "创建时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 150 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1LabelDate', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "labelDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "标签日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 150 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1FqcDate', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "fqcDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "FQC日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 150 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400003, |
||||
|
serialNumber: '400003Table1ManufactureDate', |
||||
|
tableId: "400003Table1", |
||||
|
tableName: "成品卷查询", |
||||
|
columnProp: "manufactureDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "生产日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 150 |
||||
|
}, |
||||
|
], |
||||
|
// 导出 start |
||||
|
exportData: [], |
||||
|
exportName: '成品卷库存查询'+this.dayjs().format('YYYYMMDDHHmmss'), |
||||
|
exportHeader: ["成品卷库存查询"], |
||||
|
exportFooter: [], |
||||
|
// 导出 end |
||||
|
height:200, |
||||
|
} |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = window.innerHeight- 200 |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取基础数据列表S |
||||
|
getBaseList (val, type) { |
||||
|
this.tagNo = val |
||||
|
this.tagNo1 = type |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
if (val === 1013) { |
||||
|
if(type==1) { |
||||
|
strVal = this.dataForm.partType |
||||
|
} |
||||
|
} |
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/* 列表方法的回调 */ |
||||
|
getBaseData (val) { |
||||
|
if (this.tagNo === 1013) { |
||||
|
if(this.tagNo1==1) { |
||||
|
this.dataForm.partType = val.Base_id |
||||
|
this.dataForm.partTypeDesc = val.Base_desc |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
//初始化组件的参数 |
||||
|
init(inData) { |
||||
|
//初始化参数 |
||||
|
this.searchData = JSON.parse(JSON.stringify(inData)); |
||||
|
//刷新表格 |
||||
|
this.searchTable(); |
||||
|
|
||||
|
}, |
||||
|
// 每页数 |
||||
|
sizeChangeHandle (val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.search() |
||||
|
}, |
||||
|
// 当前页 |
||||
|
currentChangeHandle (val) { |
||||
|
this.pageIndex = val |
||||
|
this.search() |
||||
|
}, |
||||
|
searchTable(){ |
||||
|
this.searchData.limit = this.pageSize |
||||
|
this.searchData.page = this.pageIndex |
||||
|
soFinalRollSearch(this.searchData).then(({data}) => { |
||||
|
if (data.code == 0) { |
||||
|
this.dataList = data.page.list |
||||
|
this.pageIndex = data.page.currPage |
||||
|
this.pageSize = data.page.pageSize |
||||
|
this.totalPage = data.page.totalCount |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
isolationRoll(row){ |
||||
|
let inData={ |
||||
|
site:row.site, |
||||
|
finalRollNo:row.finalRollNo, |
||||
|
statusCode:8, |
||||
|
status:'Isolation', |
||||
|
} |
||||
|
this.$confirm('确定要隔离这个卷?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
updateRollStatus(inData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
this.searchTable(); |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
discardedRoll(row){ |
||||
|
let inData={ |
||||
|
site:row.site, |
||||
|
finalRollNo:row.finalRollNo, |
||||
|
statusCode:9, |
||||
|
status:'Discarded', |
||||
|
} |
||||
|
this.$confirm('确定要报废这个卷?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
updateRollStatus(inData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
this.searchTable(); |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
returnStatusRoll(row){ |
||||
|
let inData={ |
||||
|
site:row.site, |
||||
|
finalRollNo:row.finalRollNo, |
||||
|
statusCode:2, |
||||
|
status:'Stocked', |
||||
|
} |
||||
|
this.$confirm('确定要还原这个卷?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
updateRollStatus(inData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
this.searchTable(); |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
//导出excel |
||||
|
//导出excel |
||||
|
async createExportData() { |
||||
|
this.searchData.limit = -1 |
||||
|
this.searchData.page = 1 |
||||
|
await soFinalRollSearch(this.searchData).then(({data}) => { |
||||
|
this.exportList= data.page.list; |
||||
|
}) |
||||
|
|
||||
|
return this.exportList; |
||||
|
}, |
||||
|
startDownload() { |
||||
|
// this.exportData = this.dataList |
||||
|
|
||||
|
}, |
||||
|
finishDownload() { |
||||
|
}, |
||||
|
fields() { |
||||
|
let json = "{" |
||||
|
this.columnList1.forEach((item, index) => { |
||||
|
if (index == this.columnList1.length - 1) { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
||||
|
} else { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
||||
|
} |
||||
|
}) |
||||
|
json += "}" |
||||
|
let s = eval("(" + json + ")") |
||||
|
|
||||
|
return s |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue