4 changed files with 1519 additions and 10 deletions
-
17src/api/material/issureSo.js
-
543src/views/modules/material/com_issureSo_add_or_update.vue
-
21src/views/modules/material/com_poReceiving_add_or_update.vue
-
948src/views/modules/material/issureSo.vue
@ -0,0 +1,17 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
export const searchTransHeader = data => createAPI(`/issureSo/searchTransHeader`,'post',data) |
|||
|
|||
export const searchTransDetail = data => createAPI(`/issureSo/searchTransDetail`,'post',data) |
|||
|
|||
export const searchTransDetailSub = data => createAPI(`/issureSo/searchTransDetailSub`,'post',data) |
|||
|
|||
|
|||
export const getWareHouseList = data => createAPI(`/issureSo/getWareHouseList`,'post',data) |
|||
export const saveTransHeaderData= data => createAPI(`/issureSo/saveTransHeaderData`,'post',data) |
|||
|
|||
export const searchTransDetailAndSubCach= data => createAPI(`/issureSo/searchTransDetailAndSubCach`,'post',data) |
|||
export const createNewCachRoll= data => createAPI(`/issureSo/createNewCachRoll`,'post',data) |
|||
export const finalSaveTransHeaderDetail= data => createAPI(`/issureSo/finalSaveTransHeaderDetail`,'post',data) |
|||
export const deleteSubCach= data => createAPI(`/issureSo/deleteSubCach`,'post',data) |
|||
export const deleteTransHeaderData= data => createAPI(`/issureSo/deleteTransHeaderData`,'post',data) |
|||
@ -0,0 +1,543 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-dialog |
|||
width="40%" |
|||
title="发料单明细" |
|||
:close-on-click-modal="false" |
|||
:visible.sync="visible" |
|||
@close="closeSaveDialog"> |
|||
<el-form ref="saveForm" :model="dataForm" label-position="top" label-width="100px" > |
|||
<el-row :gutter="25"> |
|||
<el-col :span="6"> |
|||
<el-form-item label="发料单号"> |
|||
<el-input v-model="dataForm.transNo" disabled ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="6">--> |
|||
<!-- <el-form-item label="供应商编码">--> |
|||
<!-- <el-input v-model="dataForm.partnerID" disabled ></el-input>--> |
|||
<!-- </el-form-item>--> |
|||
<!-- </el-col>--> |
|||
<!-- <el-col :span="6">--> |
|||
<!-- <el-form-item label="供应商名称">--> |
|||
<!-- <el-input v-model="dataForm.partnerName" disabled ></el-input>--> |
|||
<!-- </el-form-item>--> |
|||
<!-- </el-col>--> |
|||
<el-col :span="6"> |
|||
<el-form-item label=" "> |
|||
<el-button type="primary" @click="visible = false">关闭</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="25"> |
|||
<el-col :span="6"> |
|||
<el-form-item label="仓库"> |
|||
<el-input v-model="dataForm.warehouseID" disabled ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="发料日期"> |
|||
<el-date-picker |
|||
style="width: 120px" |
|||
v-model="dataForm.transDate" |
|||
type="date" |
|||
disabled |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="经手人"> |
|||
<el-input v-model="dataForm.receiverName" disabled ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="生产订单"> |
|||
<el-input v-model="dataForm.orderRef1" disabled ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="25"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="请扫描标签"> |
|||
<el-input v-model="dataForm.scanSerialNo" ref="scan" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label=" "> |
|||
<el-button type="primary" @click="dataFormSubmit()">{{'最终出库'}}</el-button> |
|||
<!-- <el-button type="primary" @click="visible = false">{{'关闭'}}</el-button>--> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<el-table |
|||
:data="dataList" |
|||
height="300" |
|||
border |
|||
v-loading="false" |
|||
style="width: 100%; "> |
|||
<el-table-column |
|||
header-align="center" |
|||
align="center" |
|||
width="60" |
|||
fixed="left" |
|||
label="操作"> |
|||
<template slot-scope="scope"> |
|||
<a type="text" size="small" @click="deleteCach(scope.row)">删除</a> |
|||
</template> |
|||
</el-table-column> |
|||
<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> |
|||
</el-dialog> |
|||
|
|||
|
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
|
|||
} from "@/api/base/normalSearch.js" |
|||
import { |
|||
searchTransDetailAndSubCach |
|||
,createNewCachRoll |
|||
,finalSaveTransHeaderDetail |
|||
,deleteSubCach |
|||
|
|||
} from "@/api/material/poReceive.js" |
|||
import Chooselist from '@/views/modules/common/Chooselist' |
|||
import {searchTransDetail} from "../../../api/material/poReceive"; |
|||
export default { |
|||
model:{ |
|||
prop:'value', |
|||
event:'change', |
|||
}, |
|||
props:{ |
|||
value:{ |
|||
required:true, |
|||
type:String, |
|||
} |
|||
}, |
|||
components: { |
|||
Chooselist |
|||
}, |
|||
data () { |
|||
return { |
|||
tagNo:'', |
|||
tagNo1:'', |
|||
visible: false, |
|||
dataForm: { |
|||
site:this.$store.state.user.site, |
|||
warehouseID:'', |
|||
transNo:'', |
|||
transDate:'', |
|||
receiverName:'', |
|||
receiver:'', |
|||
scanSerialNo:'', |
|||
orderRef1:'', |
|||
}, |
|||
scanModalFlag:false, |
|||
rollData:{ |
|||
perQty:'', |
|||
rollNumber:'', |
|||
}, |
|||
dataList:[], |
|||
scanSerial:'', |
|||
columnList:[ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table4PartNo', |
|||
tableId: "200002Table4", |
|||
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: 200002, |
|||
serialNumber: '200002Table4PartDesc', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "partDesc", |
|||
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: 200002, |
|||
serialNumber: '200002Table4RollNo', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "rollNo", |
|||
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: 200002, |
|||
serialNumber: '200002Table4RollQty', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "rollQty", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "数量", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 60 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table4BatchNo', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "batchNo", |
|||
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: 200002, |
|||
serialNumber: '200002Table4WdrNo', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "wdrNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "W/D/R", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table4ManufactureDate', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "manufactureDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "生产日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table4ExpiredDate', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "expiredDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "失效日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table4LocationID', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "locationID", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "库位", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 70 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table4EnterByName', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "enterByName", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Created", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table4EnterDate', |
|||
tableId: "200002Table4", |
|||
tableName: "发料单已扫卷", |
|||
columnProp: "enterDate", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Created Time", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 130 |
|||
}, |
|||
], |
|||
|
|||
} |
|||
}, |
|||
created () { |
|||
|
|||
}, |
|||
methods: { |
|||
// 获取基础数据列表S |
|||
getBaseList (val, type) { |
|||
this.tagNo = val |
|||
this.tagNo1 = type |
|||
this.$nextTick(() => { |
|||
let strVal = '' |
|||
if (val === 133) { |
|||
if(type==1) { |
|||
strVal = this.dataForm.partNo |
|||
} |
|||
} |
|||
|
|||
this.$refs.baseList.init(val, strVal) |
|||
}) |
|||
}, |
|||
/* 列表方法的回调 */ |
|||
getBaseData (val) { |
|||
if (this.tagNo === 133) { |
|||
if(this.tagNo1==1) { |
|||
this.dataForm.partNo = val.part_no |
|||
this.dataForm.partDesc = val.part_desc |
|||
} |
|||
} |
|||
|
|||
}, |
|||
init (row) { |
|||
this.rollData={ |
|||
perQty:'', |
|||
rollNumber:'', |
|||
} |
|||
this.cleanData() |
|||
searchTransDetailAndSubCach(row).then(({data})=>{ |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
let dataRow= data.row |
|||
this.dataList = data.rows |
|||
this.dataForm={ |
|||
site:dataRow.site, |
|||
warehouseID:data.row.warehouseID, |
|||
transNo:dataRow.transNo, |
|||
transDate:dataRow.transDate, |
|||
receiverName:dataRow.receiverName, |
|||
orderRef1:dataRow.orderRef1, |
|||
scanSerialNo:'', |
|||
} |
|||
this.visible = true |
|||
this.$nextTick(() => { this.$refs.scan.focus();}) |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}, |
|||
createNewRoll(){ |
|||
if(this.dataForm.partNo===''){ |
|||
this.$alert('请输入物料!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.dataForm.locationId===''){ |
|||
this.$alert('请选择库位!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.dataForm.batchNo===''){ |
|||
this.$alert('请输入批号!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.dataForm.manufactureDate===''){ |
|||
this.$alert('请选择生产日期!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.dataForm.expiredDate===''){ |
|||
this.$alert('请选择失效日期!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.rollData.perQty===''){ |
|||
this.$alert('请输入每卷数量!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.rollData.rollNumber===''){ |
|||
this.$alert('请输入卷数量!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.rollData.rollNumber>10000){ |
|||
this.$alert('卷数量超过一万!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
let inData={ |
|||
site:this.dataForm.site, |
|||
transNo:this.dataForm.transNo, |
|||
partNo:this.dataForm.partNo, |
|||
rollNo:'', |
|||
rollQty:this.rollData.perQty, |
|||
batchNo:this.dataForm.batchNo, |
|||
wdrNo:this.dataForm.wdrNo, |
|||
locationID:this.dataForm.locationId, |
|||
manufactureDate:this.dataForm.manufactureDate, |
|||
expiredDate:this.dataForm.expiredDate, |
|||
rollNumber:this.rollData.rollNumber, |
|||
|
|||
} |
|||
createNewCachRoll(inData).then(({data})=>{ |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.$message.success( '操作成功') |
|||
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
|||
this.dataList = data.rows |
|||
}) |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 表单提交 |
|||
dataFormSubmit () { |
|||
finalSaveTransHeaderDetail(this.dataForm).then(({data})=>{ |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.$message.success( '操作成功') |
|||
this.visible = false |
|||
this.$emit('refreshDataList') |
|||
|
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}, |
|||
closeSaveDialog(){ |
|||
this.cleanData() |
|||
}, |
|||
cleanData(){ |
|||
for (var prop in this.dataForm) { |
|||
if (this.dataForm.hasOwnProperty(prop)) { |
|||
this.dataForm[prop] = ''; |
|||
} |
|||
} |
|||
}, |
|||
deleteCach(row){ |
|||
this.$confirm('确定要删除这条数据?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
deleteSubCach(row).then(({data}) => { |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.$message.success( '操作成功') |
|||
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
|||
this.dataList = data.rows |
|||
}) |
|||
} else { |
|||
|
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style > |
|||
|
|||
|
|||
</style> |
|||
@ -0,0 +1,948 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|||
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|||
<el-form-item :label="'生产订单'"> |
|||
<el-input v-model="searchData.orderRef1" style="width: 120px"></el-input> |
|||
</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 style="margin-top: 23px;"> |
|||
<label style="margin-left: 0px;font-size: 19px">➞</label> |
|||
</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> |
|||
<el-button type="primary" @click="addModal()">新增</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-form> |
|||
<el-table |
|||
:data="dataList" |
|||
@row-click="changeData" |
|||
:height="height" |
|||
border |
|||
highlight-current-row |
|||
ref="mainTable" |
|||
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="150" |
|||
fixed="left" |
|||
label="操作"> |
|||
<template slot-scope="scope"> |
|||
<a type="text" size="small" @click="updateModel(scope.row)">编辑</a> |
|||
<a type="text" size="small" @click="deleteData(scope.row)">删除</a> |
|||
<a type="text" size="small" @click="scanRoll(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> |
|||
|
|||
|
|||
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick"> |
|||
<el-tab-pane label="明细" name="detail"> |
|||
<el-table |
|||
:data="dataList2" |
|||
:height="height" |
|||
border |
|||
v-loading="dataListLoading" |
|||
style="width: 100%; "> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList2" :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-tab-pane> |
|||
<el-tab-pane label="卷明细" name="sub"> |
|||
<el-table |
|||
:data="dataList3" |
|||
:height="height" |
|||
border |
|||
v-loading="dataListLoading" |
|||
style="width: 100%; "> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList3" :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-tab-pane> |
|||
</el-tabs> |
|||
|
|||
|
|||
<el-dialog title="生产发料-新增" :close-on-click-modal="false" v-drag :visible.sync="modelFlag" width="480px" > |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item label="仓库"> |
|||
<el-select v-model="modelData.warehouseID" style="width: 100%;"> |
|||
<el-option :value="i.wareHouseId" :label="i.wareHouseName" v-for="i in wareHouseList" :key="i.menuId"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="发料日期"> |
|||
<el-date-picker |
|||
style="width: 100%" |
|||
readonly |
|||
v-model="modelData.transDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label=" " > |
|||
<el-checkbox v-model="jumpFlag">保存后直接扫描</el-checkbox> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item label="经手人"> |
|||
<el-input v-model="modelData.receiver" style="width: 204px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="生产订单"> |
|||
<el-input v-model="modelData.orderRef1" style="width: 200px"></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<!-- <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">--> |
|||
<!-- <el-form-item >--> |
|||
<!-- <span slot="label" style="" @click="getBaseList(23,1)" ><a herf="#">供应商编码</a></span>--> |
|||
<!-- <el-input v-model="modelData.supplierId" style="width: 204px"></el-input>--> |
|||
<!-- </el-form-item>--> |
|||
<!-- <el-form-item label="供应商名称">--> |
|||
<!-- <el-input v-model="modelData.supplierName" disabled style="width: 200px"></el-input>--> |
|||
<!-- </el-form-item>--> |
|||
<!-- </el-form>--> |
|||
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|||
<el-button type="primary" @click="saveHeaderData()">保存</el-button> |
|||
<el-button type="primary" @click="modelFlag = false">关闭</el-button> |
|||
</el-footer> |
|||
</el-dialog> |
|||
|
|||
|
|||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="searchTable" v-drag></add-or-update> |
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
searchTransHeader |
|||
,searchTransDetail |
|||
,searchTransDetailSub |
|||
,getWareHouseList |
|||
,saveTransHeaderData |
|||
,deleteTransHeaderData |
|||
} from "@/api/material/issureSo.js" |
|||
import { |
|||
getLocationListForSearch |
|||
} from "@/api/base/normalSearch.js" |
|||
import addOrUpdate from './com_issureSo_add_or_update' |
|||
import Chooselist from '@/views/modules/common/Chooselist' |
|||
export default { |
|||
components: { |
|||
Chooselist |
|||
,addOrUpdate |
|||
}, |
|||
data() { |
|||
return { |
|||
height:200, |
|||
modelFlag:false, |
|||
activeName: 'detail', |
|||
dataList: [], |
|||
dataList2: [], |
|||
dataList3: [], |
|||
addOrUpdateVisible:false, |
|||
searchData: { |
|||
page: 1, |
|||
limit: 100, |
|||
site:this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
orderRef1: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
transTypeDb:'SI', |
|||
}, |
|||
wareHouseList:[], |
|||
jumpFlag:true, |
|||
modelData:{ |
|||
transNo:'', |
|||
site:this.$store.state.user.site, |
|||
transDate:new Date(), |
|||
warehouseID:'', |
|||
receiver:'', |
|||
orderRef1:'', |
|||
supplierId:'', |
|||
supplierName:'', |
|||
enterBy:'', |
|||
}, |
|||
exportList:[], |
|||
pageIndex: 1, |
|||
pageSize: 100, |
|||
totalPage: 0, |
|||
dataListLoading: false, |
|||
currentRow:'', |
|||
headerData:'', |
|||
columnList1:[ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table1TransNo', |
|||
tableId: "200002Table1", |
|||
tableName: "生产发料主表", |
|||
columnProp: "transNo", |
|||
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: 200002, |
|||
serialNumber: '200002Table1TransType', |
|||
tableId: "200002Table1", |
|||
tableName: "生产发料主表", |
|||
columnProp: "transType", |
|||
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: 200002, |
|||
serialNumber: '200002Table1TransDate', |
|||
tableId: "200002Table1", |
|||
tableName: "生产发料主表", |
|||
columnProp: "transDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "发料日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table1WareHouseID', |
|||
tableId: "200002Table1", |
|||
tableName: "生产发料主表", |
|||
columnProp: "warehouseID", |
|||
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: 200002, |
|||
serialNumber: '200002Table1OrderRef1', |
|||
tableId: "200002Table1", |
|||
tableName: "生产发料主表", |
|||
columnProp: "orderRef1", |
|||
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: 200002, |
|||
serialNumber: '200002Table1ReceiverName', |
|||
tableId: "200002Table1", |
|||
tableName: "生产发料主表", |
|||
columnProp: "receiverName", |
|||
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: 200002, |
|||
serialNumber: '200002Table1EnterDate', |
|||
tableId: "200002Table1", |
|||
tableName: "生产发料主表", |
|||
columnProp: "enterDate", |
|||
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: 200002, |
|||
serialNumber: '200002Table1EnterName', |
|||
tableId: "200002Table1", |
|||
tableName: "生产发料主表", |
|||
columnProp: "enterName", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "录入人", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
], |
|||
columnList2:[ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table2PartNo', |
|||
tableId: "200002Table2", |
|||
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: 200002, |
|||
serialNumber: '200002Table2PartDesc', |
|||
tableId: "200002Table2", |
|||
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: 200002, |
|||
serialNumber: '200002Table2TransQty', |
|||
tableId: "200002Table2", |
|||
tableName: "生产发料明细", |
|||
columnProp: "transQty", |
|||
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: 200002, |
|||
serialNumber: '200002Table2BatchNo', |
|||
tableId: "200002Table2", |
|||
tableName: "生产发料明细", |
|||
columnProp: "batchNo", |
|||
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: 200002, |
|||
serialNumber: '200002Table2LocationID', |
|||
tableId: "200002Table2", |
|||
tableName: "生产发料明细", |
|||
columnProp: "locationID", |
|||
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: 200002, |
|||
serialNumber: '200002Table2WdrNo', |
|||
tableId: "200002Table2", |
|||
tableName: "生产发料明细", |
|||
columnProp: "wdrNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "W/D/R", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table2ManufactureDate', |
|||
tableId: "200002Table2", |
|||
tableName: "生产发料明细", |
|||
columnProp: "manufactureDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "生产日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table2ExpiredDate', |
|||
tableId: "200002Table2", |
|||
tableName: "生产发料明细", |
|||
columnProp: "expiredDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "失效日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table2EnterDate', |
|||
tableId: "200002Table2", |
|||
tableName: "生产发料明细", |
|||
columnProp: "enterDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "录入日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table2EnterName', |
|||
tableId: "200002Table2", |
|||
tableName: "生产发料明细", |
|||
columnProp: "enterName", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "录入人", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 70 |
|||
}, |
|||
], |
|||
columnList3:[ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table3RollNo', |
|||
tableId: "200002Table3", |
|||
tableName: "生产发料卷明细", |
|||
columnProp: "rollNo", |
|||
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: 200002, |
|||
serialNumber: '200002Table3RollQty', |
|||
tableId: "200002Table3", |
|||
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: 200002, |
|||
serialNumber: '200002Table3ManufactureDate', |
|||
tableId: "200002Table3", |
|||
tableName: "生产发料卷明细", |
|||
columnProp: "manufactureDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "生产日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table3ExpiredDate', |
|||
tableId: "200002Table3", |
|||
tableName: "生产发料卷明细", |
|||
columnProp: "expiredDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "失效日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
},{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 200002, |
|||
serialNumber: '200002Table3EnterName', |
|||
tableId: "200002Table3", |
|||
tableName: "生产发料卷明细", |
|||
columnProp: "enterName", |
|||
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: 200002, |
|||
serialNumber: '200002Table3EnterDate', |
|||
tableId: "200002Table3", |
|||
tableName: "生产发料卷明细", |
|||
columnProp: "enterDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "录入时间", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
], |
|||
dataRole: { |
|||
partTypeDesc: [ |
|||
{ |
|||
required: true, |
|||
message: ' ', |
|||
trigger: 'change' |
|||
} |
|||
], |
|||
partName: [ |
|||
{ |
|||
required: true, |
|||
message: ' ', |
|||
trigger: 'change' |
|||
} |
|||
], |
|||
}, |
|||
// 导出 start |
|||
exportData: [], |
|||
exportName: '生产发料主表'+this.dayjs().format('YYYYMMDDHHmmss'), |
|||
exportHeader: ["生产发料主表"], |
|||
exportFooter: [], |
|||
// 导出 end |
|||
} |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = (window.innerHeight- 260) / 2 |
|||
|
|||
}) |
|||
}, |
|||
methods: { |
|||
// 获取基础数据列表S |
|||
getBaseList (val, type) { |
|||
this.tagNo = val |
|||
this.tagNo1 = type |
|||
this.$nextTick(() => { |
|||
let strVal = '' |
|||
if (val === 1013) { |
|||
if(type==23) { |
|||
strVal = this.modelData.supplierId |
|||
} |
|||
} |
|||
this.$refs.baseList.init(val, strVal) |
|||
}) |
|||
}, |
|||
/* 列表方法的回调 */ |
|||
getBaseData (val) { |
|||
if (this.tagNo === 23) { |
|||
if(this.tagNo1==1) { |
|||
this.modelData.supplierId = val.SupplierID |
|||
this.modelData.supplierName = val.SupplierName |
|||
} |
|||
} |
|||
}, |
|||
// 每页数 |
|||
sizeChangeHandle (val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.searchTable() |
|||
}, |
|||
// 当前页 |
|||
currentChangeHandle (val) { |
|||
this.pageIndex = val |
|||
this.searchTable() |
|||
}, |
|||
tabClick (tab, event) { |
|||
// 刷新列表数据 |
|||
this.refreshCurrentTabTable() |
|||
}, |
|||
changeData(row){ |
|||
this.currentRow = JSON.parse(JSON.stringify(row)); |
|||
this.headerData=row; |
|||
this.refreshCurrentTabTable (); |
|||
}, |
|||
refreshCurrentTabTable(){ |
|||
if(this.currentRow===''||this.currentRow===null){ |
|||
this.currentRow={site:'',transNo:''} |
|||
} |
|||
if(this.activeName==='detail'){ |
|||
searchTransDetail(this.currentRow).then(({data}) => { |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.dataList2 = data.rows |
|||
|
|||
} else { |
|||
this.dataList2 = []; |
|||
} |
|||
}); |
|||
}else { |
|||
searchTransDetailSub(this.currentRow).then(({data}) => { |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.dataList3 = data.rows |
|||
|
|||
} else { |
|||
this.dataList3 = []; |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
searchTable(){ |
|||
this.searchData.limit = this.pageSize |
|||
this.searchData.page = this.pageIndex |
|||
searchTransHeader(this.searchData).then(({data}) => { |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.dataList = data.page.list |
|||
this.pageIndex = data.page.currPage |
|||
this.pageSize = data.page.pageSize |
|||
this.totalPage = data.page.totalCount |
|||
if(this.dataList.length>0){ |
|||
this.$refs.mainTable.setCurrentRow(this.dataList[0]); |
|||
this.changeData(this.dataList[0]) |
|||
}else { |
|||
this.changeData(null) |
|||
} |
|||
} else { |
|||
this.dataList = []; |
|||
} |
|||
}); |
|||
}, |
|||
addModal(){ |
|||
this.getWareHouseList(); |
|||
setTimeout(() => { |
|||
this.modelData={ |
|||
transNo:"0", |
|||
site:this.$store.state.user.site, |
|||
transDate:new Date(), |
|||
warehouseID:this.wareHouseList.length>0?this.wareHouseList[0].wareHouseId:'', |
|||
receiver:this.$store.state.user.name, |
|||
orderRef1:'', |
|||
supplierId:'', |
|||
supplierName:'', |
|||
enterBy:this.$store.state.user.name, |
|||
}; |
|||
this.modelFlag=true; |
|||
},200) |
|||
}, |
|||
updateModel(row){ |
|||
this.getWareHouseList(); |
|||
this.modelData={ |
|||
transNo:row.transNo, |
|||
site:row.site, |
|||
transDate:row.transDate, |
|||
warehouseID:row.warehouseID, |
|||
receiver:row.receiver, |
|||
orderRef1:row.orderRef1, |
|||
supplierId:row.partnerID, |
|||
supplierName:row.partnerName, |
|||
enterBy:row.userName, |
|||
} |
|||
this.modelFlag=true; |
|||
}, |
|||
deleteData(row){ |
|||
this.$confirm('确定要删除这条数据?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
deleteTransHeaderData(row).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.$message.success( '操作成功') |
|||
this.searchTable(); |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
saveHeaderData(){ |
|||
if(this.modelData.warehouseID===''){ |
|||
this.$alert('请选择仓库!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.modelData.receiver===''){ |
|||
this.$alert('请选择经手人!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
if(this.modelData.transDate===''){ |
|||
this.$alert('请选择发料日期!', '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
return false |
|||
} |
|||
saveTransHeaderData(this.modelData).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
var transNo=data.transNo |
|||
this.$message.success( '操作成功') |
|||
this.modelFlag = false |
|||
this.searchTable() |
|||
if(this.jumpFlag){ |
|||
this.$nextTick(function () { |
|||
setTimeout(() => { |
|||
let data={ |
|||
site:this.$store.state.user.site, |
|||
transNo:transNo, |
|||
} |
|||
this.addOrUpdateVisible = true |
|||
this.$nextTick(() => { |
|||
this.$refs.addOrUpdate.init(data) |
|||
}) |
|||
},500) |
|||
}) |
|||
} |
|||
|
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}, |
|||
getWareHouseList(){ |
|||
getWareHouseList({site:this.$store.state.user.site}).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.wareHouseList=data.rows |
|||
|
|||
} |
|||
}) |
|||
}, |
|||
scanRoll(row){ |
|||
let data={ |
|||
site:row.site, |
|||
transNo:row.transNo, |
|||
} |
|||
this.addOrUpdateVisible = true |
|||
this.$nextTick(() => { |
|||
this.$refs.addOrUpdate.init(data) |
|||
}) |
|||
}, |
|||
//导出excel |
|||
//导出excel |
|||
async createExportData() { |
|||
this.searchData.limit = -1 |
|||
this.searchData.page = 1 |
|||
await searchTransHeader(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