Merge branch 'gyq' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into dwb
This commit is contained in:
commit
d6a8aca57f
|
|
@ -0,0 +1,90 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div class="head-container">
|
||||||
|
<el-form :model="query" inline>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="query.conName" placeholder="耗材信息名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||||
|
<el-button>重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="head-container">
|
||||||
|
<el-table ref="table" :data="clickseetableData.data" v-loading="clickseetableData.loading" row-key="id"
|
||||||
|
height="66vh">
|
||||||
|
<el-table-column label="变动库存" prop="amount">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span :class="{ red: scope.row.bizType == '-' }">{{ scope.row.bizType }}{{ scope.row.amount
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="现有库存" prop="balance" />
|
||||||
|
<!-- <el-table-column label="业务编码" prop="bizCode" /> -->
|
||||||
|
<el-table-column label="业务说明" prop="bizName" />
|
||||||
|
<!-- <el-table-column label="正负号标识" prop="bizType" /> -->
|
||||||
|
<el-table-column label="耗材名称" prop="conName" />
|
||||||
|
<!-- <el-table-column label="耗材id" prop="consId" /> -->
|
||||||
|
<el-table-column label="创建时间" prop="createTime"></el-table-column>
|
||||||
|
<!-- <el-table-column label="更新时间" prop="updateTime">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="head-container">
|
||||||
|
<el-pagination :total="clickseetableData.total" :current-page="clickseetableData.page + 1"
|
||||||
|
:page-size="clickseetableData.size" layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@current-change="paginationChangetype" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { gettbConsInfoFlow } from '@/api/consumable'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query: {
|
||||||
|
conName: ''
|
||||||
|
},
|
||||||
|
clickseetableData: {
|
||||||
|
data: [],
|
||||||
|
page: 0,
|
||||||
|
size: 30,
|
||||||
|
loading: false,
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
paginationChangetype(e) {
|
||||||
|
this.tableDatatype.page = e - 1
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
// 查看查询耗材流水信息
|
||||||
|
async getTableData() {
|
||||||
|
try {
|
||||||
|
this.clickseetableData.loading = true
|
||||||
|
const res = await gettbConsInfoFlow({
|
||||||
|
page: this.clickseetableData.page,
|
||||||
|
size: this.clickseetableData.size,
|
||||||
|
consId: '',
|
||||||
|
conName: this.query.conName,
|
||||||
|
shopId: localStorage.getItem('shopId')
|
||||||
|
})
|
||||||
|
this.clickseetableData.loading = false
|
||||||
|
this.clickseetableData.data = res.content
|
||||||
|
this.clickseetableData.total = res.totalElements
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -60,15 +60,12 @@
|
||||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="耗材记录">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button type="text" @click="clicksee(scope.row)">查看</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
|
<el-button type="text" @click="clicksee(scope.row)">耗材记录</el-button>
|
||||||
<!-- <el-button type="text" icon="el-icon-rank">排序</el-button> -->
|
<!-- <el-button type="text" icon="el-icon-rank">排序</el-button> -->
|
||||||
<el-button type="text" @click="clickdialogfadd(scope.row)">编辑</el-button>
|
<!-- <el-button type="text" @click="clickdialogfadd(scope.row)"
|
||||||
|
style="margin-left: 10px !important;">入库</el-button> -->
|
||||||
<!-- <el-button type="text" icon="el-icon-edit" @click="clickdialogframe('edit', scope.row)">编辑</el-button> -->
|
<!-- <el-button type="text" icon="el-icon-edit" @click="clickdialogframe('edit', scope.row)">编辑</el-button> -->
|
||||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
<!-- <el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
||||||
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
|
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
|
||||||
|
|
@ -95,7 +92,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 修改和增加 -->
|
<!-- 修改和增加 -->
|
||||||
<el-dialog :title="dialogtitle" :visible.sync="dialogshow" width="70%" >
|
<el-dialog :title="dialogtitle" :visible.sync="dialogshow" width="70%">
|
||||||
<el-form :inline="true" ref="refruleForm" :model="ruleForm" :rules="rules" class="demo-form-inline">
|
<el-form :inline="true" ref="refruleForm" :model="ruleForm" :rules="rules" class="demo-form-inline">
|
||||||
<el-form-item label="单位" prop="conUnit" v-if="dialogtitle == '添加'">
|
<el-form-item label="单位" prop="conUnit" v-if="dialogtitle == '添加'">
|
||||||
<el-input v-model="ruleForm.conUnit" placeholder="请输入单位"></el-input>
|
<el-input v-model="ruleForm.conUnit" placeholder="请输入单位"></el-input>
|
||||||
|
|
@ -258,8 +255,8 @@ export default {
|
||||||
conCode: '',
|
conCode: '',
|
||||||
conName: '',
|
conName: '',
|
||||||
conTypeId: '',
|
conTypeId: '',
|
||||||
price:"",
|
price: "",
|
||||||
conNames:"",
|
conNames: "",
|
||||||
// surplusStock: '',
|
// surplusStock: '',
|
||||||
conUnit: '',
|
conUnit: '',
|
||||||
conWarning: '',
|
conWarning: '',
|
||||||
|
|
@ -389,7 +386,7 @@ export default {
|
||||||
// 选择的类型
|
// 选择的类型
|
||||||
tableDatatypetable(item) {
|
tableDatatypetable(item) {
|
||||||
this.ruleForm.conCode = item.conTypeCode
|
this.ruleForm.conCode = item.conTypeCode
|
||||||
this.ruleForm.conNames = item.conTypeName
|
this.ruleForm.conNames = item.conTypeName
|
||||||
this.ruleForm.conTypeId = item.id
|
this.ruleForm.conTypeId = item.id
|
||||||
this.typedialogshow = false
|
this.typedialogshow = false
|
||||||
},
|
},
|
||||||
|
|
@ -438,7 +435,7 @@ export default {
|
||||||
this.$refs[formName].validate(async (valid) => {
|
this.$refs[formName].validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.dialogtitle == '编辑') {
|
if (this.dialogtitle == '编辑') {
|
||||||
|
|
||||||
await postapitbConsInfo({
|
await postapitbConsInfo({
|
||||||
id: this.ruleForm.id,
|
id: this.ruleForm.id,
|
||||||
conCode: this.ruleForm.conCode,
|
conCode: this.ruleForm.conCode,
|
||||||
|
|
@ -452,9 +449,9 @@ export default {
|
||||||
this.dialogshow = false
|
this.dialogshow = false
|
||||||
} else {//添加
|
} else {//添加
|
||||||
await posttbConsInfo({
|
await posttbConsInfo({
|
||||||
...this.ruleForm
|
...this.ruleForm
|
||||||
})
|
})
|
||||||
this.$message({type:'success',message:'添加成功'})
|
this.$message({ type: 'success', message: '添加成功' })
|
||||||
}
|
}
|
||||||
this.dialogshow = false
|
this.dialogshow = false
|
||||||
this.$refs[formName].resetFields()
|
this.$refs[formName].resetFields()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue