Browse Source

Merge remote-tracking branch 'origin/master'

master
wenkuan.shi 2 years ago
parent
commit
5838056aa2
  1. 2
      src/api/material/productionStock.js
  2. 9
      src/api/shipment/box.js
  3. 6
      src/api/shipment/roll.js
  4. 57
      src/views/modules/finshProduct/outWarehouse.vue
  5. 6
      src/views/modules/finshProduct/outWarehouse/outWarehouseDetail.vue
  6. 259
      src/views/modules/finshProduct/outWarehouse/shipmentBox.vue
  7. 527
      src/views/modules/material/finalRollSearch.vue

2
src/api/material/productionStock.js

@ -16,3 +16,5 @@ export const finalSaveTransHeaderDetail= data => createAPI(`/productionStock/fin
export const deleteSubCach= data => createAPI(`/productionStock/deleteSubCach`,'post',data) export const deleteSubCach= data => createAPI(`/productionStock/deleteSubCach`,'post',data)
export const deleteTransHeaderData= data => createAPI(`/productionStock/deleteTransHeaderData`,'post',data) export const deleteTransHeaderData= data => createAPI(`/productionStock/deleteTransHeaderData`,'post',data)
export const saveStockCach= data => createAPI(`/productionStock/saveStockCach`,'post',data) export const saveStockCach= data => createAPI(`/productionStock/saveStockCach`,'post',data)
export const soFinalRollSearch= data => createAPI(`/productionStock/soFinalRollSearch`,'post',data)
export const updateRollStatus= data => createAPI(`/productionStock/updateRollStatus`,'post',data)

9
src/api/shipment/box.js

@ -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)

6
src/api/shipment/roll.js

@ -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)

57
src/views/modules/finshProduct/outWarehouse.vue

@ -3,6 +3,7 @@ import OutWarehouseDetail from './outWarehouse/outWarehouseDetail.vue'
import {getShipmentPage} from '../../../api/shipment' import {getShipmentPage} from '../../../api/shipment'
import {getShipmentDetailList} from '../../../api/shipment/detail' import {getShipmentDetailList} from '../../../api/shipment/detail'
import ShipmentBox from './outWarehouse/shipmentBox.vue' import ShipmentBox from './outWarehouse/shipmentBox.vue'
import {addShipmentBox, getShipmentBoxList} from '../../../api/shipment/box'
export default { export default {
name: "outWarehouse", name: "outWarehouse",
@ -102,6 +103,7 @@ export default {
row:{}, row:{},
activeName:'detail', activeName:'detail',
detailDataList:[], detailDataList:[],
detailLoading: false,
columnDetailList:[ columnDetailList:[
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -206,7 +208,9 @@ export default {
fixed: '', fixed: '',
columnWidth: 80 columnWidth: 80
} }
]
],
boxDataList:[],
} }
}, },
methods:{ methods:{
@ -248,7 +252,8 @@ export default {
}, },
handleOutWarehouse(row){ handleOutWarehouse(row){
this.form = {...row} this.form = {...row}
this.open=true;
this.getBoxDataList();
this.open = true;
}, },
getDetailDataList(){ getDetailDataList(){
let params = { let params = {
@ -256,13 +261,16 @@ export default {
site:this.row.site site:this.row.site
} }
this.detailDataList = []; this.detailDataList = [];
this.detailLoading = true;
getShipmentDetailList(params).then(({data})=>{ getShipmentDetailList(params).then(({data})=>{
this.detailLoading = false;
if (data && data.code === 0){ if (data && data.code === 0){
this.detailDataList = data.rows; this.detailDataList = data.rows;
}else { }else {
this.$message.warning(data.msg) this.$message.warning(data.msg)
} }
}).catch((error)=>{ }).catch((error)=>{
this.detailLoading = false;
this.$message.error(error) this.$message.error(error)
}) })
}, },
@ -275,6 +283,39 @@ export default {
}, },
handleRowClick(row){ handleRowClick(row){
this.row = {...row}; this.row = {...row};
},
getBoxDataList(){
let params = {
shipmentId: this.form.shipmentId,
site:this.form.site
}
this.boxDataList = [];
getShipmentBoxList(params).then(({data})=>{
if (data && data.code === 0){
this.boxDataList = data.rows;
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
handleAddBox(){
let params = {
shipmentId: this.form.shipmentId,
site:this.form.site,
createBy:this.$store.state.user.name,
}
addShipmentBox(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
this.getBoxDataList();
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
} }
}, },
watch:{ watch:{
@ -375,11 +416,14 @@ export default {
</el-pagination> </el-pagination>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="出库明细" name="detail"> <el-tab-pane label="出库明细" name="detail">
<out-warehouse-detail :height="420" :data-list="detailDataList" :column-list="columnDetailList"></out-warehouse-detail>
<out-warehouse-detail :height="420"
:loading="detailLoading"
:data-list="detailDataList"
:column-list="columnDetailList"></out-warehouse-detail>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog title="装箱出库" v-drag :visible.sync="open" width="800px" :close-on-click-modal="false">
<el-dialog title="装箱出库" v-drag :visible.sync="open" width="1000px" :close-on-click-modal="false">
<el-form :model="form" ref="form" label-position="top"> <el-form :model="form" ref="form" label-position="top">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="4"> <el-col :span="4">
@ -399,7 +443,10 @@ export default {
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<shipment-box :data-list="[]" :height="200"></shipment-box>
<shipment-box :data-list="boxDataList"
@add="handleAddBox"
@refresh="getBoxDataList"
:height="300"></shipment-box>
<el-footer style="height: 20px"></el-footer> <el-footer style="height: 20px"></el-footer>
</el-dialog> </el-dialog>
</div> </div>

6
src/views/modules/finshProduct/outWarehouse/outWarehouseDetail.vue

@ -14,6 +14,10 @@ export default {
type:Array, type:Array,
default:()=>[] default:()=>[]
}, },
loading:{
type:Boolean,
default:false
}
}, },
data(){ data(){
return{ return{
@ -28,7 +32,7 @@ export default {
<template> <template>
<div> <div>
<el-table :data="dataList" border style="width: 100%" :height="height">
<el-table :data="dataList" border v-loading="loading" style="width: 100%" :height="height">
<el-table-column <el-table-column
v-for="(item,index) in columnList" :key="index" v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"

259
src/views/modules/finshProduct/outWarehouse/shipmentBox.vue

@ -1,4 +1,12 @@
<script> <script>
import {removeShipmentBox, updateShipmentBox, updateShipmentBoxStatus} from '../../../../api/shipment/box'
import {
getShipmentRollAllData,
getShipmentRollDataList,
removeShipmentRollData,
saveShipmentRollData
} from '../../../../api/shipment/roll'
export default { export default {
name: 'shipmentBox', name: 'shipmentBox',
props:{ props:{
@ -12,8 +20,150 @@ export default {
}, },
}, },
data(){ data(){
return {
open:false,
endOpen:false,
form:{},
endForm:{},
rollDataList:[],
endDataList:[],
}
},
methods:{
handleAddBox(){
this.$emit('add','')
},
handleScanRoll(row){
this.form = {...row}
this.$nextTick(()=>{
this.$refs.inputRollNo.focus()
})
this.getDataList();
this.open = true;
},
getDataList(){
let params = {
...this.form
}
getShipmentRollDataList(params).then(({data})=>{
if (data && data.code === 0){
this.rollDataList = data.rows
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
handleUpdateBoxStatus(row){
let params = {
...row
}
updateShipmentBoxStatus(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
this.$emit('refresh')
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
handleRemoveBox(row){
this.$confirm('确定要删除这条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
removeShipmentBox(row).then(({data})=>{
if (data && data.code === 0){
this.$emit('refresh')
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
})
},
handleRollScan(e){
let val = e.target.value.trim();
if (!val){
this.$message.warning('请输入条码')
this.form.rollNo = ''
return
}
let scanRow = val.split(';')
let params = {
...this.form,
id:null,
rollNo:scanRow[0],
site:this.form.site,
createBy:this.$store.state.user.name,
}
saveShipmentRollData(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
// roll
this.getDataList();
}else {
this.$message.warning(data.msg)
}
this.form.rollNo = ''
}).catch((error)=>{
this.form.rollNo = ''
this.$message.error(error)
})
}, },
handleGetRollDataList(row){
this.form = {
...row,
openDetail:true,
}
this.getDataList();
this.open = true;
},
handleRollRemove(row){
this.$confirm('确定要删除这条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
removeShipmentRollData(row).then(({data})=>{
if (data && data.code === 0){
this.getDataList();
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
})
},
handleEndBox(){
this.endForm = {
warehouseId:'',
shipmentDate:'',
}
let params = {
...this.form,
}
getShipmentRollAllData(params).then(({data})=>{
if (data && data.code === 0){
this.endDataList = data.rows
this.endOpen = true;
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
}
}
} }
</script> </script>
@ -21,21 +171,122 @@ export default {
<template> <template>
<div> <div>
<div style="display: flex;justify-content: space-between;"> <div style="display: flex;justify-content: space-between;">
<div><el-button type="primary" >新增箱子</el-button></div>
<div><el-button type="primary" @click="$emit('lastOutShipment')">最终出库</el-button></div>
<div><el-button type="primary" @click="handleAddBox">新增箱子</el-button></div>
<div><el-button type="primary" @click="handleEndBox">最终出库</el-button></div>
</div> </div>
<el-table :data="dataList" style="width: 100%" border :height="height"> <el-table :data="dataList" style="width: 100%" border :height="height">
<el-table-column prop="boxNo" label="箱号" width="400" header-align="center" align="left"></el-table-column>
<el-table-column prop="boxNoStr" label="箱号" width="200" header-align="center" align="left"></el-table-column>
<el-table-column prop="createBy" label="录入人" width="100" header-align="center" align="left"></el-table-column>
<el-table-column prop="createDate" label="录入时间" width="200" header-align="center" align="center"></el-table-column>
<el-table-column prop="status" label="状态" width="100" header-align="center" align="center"></el-table-column>
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link >查看</el-link>
<el-link @click="handleScanRoll(scope.row)" v-if="scope.row.status==='未封箱'">扫描</el-link>
<el-link v-if="scope.row.status==='未封箱'" @click="handleUpdateBoxStatus(scope.row)">封箱</el-link>
<el-link v-if="scope.row.status==='未封箱'" @click="handleRemoveBox(scope.row)">删除</el-link>
<el-link @click="handleGetRollDataList(scope.row)">查看</el-link>
</template>
</el-table-column>
</el-table>
<el-dialog title="扫描" :visible.sync="open" v-drag :close-on-click-modal="false" append-to-body width="1000px">
<el-form :model="form" label-width="100px" label-position="top" >
<el-row :gutter="10">
<el-col :span="4">
<el-form-item label="发货ID">
<el-input v-model="form.shipmentId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="箱号">
<el-input v-model="form.boxNoStr" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="请扫描">
<el-input v-model="form.rollNo" :disabled="form.openDetail" ref="inputRollNo" @keyup.enter.native="handleRollScan" placeholder="请输入扫描的条码"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="已扫描列表">
<el-table :data="rollDataList" border :height="200">
<el-table-column width="60" label="操作" align="center">
<template slot-scope="scope">
<el-link @click="handleRollRemove(scope.row)">删除</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="partNo" width="100" header-align="center" label="物料编码"></el-table-column>
<el-table-column prop="partDesc" width="200" header-align="center" label="物料名称"></el-table-column>
<el-table-column prop="rollNo" width="100" header-align="center" label="卷号"></el-table-column>
<el-table-column prop="rollQty" width="60" header-align="center" align="right" label="数量"></el-table-column>
<el-table-column prop="batchNo" width="60" header-align="center" label="批号"></el-table-column>
<el-table-column prop="ref" width="60" header-align="center" align="left" label="WD"></el-table-column>
<el-table-column prop="manufacturerTime" width="150" header-align="center" align="center" label="生产日期"></el-table-column>
<el-table-column prop="expirationDate" width="150" header-align="center" align="center" label="失效日期"></el-table-column>
<el-table-column prop="locationId" width="100" header-align="center" align="center" label="库位"></el-table-column>
<el-table-column prop="createBy" width="100" header-align="center" label="Created By"></el-table-column>
<el-table-column prop="createTime" width="150" header-align="center" align="center" label="Created Time"></el-table-column>
</el-table> </el-table>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="height: 20px"></el-footer>
</el-dialog>
<el-dialog title="最终出库" :visible.sync="endOpen" v-drag :close-on-click-modal="false" append-to-body width="800px">
<el-form :model="endForm" label-width="100px" label-position="top" >
<el-row :gutter="10">
<el-col :span="4">
<el-form-item label="仓库">
<el-select v-model="endForm.warehouseId" placeholder="请选择仓库">
<el-option value="材料" label="材料"></el-option>
<el-option value="成品" label="成品"></el-option>
<el-option value="车间" label="车间"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="出库日期">
<el-date-picker
style="width: 100%"
v-model="endForm.shipmentDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" :offset="12">
<el-form-item label=" ">
<div style="float: right;"><el-button type="primary" >最终出库</el-button></div>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="24">
<el-form-item label="已扫描信息汇总">
<el-table :data="endDataList" border :height="200">
<el-table-column prop="partNo" min-width="100" header-align="center" label="物料编码"></el-table-column>
<el-table-column prop="partDesc" min-width="200" header-align="center" label="物料描述"></el-table-column>
<el-table-column prop="total" min-width="100" header-align="center" align="right" label="总数量"></el-table-column>
<el-table-column prop="totalBox" min-width="100" header-align="center" align="right" label="总箱数"></el-table-column>
<el-table-column prop="totalRoll" min-width="100" header-align="center" align="right" label="总卷数"></el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="height: 20px"></el-footer>
</el-dialog>
</div> </div>
</template> </template>
<style scoped> <style scoped>
/deep/ .el-form-item--medium .el-form-item__content{
height: auto;
}
</style> </style>

527
src/views/modules/material/finalRollSearch.vue

@ -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>
Loading…
Cancel
Save