Merge branch 'dwb' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management

This commit is contained in:
gyq 2024-06-21 17:43:45 +08:00
commit d53314b523
4 changed files with 29 additions and 3 deletions

View File

@ -81,6 +81,16 @@
{{ scope.row.cash }} {{ scope.row.cash }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="充值金额" prop="cash">
<template v-slot="scope">
{{ scope.row.recharge }}
</template>
</el-table-column>
<el-table-column label="退款金额" prop="cash">
<template v-slot="scope">
{{ scope.row.refund }}
</template>
</el-table-column>
</el-table> </el-table>
<el-table :data="tableData.data" v-loading="tableData.loading" v-if="orderType == 2"> <el-table :data="tableData.data" v-loading="tableData.loading" v-if="orderType == 2">
<el-table-column label="商品名称" prop="productName"></el-table-column> <el-table-column label="商品名称" prop="productName"></el-table-column>

View File

@ -9,7 +9,7 @@
<el-option label="其他出库" value="other-out"></el-option> <el-option label="其他出库" value="other-out"></el-option>
</el-select> </el-select>
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="" start-placeholder="开始日期" <el-date-picker v-model="query.createdAt" type="daterange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss"> end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker> </el-date-picker>
<el-button type="primary" @click="getTableData">查询</el-button> <el-button type="primary" @click="getTableData">查询</el-button>
<el-button @click="resetHandle">重置</el-button> <el-button @click="resetHandle">重置</el-button>
@ -38,7 +38,7 @@
</el-table-column> </el-table-column>
<el-table-column label="剩余库存"> <el-table-column label="剩余库存">
<template v-slot="scope"> <template v-slot="scope">
{{ scope.row.leftNumber - scope.row.stockNumber }} {{ scope.row.unitName }} {{ scope.row.leftNumber + scope.row.stockNumber }} {{ scope.row.unitName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作时间" prop="updatedAt"> <el-table-column label="操作时间" prop="updatedAt">
@ -81,6 +81,13 @@ export default {
methods: { methods: {
async getTableData() { async getTableData() {
this.tableData.loading = true this.tableData.loading = true
console.log(this.query.createdAt, '调试111')
let arr = []
if (this.query.createdAt.length) {
arr = [this.query.createdAt[0] + ' 00:00:00', this.query.createdAt[1] + ' 23:59:59']
} else {
arr = []
}
try { try {
const res = await tbProductStockDetail({ const res = await tbProductStockDetail({
page: this.tableData.page, page: this.tableData.page,
@ -89,7 +96,7 @@ export default {
shopId: localStorage.getItem('shopId'), shopId: localStorage.getItem('shopId'),
productId: this.goods.proId, productId: this.goods.proId,
type: this.query.type, type: this.query.type,
createdAt: this.query.createdAt createdAt: arr
}) })
this.tableData.loading = false this.tableData.loading = false
this.tableData.list = res.content this.tableData.list = res.content
@ -109,6 +116,8 @@ export default {
this.query.blurry = '' this.query.blurry = ''
this.tableData.page = 0 this.tableData.page = 0
this.tableData.list = [] this.tableData.list = []
this.query.type = ''
this.query.createdAt = []
this.getTableData() this.getTableData()
}, },
async show(obj) { async show(obj) {

View File

@ -7,6 +7,7 @@
<el-table :data="tableData.detail.stockSnap" v-loading="tableData.loading" height="400px"> <el-table :data="tableData.detail.stockSnap" v-loading="tableData.loading" height="400px">
<el-table-column :label="`商品名称`" prop="name"></el-table-column> <el-table-column :label="`商品名称`" prop="name"></el-table-column>
<el-table-column label="规格" prop="specSnap"></el-table-column> <el-table-column label="规格" prop="specSnap"></el-table-column>
<el-table-column label="原库存" prop="stockNumber"></el-table-column>
<el-table-column label="变动数量" prop="number"> <el-table-column label="变动数量" prop="number">
<template v-slot="scope"> <template v-slot="scope">
{{ scope.row.number }} {{ scope.row.unitName }} {{ scope.row.number }} {{ scope.row.unitName }}

View File

@ -41,11 +41,17 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" prop="number">
<template v-slot="scope">
{{scope.row.specSnap }}
</template>
</el-table-column>
<el-table-column label="库存" prop="number"> <el-table-column label="库存" prop="number">
<template v-slot="scope"> <template v-slot="scope">
{{ `${scope.row.number} ${scope.row.unitName}` }} {{ `${scope.row.number} ${scope.row.unitName}` }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存开关"> <el-table-column label="库存开关">
<template v-slot="scope"> <template v-slot="scope">
<el-switch v-model="scope.row.isStock" :active-value="1" :inactive-value="0" <el-switch v-model="scope.row.isStock" :active-value="1" :inactive-value="0"