删除操作记录IP展示 供应商出入库记录修改

This commit is contained in:
魏啾 2024-11-28 14:04:43 +08:00
parent 4218084ebf
commit b5cd694baf
3 changed files with 67 additions and 35 deletions

View File

@ -123,13 +123,14 @@
<div class="tips" style="font-size: 16px;">原价
<!-- {{ scope.row.costPrice }}/{{ scope.row.conUnit }} -->
{{ !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.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.conUnitTwo ?
((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 }}
/
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
scope.row.conUnit) : scope.row.unit }}
@ -154,13 +155,13 @@
controls-position="right"
@change="consCountTotal($event, scope.row, 'stockNumber')"></el-input-number>
<div class="tips" style="font-size: 16px;">入库前
{{ !scope.row.unit ?
(scope.row.defaultUnit ?
scope.row.defaultUnit== scope.row.conUnitTwo?
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number:scope.row.number)
: scope.row.unit== scope.row.conUnitTwo?
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number}}
{{ !scope.row.unit ?
(scope.row.defaultUnit ?
scope.row.defaultUnit == scope.row.conUnitTwo ?
(scope.row.number / scope.row.conUnitTwoConvert) : scope.row.number : scope.row.number)
: scope.row.unit == scope.row.conUnitTwo ?
(scope.row.number / scope.row.conUnitTwoConvert) : scope.row.number }}
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
scope.row.conUnit) : scope.row.unit }}
</div>
@ -343,6 +344,17 @@ export default {
mounted() {
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]
}
},
methods: {
async querySearchAsync(queryString, cb) {//
@ -556,6 +568,7 @@ export default {
},
//
selectConsumable(res) {
console.log(res)
let arr = res.map(item => {
item.number = formatDecimal(item.stockNumber - item.stockConsume, 2, true)
item.stockNumber = 0

View File

@ -126,8 +126,8 @@
<el-button type="text" size="mini" round @click="Uppop(scope.row.id)">付款</el-button>
<el-button type="text" size="mini"
@click="typedialogshowsumbit(scope.row.id)">账单付款记录</el-button>
<el-button type="text" size="mini" @click="stockData.size = 10,
stockData.page = 0, gettbConsInfoFlowstock(scope.row)">出入库记录</el-button>
<el-button type="text" size="mini" @click="stockData.size = 10,
stockData.page = 0, gettbConsInfoFlowstock(scope.row)">货单记录</el-button>
</template>
</el-table-column>
</el-table>
@ -175,10 +175,10 @@
</el-table>
</el-dialog>
<!--入库记录 -->
<el-dialog title="出入库记录" :visible.sync="variabilityshow" width="75%">
<el-dialog title="货单记录" :visible.sync="variabilityshow" width="75%">
<div class="head-container">
<el-table ref="table" :data="stockData.data" v-loading="stockData.loading" row-key="id" height="450">
<el-table-column label="类型" prop="type">
<!-- <el-table-column label="类型" prop="type">
<template v-slot="scope">
{{ scope.row.type == 'reject' ? '退货出库' : '供应商入库' }}
</template>
@ -194,16 +194,23 @@
<template v-slot="scope">
{{ dayjs(scope.row.stockTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="耗材" prop="name" />
<el-table-column label="单价" prop="price" />
<el-table-column label="数量" prop="stockNumber" />
<el-table-column label="单位" prop="unit" />
</el-table>
</div>
<div class="head-container">
<el-pagination :total="stockData.total" :current-page="stockData.page + 1" :page-size="stockData.size"
<div class="head-container" style="display: flex; justify-content: space-between; align-items: center;">
<!-- <el-pagination :total="stockData.total" :current-page="stockData.page + 1" :page-size="stockData.size"
layout="total, sizes, prev, pager, next, jumper" @current-change="wstockChange" @size-change="(e) => {
stockData.size = e;
stockData.page = 0;
gettbConsInfoFlowstock();
}" />
}" /> -->
<div></div>
<div style="color: #43a9fe;" @click="func()">转出库单</div>
</div>
</el-dialog>
</div>
@ -315,6 +322,7 @@ export default {
total: 0,
id: ''
},
consdata: []//
}
},
filters: {
@ -463,29 +471,40 @@ export default {
this.stockData.page = e - 1;
this.gettbConsInfoFlowstock();
},
func() {
this.$router.push({
name: 'operation_in',
query: {
consdata: this.consdata
}
})
},
async gettbConsInfoFlowstock(item) {
console.log(item)
if (item) {
this.stockData.id = item.id
this.consdata = item.cons
this.stockData.data = item.conFlows
}
this.variabilityshow = true
this.stockData.loading = true;
// this.stockData.loading = true;
let arr = []
// if (this.query.createdAt.length) {
// arr = [this.query.createdAt[0] + ' 00:00:00', this.query.createdAt[1] + ' 23:59:59']
// } else {
// arr = []
// }
let res = await tbProductStockOperatepage({
page: this.stockData.page,
size: this.stockData.size,
shopId: localStorage.getItem("shopId"),
type: ["cons_in", "cons_out"],//id
purveyorId: this.stockData.id,//
createdAt: arr//id
})
this.stockData.loading = false;
this.stockData.data = res.content;
this.stockData.total = res.totalElements;
// let res = await tbProductStockOperatepage({
// page: this.stockData.page,
// size: this.stockData.size,
// shopId: localStorage.getItem("shopId"),
// type: ["cons_in", "cons_out"],//id
// purveyorId: this.stockData.id,//
// createdAt: arr//id
// })
// this.stockData.loading = false;
// this.stockData.data = res.content;
// this.stockData.total = res.totalElements;
},
}
}

View File

@ -31,7 +31,7 @@
</template>
</el-table-column>
<el-table-column prop="username" label="用户名" />
<el-table-column prop="requestIp" label="IP" />
<!-- <el-table-column prop="requestIp" label="IP" /> -->
<el-table-column :show-overflow-tooltip="true" prop="address" label="IP来源" />
<el-table-column prop="description" label="描述" />
<el-table-column prop="browser" label="浏览器" />