This commit is contained in:
parent
e88ef7360a
commit
397832c9fe
|
|
@ -1,7 +1,7 @@
|
|||
ENV = 'development'
|
||||
|
||||
# 接口地址
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.17:8000'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.202:8000'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.42:8000'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.133:8000'
|
||||
# 测试
|
||||
|
|
|
|||
|
|
@ -6,6 +6,11 @@
|
|||
<el-input v-model="query.name" size="small" clearable placeholder="商品名称"
|
||||
@keyup.enter.native="getTableData" />
|
||||
<!-- <el-input v-model="query.num" placeholder="库存数量:少于多少xx" /> -->
|
||||
<div style="width: 300px;">
|
||||
<el-select v-model="query.categoryId" placeholder="商品分类" style="width: 100%;">
|
||||
<el-option :label="item.name" :value="item.id" v-for="item in categorys" :key="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="width: 300px;">
|
||||
<el-select v-model="query.isStock" placeholder="库存开关" style="width: 100%;">
|
||||
<el-option label="开" :value="1">开</el-option>
|
||||
|
|
@ -96,8 +101,9 @@
|
|||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination @size-change="paginationSizeChange" :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
<el-pagination @size-change="paginationSizeChange" :total="tableData.total"
|
||||
:current-page="tableData.page + 1" :page-size="tableData.size" @current-change="paginationChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</div>
|
||||
<invoicingDetail ref="invoicingDetail" />
|
||||
<!-- 导入库存弹窗 -->
|
||||
|
|
@ -123,6 +129,7 @@
|
|||
|
||||
<script>
|
||||
import { stock, stockdownload, stockdoImport, stockStatewarnLine, stockStateChanges, stocks } from '@/api/invoicing'
|
||||
import { tbShopCategoryGet } from '@/api/shop'
|
||||
import settings from '@/settings'
|
||||
import invoicingDetail from './components/invoicingDetail'
|
||||
import AddStockTakin from './components/addStockTakin'
|
||||
|
|
@ -139,10 +146,12 @@ export default {
|
|||
dialogVisible: false,
|
||||
dialogTableVisible: false,
|
||||
montey: "",
|
||||
categorys: [],
|
||||
query: {
|
||||
name: '',
|
||||
isStock: '',
|
||||
num: ''
|
||||
num: '',
|
||||
categoryId: ''
|
||||
},
|
||||
downloadLoading: false,
|
||||
uploadLoading: false,
|
||||
|
|
@ -158,6 +167,7 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.tbShopCategoryGet()
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -277,6 +287,7 @@ export default {
|
|||
name: this.query.name,
|
||||
isStock: this.query.isStock,
|
||||
num: this.query.num,
|
||||
categoryId: this.query.categoryId,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
|
|
@ -287,7 +298,6 @@ export default {
|
|||
element.hasChildren = true
|
||||
} else {
|
||||
element.hasChildren = false
|
||||
|
||||
}
|
||||
});
|
||||
this.warnLine = res.warnLine
|
||||
|
|
@ -297,8 +307,37 @@ export default {
|
|||
console.log(error);
|
||||
}
|
||||
},
|
||||
// 获取商品分类列表
|
||||
async tbShopCategoryGet() {
|
||||
try {
|
||||
const res = await tbShopCategoryGet({
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
page: 0,
|
||||
size: 100,
|
||||
sort: 'id'
|
||||
})
|
||||
let categorys = []
|
||||
for (let item of res.content) {
|
||||
categorys.push({
|
||||
name: `|----${item.name}`,
|
||||
id: item.id
|
||||
})
|
||||
if (item.childrenList.length) {
|
||||
for (let val of item.childrenList) {
|
||||
categorys.push({
|
||||
name: `|----|----${val.name}`,
|
||||
id: val.id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.categorys = categorys
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
// 每页条数改变是回调
|
||||
paginationSizeChange(e){
|
||||
paginationSizeChange(e) {
|
||||
console.log(e);
|
||||
this.tableData.size = e
|
||||
this.getTableData()
|
||||
|
|
|
|||
|
|
@ -300,6 +300,7 @@ export default {
|
|||
this.inTabValue = value
|
||||
this.shopTypesActive = 0
|
||||
this.queryForm.type = type
|
||||
this.resetHandle()
|
||||
},
|
||||
// 计算耗材总价
|
||||
consCountTotal() {
|
||||
|
|
|
|||
|
|
@ -296,6 +296,7 @@ export default {
|
|||
this.inTabValue = value
|
||||
this.shopTypesActive = 0
|
||||
this.queryForm.type = type
|
||||
this.resetHandle()
|
||||
},
|
||||
// 计算耗材总价
|
||||
consCountTotal() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue