删除操作记录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

@ -125,10 +125,11 @@
{{ !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 }}
@ -156,10 +157,10 @@
<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 }}
@ -343,6 +344,17 @@ export default {
mounted() { mounted() {
this.resetForm = { ...this.queryForm } this.resetForm = { ...this.queryForm }
this.tbShopPurveyorGet() 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: { methods: {
async querySearchAsync(queryString, cb) {// async querySearchAsync(queryString, cb) {//
@ -556,6 +568,7 @@ export default {
}, },
// //
selectConsumable(res) { selectConsumable(res) {
console.log(res)
let arr = res.map(item => { let arr = res.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

View File

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

View File

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