Merge branch 'ymf' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into dev
This commit is contained in:
commit
f3faa70c59
|
|
@ -25,10 +25,10 @@
|
||||||
<span :class="[computedClass(scope.row.balance)]"> {{scope.row.balance }}</span>
|
<span :class="[computedClass(scope.row.balance)]"> {{scope.row.balance }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="耗材消耗" prop="conConsume" />
|
<el-table-column label="耗材消耗" prop="conConsume" align="center" />
|
||||||
<el-table-column label="耗材入库" prop="conIn" />
|
<el-table-column label="耗材入库" prop="conIn" align="center" />
|
||||||
<el-table-column label="耗材出库" prop="conOut" />
|
<el-table-column label="耗材出库" prop="conOut" align="center" />
|
||||||
<el-table-column label="耗材反还" prop="conReturn" />
|
<el-table-column label="耗材反还" prop="conReturn" align="center"/>
|
||||||
|
|
||||||
<!-- <el-table-column label="业务编码" prop="bizCode" /> -->
|
<!-- <el-table-column label="业务编码" prop="bizCode" /> -->
|
||||||
<!-- <el-table-column label="业务说明" prop="bizName" /> -->
|
<!-- <el-table-column label="业务说明" prop="bizName" /> -->
|
||||||
|
|
@ -36,7 +36,19 @@
|
||||||
<!-- <el-table-column label="正负号标识" prop="bizType" /> -->
|
<!-- <el-table-column label="正负号标识" prop="bizType" /> -->
|
||||||
<!-- <el-table-column label="耗材id" prop="consId" /> -->
|
<!-- <el-table-column label="耗材id" prop="consId" /> -->
|
||||||
<!-- <el-table-column label="创建时间" prop="createTime"></el-table-column> -->
|
<!-- <el-table-column label="创建时间" prop="createTime"></el-table-column> -->
|
||||||
<el-table-column label="操作" >
|
<el-table-column label="所属商品" width="320" align="center">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
v-for="(item) in scope.row.product"
|
||||||
|
@click="toGoods(item)"
|
||||||
|
:key="item.productId"
|
||||||
|
type="text"
|
||||||
|
>{{item.productName}}</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -99,6 +111,14 @@ export default {
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toGoods(data){
|
||||||
|
this.$router.push({
|
||||||
|
path:'/product/product',
|
||||||
|
query:{
|
||||||
|
productId: data.productId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
computedClass(num){
|
computedClass(num){
|
||||||
if(num>0){
|
if(num>0){
|
||||||
return 'green'
|
return 'green'
|
||||||
|
|
@ -107,8 +127,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lookDetail(row){
|
lookDetail(row){
|
||||||
console.log(row)
|
this.$refs.recodeDetail.open({
|
||||||
this.$refs.recodeDetail.open(row)
|
"consId": row.consId,
|
||||||
|
"conName": row.conName
|
||||||
|
})
|
||||||
},
|
},
|
||||||
resetHandle() {
|
resetHandle() {
|
||||||
this.clickseetableData.page = 0;
|
this.clickseetableData.page = 0;
|
||||||
|
|
@ -135,7 +157,22 @@ export default {
|
||||||
shopId: localStorage.getItem("shopId")
|
shopId: localStorage.getItem("shopId")
|
||||||
});
|
});
|
||||||
this.clickseetableData.loading = false;
|
this.clickseetableData.loading = false;
|
||||||
this.clickseetableData.data = res.content;
|
this.clickseetableData.data = res.content.map(v=>{
|
||||||
|
const productIds=v.productId.split(',')
|
||||||
|
return{
|
||||||
|
...v,
|
||||||
|
product:productIds.map((str,index)=>{
|
||||||
|
const startIndex=str.indexOf('_')
|
||||||
|
const productId=str.slice(0,startIndex)
|
||||||
|
const productName=str.slice(startIndex+1,str.length)
|
||||||
|
return {
|
||||||
|
productId,
|
||||||
|
productName:productName+`${(index==productIds.length-1)?'':','}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(this.clickseetableData.data)
|
||||||
this.clickseetableData.total = res.totalElements;
|
this.clickseetableData.total = res.totalElements;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
@ -154,4 +191,5 @@ export default {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -616,7 +616,8 @@ export default {
|
||||||
this.informationdialogshow = false;
|
this.informationdialogshow = false;
|
||||||
},
|
},
|
||||||
haocaiConfirm() {
|
haocaiConfirm() {
|
||||||
if(JSON.stringify(haocaiSelectedMap)!=='{}' ){
|
let hasEmpty=JSON.stringify(haocaiSelectedMap)=='{}'
|
||||||
|
if(!hasEmpty){
|
||||||
this.commodityArr.forEach((ele) => {
|
this.commodityArr.forEach((ele) => {
|
||||||
if (ele.skuId == this.ALLisDistribute.skuId) {
|
if (ele.skuId == this.ALLisDistribute.skuId) {
|
||||||
ele.haocais = [];
|
ele.haocais = [];
|
||||||
|
|
@ -634,6 +635,13 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
//当选中耗材为空,重置耗材
|
||||||
|
this.commodityArr.forEach((ele) => {
|
||||||
|
if (ele.skuId == this.ALLisDistribute.skuId) {
|
||||||
|
ele.haocais = [{...haocaisBasic}];
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.informationdialogshow = false;
|
this.informationdialogshow = false;
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
dayjs,
|
dayjs,
|
||||||
query: {
|
query: {
|
||||||
|
productId:'',
|
||||||
name: '',
|
name: '',
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
typeEnum: ''
|
typeEnum: ''
|
||||||
|
|
@ -126,6 +127,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
if (this.$route.query.productId) {
|
||||||
|
this.query.productId = this.$route.query.productId
|
||||||
|
}
|
||||||
|
console.log(this.query)
|
||||||
|
|
||||||
await this.tbShopCategoryGet()
|
await this.tbShopCategoryGet()
|
||||||
await this.getTableData()
|
await this.getTableData()
|
||||||
if (this.isPcBowser) {
|
if (this.isPcBowser) {
|
||||||
|
|
@ -183,6 +189,7 @@ export default {
|
||||||
this.query.name = ''
|
this.query.name = ''
|
||||||
this.query.categoryId = ''
|
this.query.categoryId = ''
|
||||||
this.query.typeEnum = ''
|
this.query.typeEnum = ''
|
||||||
|
this.query.productId = ''
|
||||||
this.tableData.page = 0
|
this.tableData.page = 0
|
||||||
localStorage.setItem('shopIndexQuery', JSON.stringify(this.query))
|
localStorage.setItem('shopIndexQuery', JSON.stringify(this.query))
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
|
|
@ -196,16 +203,18 @@ export default {
|
||||||
async getTableData() {
|
async getTableData() {
|
||||||
try {
|
try {
|
||||||
let localQuery = JSON.parse(localStorage.getItem('shopIndexQuery'))
|
let localQuery = JSON.parse(localStorage.getItem('shopIndexQuery'))
|
||||||
if (localQuery != null) {
|
if (localQuery != null&&localQuery.hasOwnProperty('productId')) {
|
||||||
this.query = localQuery
|
this.query = localQuery
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tableData.loading = true
|
this.tableData.loading = true
|
||||||
|
console.log(this.query)
|
||||||
const res = await tbProduct({
|
const res = await tbProduct({
|
||||||
page: this.tableData.page,
|
page: this.tableData.page,
|
||||||
size: this.tableData.size,
|
size: this.tableData.size,
|
||||||
name: this.query.name,
|
name: this.query.name,
|
||||||
categoryId: this.query.categoryId,
|
categoryId: this.query.categoryId,
|
||||||
|
id:this.query.productId,
|
||||||
typeEnum: this.query.typeEnum,
|
typeEnum: this.query.typeEnum,
|
||||||
shopId: localStorage.getItem('shopId')
|
shopId: localStorage.getItem('shopId')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue