更新出库跳转
This commit is contained in:
parent
34f7bfac35
commit
554b0d9bfa
|
|
@ -345,16 +345,16 @@ export default {
|
|||
this.resetForm = { ...this.queryForm }
|
||||
this.tbShopPurveyorGet()
|
||||
console.log(this.$route.query.consdata)
|
||||
if (this.$route.query.consdata) {
|
||||
let arr = this.$route.query.consdata.map(item => {
|
||||
item.number = formatDecimal(item.stockNumber - item.stockConsume, 2, true)
|
||||
item.stockNumber = 0
|
||||
item.costPrice = item.price
|
||||
item.conInfoId = item.id
|
||||
return item
|
||||
})
|
||||
this.tableData.list = [...this.tableData.list, ...arr]
|
||||
}
|
||||
// if (this.$route.query.consdata) {
|
||||
// let arr = this.$route.query.consdata.map(item => {
|
||||
// item.number = formatDecimal(item.stockNumber - item.stockConsume, 2, true)
|
||||
// item.stockNumber = 0
|
||||
// item.costPrice = item.price
|
||||
// item.conInfoId = item.id
|
||||
// return item
|
||||
// })
|
||||
// this.tableData.list = [...this.tableData.list, ...arr]
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
async querySearchAsync(queryString, cb) {//快捷搜索
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@
|
|||
<el-form-item label="供应商">
|
||||
<el-select clearable v-model="queryForm.purveyorId" placeholder="请选择供应商"
|
||||
style="width: 220px;" @change="changeTypeEnum">
|
||||
<el-option :label="item.purveyorName" :value="item.id" v-for="item in purveyorList"
|
||||
:key="item.id"></el-option>
|
||||
<el-option v-for="item in purveyorList" :label="item.purveyorName" :value="item.id" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
{{ queryForm.waitAmount }}
|
||||
</el-form-item>
|
||||
|
|
@ -123,7 +122,8 @@
|
|||
{{ !scope.row.unit ?
|
||||
(scope.row.defaultUnit ?
|
||||
scope.row.defaultUnit == scope.row.conUnitTwo ?
|
||||
((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice:scope.row.costPrice)
|
||||
((scope.row.costPrice * scope.row.conUnitTwoConvert).toFixed(2)) :
|
||||
scope.row.costPrice : scope.row.costPrice)
|
||||
: scope.row.unit == scope.row.conUnitTwo ?
|
||||
((scope.row.costPrice * scope.row.conUnitTwoConvert).toFixed(2)) : scope.row.costPrice }}
|
||||
/
|
||||
|
|
@ -208,7 +208,8 @@
|
|||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||
@change="modifyPrice($event, scope.row, 'number', 'totalAmount')"></el-input-number>
|
||||
<div class="tips" style="font-size: 16px;">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||
<div class="tips" style="font-size: 16px;">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName
|
||||
}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小计">
|
||||
|
|
@ -342,6 +343,18 @@ export default {
|
|||
mounted() {
|
||||
this.resetForm = { ...this.queryForm }
|
||||
this.tbShopPurveyorGet()
|
||||
if (this.$route.query.consdata) {
|
||||
this.queryForm.purveyorId = Number(this.$route.query.purveyorId)//供应商id
|
||||
console.log(this.$route.query.purveyorId)
|
||||
let arr = this.$route.query.consdata.map(item => {
|
||||
item.number = formatDecimal(item.stockNumber - item.stockConsume, 2, true)
|
||||
item.stockNumber = 0
|
||||
item.costPrice = item.price
|
||||
item.conInfoId = item.id
|
||||
return item
|
||||
})
|
||||
this.tableData.list = [...this.tableData.list, ...arr]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async querySearchAsync(queryString, cb) {//快捷搜索
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@
|
|||
gettbConsInfoFlowstock();
|
||||
}" /> -->
|
||||
<div></div>
|
||||
<div style="color: #43a9fe;" @click="func()">转出库单</div>
|
||||
<div v-if="consdata.length != 0" style="color: #43a9fe;" @click="func()">转出库单</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
|
@ -467,26 +467,31 @@ export default {
|
|||
console.log(error)
|
||||
}
|
||||
},
|
||||
wstockChange(e) {
|
||||
this.stockData.page = e - 1;
|
||||
this.gettbConsInfoFlowstock();
|
||||
},
|
||||
// wstockChange(e) {
|
||||
// this.stockData.page = e - 1;
|
||||
// this.gettbConsInfoFlowstock();
|
||||
// },
|
||||
func() {
|
||||
this.$router.push({
|
||||
name: 'operation_in',
|
||||
name: 'operation_out',
|
||||
query: {
|
||||
consdata: this.consdata
|
||||
consdata: this.consdata,
|
||||
purveyorId:this.stockData.purveyorId
|
||||
}
|
||||
})
|
||||
},
|
||||
async gettbConsInfoFlowstock(item) {
|
||||
console.log(item)
|
||||
if (item) {
|
||||
if (item.conFlows) {
|
||||
this.stockData.id = item.id
|
||||
this.stockData.purveyorId = item.purveyorId//供应商id
|
||||
this.consdata = item.cons
|
||||
this.stockData.data = item.conFlows
|
||||
}
|
||||
this.variabilityshow = true
|
||||
}else{
|
||||
this.$message({ message: '暂无数据!' });
|
||||
}
|
||||
|
||||
// this.stockData.loading = true;
|
||||
let arr = []
|
||||
// if (this.query.createdAt.length) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue