This commit is contained in:
parent
e88ef7360a
commit
397832c9fe
|
|
@ -1,7 +1,7 @@
|
||||||
ENV = 'development'
|
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.42:8000'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.133: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="商品名称"
|
<el-input v-model="query.name" size="small" clearable placeholder="商品名称"
|
||||||
@keyup.enter.native="getTableData" />
|
@keyup.enter.native="getTableData" />
|
||||||
<!-- <el-input v-model="query.num" placeholder="库存数量:少于多少xx" /> -->
|
<!-- <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;">
|
<div style="width: 300px;">
|
||||||
<el-select v-model="query.isStock" placeholder="库存开关" style="width: 100%;">
|
<el-select v-model="query.isStock" placeholder="库存开关" style="width: 100%;">
|
||||||
<el-option label="开" :value="1">开</el-option>
|
<el-option label="开" :value="1">开</el-option>
|
||||||
|
|
@ -96,8 +101,9 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-pagination @size-change="paginationSizeChange" :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
<el-pagination @size-change="paginationSizeChange" :total="tableData.total"
|
||||||
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
:current-page="tableData.page + 1" :page-size="tableData.size" @current-change="paginationChange"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<invoicingDetail ref="invoicingDetail" />
|
<invoicingDetail ref="invoicingDetail" />
|
||||||
<!-- 导入库存弹窗 -->
|
<!-- 导入库存弹窗 -->
|
||||||
|
|
@ -123,6 +129,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { stock, stockdownload, stockdoImport, stockStatewarnLine, stockStateChanges, stocks } from '@/api/invoicing'
|
import { stock, stockdownload, stockdoImport, stockStatewarnLine, stockStateChanges, stocks } from '@/api/invoicing'
|
||||||
|
import { tbShopCategoryGet } from '@/api/shop'
|
||||||
import settings from '@/settings'
|
import settings from '@/settings'
|
||||||
import invoicingDetail from './components/invoicingDetail'
|
import invoicingDetail from './components/invoicingDetail'
|
||||||
import AddStockTakin from './components/addStockTakin'
|
import AddStockTakin from './components/addStockTakin'
|
||||||
|
|
@ -139,10 +146,12 @@ export default {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogTableVisible: false,
|
dialogTableVisible: false,
|
||||||
montey: "",
|
montey: "",
|
||||||
|
categorys: [],
|
||||||
query: {
|
query: {
|
||||||
name: '',
|
name: '',
|
||||||
isStock: '',
|
isStock: '',
|
||||||
num: ''
|
num: '',
|
||||||
|
categoryId: ''
|
||||||
},
|
},
|
||||||
downloadLoading: false,
|
downloadLoading: false,
|
||||||
uploadLoading: false,
|
uploadLoading: false,
|
||||||
|
|
@ -158,6 +167,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.tbShopCategoryGet()
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -277,6 +287,7 @@ export default {
|
||||||
name: this.query.name,
|
name: this.query.name,
|
||||||
isStock: this.query.isStock,
|
isStock: this.query.isStock,
|
||||||
num: this.query.num,
|
num: this.query.num,
|
||||||
|
categoryId: this.query.categoryId,
|
||||||
shopId: localStorage.getItem('shopId')
|
shopId: localStorage.getItem('shopId')
|
||||||
})
|
})
|
||||||
this.tableData.loading = false
|
this.tableData.loading = false
|
||||||
|
|
@ -287,7 +298,6 @@ export default {
|
||||||
element.hasChildren = true
|
element.hasChildren = true
|
||||||
} else {
|
} else {
|
||||||
element.hasChildren = false
|
element.hasChildren = false
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.warnLine = res.warnLine
|
this.warnLine = res.warnLine
|
||||||
|
|
@ -297,8 +307,37 @@ export default {
|
||||||
console.log(error);
|
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);
|
console.log(e);
|
||||||
this.tableData.size = e
|
this.tableData.size = e
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
|
|
|
||||||
|
|
@ -300,6 +300,7 @@ export default {
|
||||||
this.inTabValue = value
|
this.inTabValue = value
|
||||||
this.shopTypesActive = 0
|
this.shopTypesActive = 0
|
||||||
this.queryForm.type = type
|
this.queryForm.type = type
|
||||||
|
this.resetHandle()
|
||||||
},
|
},
|
||||||
// 计算耗材总价
|
// 计算耗材总价
|
||||||
consCountTotal() {
|
consCountTotal() {
|
||||||
|
|
|
||||||
|
|
@ -296,6 +296,7 @@ export default {
|
||||||
this.inTabValue = value
|
this.inTabValue = value
|
||||||
this.shopTypesActive = 0
|
this.shopTypesActive = 0
|
||||||
this.queryForm.type = type
|
this.queryForm.type = type
|
||||||
|
this.resetHandle()
|
||||||
},
|
},
|
||||||
// 计算耗材总价
|
// 计算耗材总价
|
||||||
consCountTotal() {
|
consCountTotal() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue