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