广告功能
This commit is contained in:
@@ -52,70 +52,75 @@
|
||||
</div>
|
||||
<div class="head-container" id="table_drag">
|
||||
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id">
|
||||
<!-- <el-table-column prop="id" label="ID" width="50px" /> -->
|
||||
<el-table-column label="耗材名称" prop="conName" align="center" />
|
||||
<!-- <el-table-column label="耗材代码" prop="conCode" /> -->
|
||||
<el-table-column label="分类名称" prop="conTypeName" align="center" />
|
||||
<el-table-column label="单位" prop="conUnit" align="center" />
|
||||
<el-table-column label="耗材名称" prop="conName" style="width: 100px;">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.editNYD == 1">
|
||||
<el-input v-model="scope.row.conName" placeholder="请输入内容" @blur="conNameClick(scope.row)"></el-input>
|
||||
</div>
|
||||
<span v-else>
|
||||
{{ scope.row.conName }}
|
||||
</span>
|
||||
<i class="el-icon-edit" @click="scope.row.editNYD = 1"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分类名称" prop="conTypeName"></el-table-column>
|
||||
<el-table-column label="单位" prop="conUnit">
|
||||
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.editNYD == 2">
|
||||
<el-input v-model="scope.row.conUnit" placeholder="请输入内容" @blur="conNameClick(scope.row)"></el-input>
|
||||
</div>
|
||||
<span v-else>
|
||||
{{ scope.row.conUnit }}
|
||||
</span>
|
||||
<i class="el-icon-edit" @click="scope.row.editNYD = 2"></i>
|
||||
</template>
|
||||
|
||||
<el-table-column label="现有库存" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="现有库存">
|
||||
<template v-slot="scope">
|
||||
<span :class="[computedClass(scope.row.balance)]"> {{ scope.row.balance }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耗材消耗" prop="conConsume" align="center" />
|
||||
<el-table-column label="耗材入库" prop="conIn" align="center" />
|
||||
<el-table-column label="耗材出库" prop="conOut" align="center" />
|
||||
<el-table-column label="耗材反还" prop="conReturn" align="center" />
|
||||
<el-table-column label="库存开关" prop="conReturn" align="center">
|
||||
<el-table-column label="耗材消耗" prop="conConsume" />
|
||||
<el-table-column label="耗材入库" prop="conIn" />
|
||||
<el-table-column label="耗材出库" prop="conOut" />
|
||||
<el-table-column label="耗材反还" prop="conReturn" />
|
||||
<el-table-column label="库存开关" prop="conReturn">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isCheck" active-value="1" inactive-value="0"
|
||||
@change="showChange($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="业务编码" prop="bizCode" /> -->
|
||||
<!-- <el-table-column label="业务说明" prop="bizName" /> -->
|
||||
<!-- <el-table-column label="商品名称" prop="productName" /> -->
|
||||
<!-- <el-table-column label="正负号标识" prop="bizType" /> -->
|
||||
<!-- <el-table-column label="耗材id" prop="consId" /> -->
|
||||
<!-- <el-table-column label="创建时间" prop="createTime"></el-table-column> -->
|
||||
<!-- <el-table-column label="所属商品" width="320" align="center">
|
||||
<el-table-column label="所属商品" width="220">
|
||||
<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>
|
||||
{{ scope.row.productId }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<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="最近入库量" prop="lasterInStock" /> -->
|
||||
<el-table-column label="库存数量" align="center" prop="stockNumber">
|
||||
<el-table-column label="库存数量" prop="stockNumber">
|
||||
<template v-slot="scope">
|
||||
{{ (scope.row.balance).toFixed(2) }}
|
||||
<!-- {{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }} -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预警值" prop="conWarning">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.editNYD == 3">
|
||||
<el-input v-model="scope.row.conWarning" placeholder="请输入内容" @blur="conNameClick(scope.row)"></el-input>
|
||||
</div>
|
||||
<span v-else>
|
||||
{{ scope.row.conWarning }}
|
||||
</span>
|
||||
<i class="el-icon-edit" @click="scope.row.editNYD = 3"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="预警值" align="center" prop="conWarning" />
|
||||
<!-- <el-table-column label="单位耗材值" prop="surplusStock" /> -->
|
||||
<!-- <el-table-column label="排序" prop="sort" sortable /> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="200">
|
||||
<el-table-column label="创建时间" prop="createTime" width="200">
|
||||
<!-- <template v-slot="scope">
|
||||
{{ dayjs(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="更新时间" prop="updateTime" width="200"> -->
|
||||
<!-- <template v-slot="scope">
|
||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template> -->
|
||||
<!-- </el-table-column> -->
|
||||
<el-table-column label="操作" width="250" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="editorHandle(scope.row)">编辑</el-button>
|
||||
@@ -506,7 +511,7 @@ export default {
|
||||
downloadLoading: false,
|
||||
uploadLoading: false,
|
||||
dialogVisible: false,
|
||||
consRecordItem: ''
|
||||
consRecordItem: '',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -541,7 +546,7 @@ export default {
|
||||
}
|
||||
},
|
||||
toGoods(data) {
|
||||
|
||||
|
||||
this.$router.push({
|
||||
path: '/product/product',
|
||||
query: {
|
||||
@@ -569,6 +574,15 @@ export default {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async conNameClick(row) {
|
||||
await postapitbConsInfo([{
|
||||
id: row.consId,
|
||||
...row,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
}])
|
||||
row.editNYD = 0
|
||||
this.$message.success('修改成功')
|
||||
},
|
||||
computedClass(num) {
|
||||
if (num > 0) {
|
||||
return 'green'
|
||||
@@ -639,8 +653,9 @@ export default {
|
||||
this.tableData.data = res.content.map(v => {
|
||||
const productIds = v.productId ? v.productId.split(',') : []
|
||||
return {
|
||||
...v,
|
||||
product: productIds.map((str, index) => {
|
||||
...v,
|
||||
editNYD: 0,
|
||||
product: productIds.map((str, index) => {
|
||||
const startIndex = str.indexOf('_')
|
||||
const productId = str.slice(0, startIndex)
|
||||
const productName = str.slice(startIndex + 1, str.length)
|
||||
@@ -815,6 +830,7 @@ export default {
|
||||
},
|
||||
// 显示耗材记录
|
||||
async clicksee(item) {
|
||||
console.log(item, '耗材记录')
|
||||
this.consRecordItem = item
|
||||
this.clickseetypedialogshow = true;
|
||||
this.getConsRecord()
|
||||
@@ -826,7 +842,7 @@ export default {
|
||||
const res = await gettbConsInfoFlow({
|
||||
page: this.clickseetableData.page,
|
||||
size: this.clickseetableData.size,
|
||||
consId: this.consRecordItem.id,
|
||||
consId: this.consRecordItem.consId,
|
||||
conName: this.consRecordItem.conName,
|
||||
shopId: localStorage.getItem("shopId")
|
||||
});
|
||||
|
||||
@@ -962,10 +962,8 @@ export default {
|
||||
},
|
||||
async submitForm(formName) {
|
||||
if (this.dialogtitle == "编辑") {
|
||||
let { id, surplusStock } = this.surplusStocks;
|
||||
await puttbProskuCon({
|
||||
id,
|
||||
surplusStock,
|
||||
...this.surplusStocks
|
||||
});
|
||||
this.$message({
|
||||
message: "修改成功",
|
||||
|
||||
Reference in New Issue
Block a user