采购入库单bug

This commit is contained in:
chenjianan
2019-03-08 11:28:34 +08:00
parent be253d83fd
commit 2ef6915285
2 changed files with 67 additions and 50 deletions

View File

@@ -33,14 +33,14 @@ export function searchInventory() {
})
}
// 入库记录查询
export function searchInbound(data1, data2, data3) {
export function searchInbound(...data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_入库记录_采购部查询',
param: '采购合同流水号=' + data1 + '&到货时间=' + data2 + '&仓库流水号=' + data3
param: `采购合同流水号_check=${data[0]}&采购合同流水号=${data[1]}&到货时间_check=${data[2]}&到货开始时间=${data[3]}&到货结束时间=${data[4]}&仓库流水号_check=${data[5]}&仓库流水号=${data[6]}`
}
})
}

View File

@@ -11,14 +11,21 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span class="demonstration">入库日期</span>
<span class="demonstration">到货时间</span>
<el-date-picker
v-model="InboundDate"
v-model="InboundStartDate"
type="date"
size="small"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
placeholder="选择开始日期"/>&nbsp;~
<el-date-picker
v-model="InboundEndDate"
type="date"
size="small"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择结束日期"/>
<span>仓库:</span>
<el-select v-model="InventoryValue" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
@@ -44,37 +51,42 @@
align="center"
type="index"
width="50"/>
<el-table-column label="存货名称" align="center" min-width="80">
<el-table-column label="到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="存货名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="80">
<el-table-column label="物料规格" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="80">
<el-table-column label="物料型号" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="80">
<el-table-column label="零件图号" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<el-table-column label="数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="80">
<el-table-column label="本币单价" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="本币总价" align="center" min-width="80">
<el-table-column label="本币总价" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.单价 * scope.row.实际到货数量 }}
</template>
@@ -164,35 +176,25 @@
</el-card>
</el-tab-pane>
</el-tabs>
<el-card>
<span style="margin: 5px">入库单编号</span>
<span>入库单编号</span>
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchInboundCard1()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="addCard()">创建</el-button>
<el-button size="small" type="primary" icon="el-icon-arrow-down" style="margin: 0 0 0 10px" @click="InboundCardDetail()">选入</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading3"
:data="tableData3"
border
style="width: 100%;"
size="mini"
height="200"
@row-click = "searchDetail">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="入库单号" align="center" min-width="100">
<el-table v-loading="listLoading3" :data="tableData3" border style="width: 100%;" size="mini" height="200" highlight-current-row @row-click="searchDetail">
<el-table-column label="入库单号" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
</template>
</el-table-column>
<el-table-column label="入库日期" align="center" min-width="100" >
<template slot-scope="scope" value-format="yyyy-MM-dd">
{{ scope.row.入库日期 }}
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
@@ -200,7 +202,7 @@
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" min-width="100">
<el-table-column label="合同编号" align="center" min-width="160">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
@@ -212,7 +214,7 @@
</el-table-column>
<el-table-column label="到货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货日期 }}
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="业务号" align="center" min-width="60">
@@ -220,7 +222,7 @@
{{ scope.row.业务号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="100">
<el-table-column label="供应商" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -230,17 +232,17 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="业务类型" align="center" min-width="100">
<el-table-column label="业务类型" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.业务类型 }}
</template>
</el-table-column>
<el-table-column label="采购类型" align="center" min-width="80">
<el-table-column label="采购类型" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.采购类型 }}
</template>
</el-table-column>
<el-table-column label="入库类别" align="center" min-width="80">
<el-table-column label="入库类别" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.入库类别 }}
</template>
@@ -268,16 +270,7 @@
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table
v-loading="listLoading4"
id = "cardDetail"
:data="tableData4"
:summary-method="calculateContractSum"
:show-summary="true"
border
style="width: 100%;"
size="mini"
height="200">
<el-table v-loading="listLoading4" id="cardDetail" :data="tableData4" :summary-method="calculateContractSum" :show-summary="true" border style="width: 100%;" size="mini" height="200">
<el-table-column
label="序号"
align="center"
@@ -303,28 +296,29 @@
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<el-table-column label="数量" align="center" width="100" prop="数量">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="100">
<el-table-column label="本币单价" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.本币单价 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" min-width="100" prop="sum">
<el-table-column label="本币金额" align="center" width="100" prop="sum">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="80">
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="scope.row.是否出库" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropCarddetail(scope.row)">删除</el-button>
<el-button :disabled="scope.row.是否出库" size="mini" type="danger" icon="el-icon-delete" @click="dropCarddetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisibleExport" center style="min-height: 300px" width="60%">
<el-card>
<div id="print">
@@ -433,6 +427,7 @@
<el-button type="primary" size="small" @click="printCard">打印</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible1" title="增加采购入库单" center style="min-height: 300px" width="700px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px">
<el-row>
@@ -526,6 +521,7 @@
<el-button type="primary" size="small" @click="submitCard('form')">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible2" title="修改采购入库单" center style="min-height: 300px" width="700px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px">
<el-row>
@@ -636,6 +632,8 @@ export default {
ShopContractValue: '', // 车间采购合同流水号
Inventory: [],
InventoryValue: '',
InboundStartDate: '',
InboundEndDate: '',
InboundDate: '',
listLoading: '',
tableData: [],
@@ -701,6 +699,7 @@ export default {
created() {
this.searchContractData()
this.searchInventoryData()
this.searchInboundCard1()
},
methods: {
searchContractData() { // 查询合同
@@ -743,7 +742,11 @@ export default {
searchPartinfo() {
this.tableData = []
this.listLoading = true
searchInbound(this.ContractValue, this.InboundDate, this.InventoryValue).then(response => {
let check1, check2, check3
this.ContractValue ? check1 = 1 : check1 = 0
this.InboundStartDate && this.InboundEndDate ? check2 = 1 : (check2 = 0, this.InboundStartDate = null, this.InboundEndDate = null)
this.InventoryValue ? check3 = 1 : check3 = 0
searchInbound(check1, this.ContractValue, check2, this.InboundStartDate, this.InboundEndDate, check3, this.InventoryValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].组件零件流水号 === 0) {
response.data[i].物料名称 = response.data[i].零件名称
@@ -786,6 +789,7 @@ export default {
addInboundCard(this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchInboundCard1()
this.dialogVisible1 = false
} else {
this.$message.error('增加失败')
@@ -867,6 +871,7 @@ export default {
editInboundCard(this.DetailNumber, this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.searchInboundCard1()
this.dialogVisible2 = false
} else {
this.$message.error('修改失败')
@@ -1035,6 +1040,18 @@ export default {
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}