优化进销存
This commit is contained in:
parent
7605011b63
commit
eba0939005
|
|
@ -4,8 +4,8 @@ ENV = 'development'
|
|||
# VUE_APP_BASE_API = 'http://192.168.2.17:8000'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.42:8000'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.133:8000'
|
||||
VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
|
||||
# VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
|
||||
# VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
|
||||
VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.96:8000'
|
||||
VUE_APP_WS_API = 'ws://192.168.2.128:8000'
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
<el-dialog title="详情记录" width="80%" :visible.sync="dialogVisible" @close="dialogVisible = false">
|
||||
<div class="head-container">
|
||||
<el-select v-model="query.type" placeholder="选择类型">
|
||||
<el-option :label="item.label" :value="item.value" v-for="item in typeList" :key="item.id"></el-option>
|
||||
<el-option label="供应商入库" value="purveyor"></el-option>
|
||||
<el-option label="供应商退货" value="reject"></el-option>
|
||||
<el-option label="其他入库" value="purchase"></el-option>
|
||||
<el-option label="其他出库" value="other-out"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss">
|
||||
|
|
@ -21,16 +24,16 @@
|
|||
</div>
|
||||
<div class="head-container">
|
||||
<el-table :data="tableData.list" v-loading="tableData.loading">
|
||||
<el-table-column label="变动数量" prop="stockNumber">
|
||||
<template v-slot="scope">
|
||||
<span class="num" :class="{ active: scope.row.stockNumber > 0 }">{{ scope.row.stockNumber }} {{
|
||||
scope.row.unitName
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型">
|
||||
<template v-slot="scope">
|
||||
<el-tag type="info">{{ scope.row.tagName }}</el-tag>
|
||||
<el-tag type="info">{{ scope.row.type }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动数量" prop="stockNumber">
|
||||
<template v-slot="scope">
|
||||
<span class="num" :class="{ active: scope.row.stockNumber > 0 }">
|
||||
{{ scope.row.stockNumber }} {{ scope.row.unitName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="剩余库存">
|
||||
|
|
@ -52,7 +55,7 @@
|
|||
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
import { dictDetail, tbProductStockDetail, tbProductStockDetailSum } from '@/api/invoicing'
|
||||
import { tbProductStockDetail, tbProductStockDetailSum } from '@/api/invoicing'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -84,15 +87,12 @@ export default {
|
|||
size: this.tableData.size,
|
||||
sort: this.tableData.sort,
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
productId: this.goods.id,
|
||||
productId: this.goods.proId,
|
||||
type: this.query.type,
|
||||
createdAt: this.query.createdAt
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.list = res.content.map(item => {
|
||||
item.tagName = this.typeList.find(val => val.value == item.type).label
|
||||
return item
|
||||
})
|
||||
this.tableData.list = res.content
|
||||
console.log(this.tableData.list)
|
||||
this.tableData.total = res.totalElements
|
||||
} catch (error) {
|
||||
|
|
@ -115,31 +115,18 @@ export default {
|
|||
this.dialogVisible = true
|
||||
this.goods = obj
|
||||
this.tbProductStockDetailSum()
|
||||
await this.dictDetail()
|
||||
await this.getTableData()
|
||||
},
|
||||
async tbProductStockDetailSum() {
|
||||
try {
|
||||
const { exchange } = await tbProductStockDetailSum({
|
||||
productId: this.goods.id
|
||||
productId: this.goods.proId
|
||||
})
|
||||
this.exchange = exchange
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async dictDetail() {
|
||||
try {
|
||||
const res = await dictDetail({
|
||||
dictName: 'product_stock_type',
|
||||
page: 0,
|
||||
size: 100
|
||||
})
|
||||
this.typeList = res.content
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@
|
|||
<div class="head-container">
|
||||
<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="specSnap"></el-table-column>
|
||||
<el-table-column label="变动数量" prop="number">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.number }}{{ scope.row.unitName }}
|
||||
{{ scope.row.number }} {{ scope.row.unitName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@
|
|||
<div class="row">
|
||||
<el-input v-model="query.name" size="small" clearable placeholder="商品名称"
|
||||
@keyup.enter.native="getTableData" />
|
||||
<el-select v-model="query.isStock" placeholder="库存开关">
|
||||
<el-option label="开" :value="1">开</el-option>
|
||||
<el-option label="关" :value="0">关</el-option>
|
||||
</el-select>
|
||||
<el-input v-model="query.num" placeholder="库存数量:少于多少xx" />
|
||||
<div style="width: 300px;">
|
||||
<el-select v-model="query.isStock" placeholder="库存开关" style="width: 100%;">
|
||||
<el-option label="开" :value="1">开</el-option>
|
||||
<el-option label="关" :value="0">关</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
</div>
|
||||
|
|
@ -85,7 +88,8 @@ export default {
|
|||
dialogVisible: false,
|
||||
query: {
|
||||
name: '',
|
||||
isStock: ''
|
||||
isStock: '',
|
||||
query: ''
|
||||
},
|
||||
downloadLoading: false,
|
||||
uploadLoading: false,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
{{ scope.row.type }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商名称" prop="purveyorName"></el-table-column>
|
||||
<el-table-column label="商品数量" prop="totalAmount">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.stockSnap.length }}
|
||||
|
|
|
|||
|
|
@ -110,13 +110,13 @@
|
|||
{{ scope.row.paidAt && dayjs(scope.row.paidAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80">
|
||||
<!-- <el-table-column label="操作" width="80">
|
||||
<template v-slot="scope">
|
||||
<router-link :to="{ name: 'purchase_detail', query: { purveyorId: scope.row.purveyorId } }">
|
||||
<el-button type="text" size="mini">查看详情</el-button>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
|
|
|
|||
Loading…
Reference in New Issue