Merge branch 'dwb' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq

This commit is contained in:
gyq 2024-07-04 11:55:53 +08:00
commit 2cb8006f8d
3 changed files with 26 additions and 19 deletions

View File

@ -95,19 +95,22 @@
</el-form> </el-form>
</el-dialog> </el-dialog>
<!-- 修改和增加 --> <!-- 修改和增加 -->
<el-dialog :title="dialogtitle" :visible.sync="dialogshow"> <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>
</el-form-item> </el-form-item>
<el-form-item label="耗材信息名称" prop="conName" v-if="dialogtitle == '添加'"> <el-form-item label="耗材类型" prop="conNames" v-if="dialogtitle == '添加'">
<el-input v-model="ruleForm.conName" placeholder="请输耗材信息名称" disabled></el-input> <el-input v-model="ruleForm.conNames" placeholder="请输耗材信息名称" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="dialogtitle == '添加'"> <el-form-item v-if="dialogtitle == '添加'">
<el-button type="primary" @click="typedialogshow = true">去选择</el-button> <el-button type="primary" @click="typedialogshow = true">去选择</el-button>
</el-form-item> </el-form-item>
<el-form-item label="预警值" prop="conWarning"> <el-form-item label="耗材信息名称" prop="conName">
<el-input v-model="ruleForm.conWarning" placeholder="请输入预警值"></el-input> <el-input v-model="ruleForm.conName" placeholder="请输入耗材信息名称"></el-input>
</el-form-item>
<el-form-item label="耗材价格" prop="price">
<el-input v-model="ruleForm.price" placeholder="请输入耗材价格"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="单位耗材值" prop="surplusStock"> <!-- <el-form-item label="单位耗材值" prop="surplusStock">
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input> <el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
@ -255,6 +258,8 @@ export default {
conCode: '', conCode: '',
conName: '', conName: '',
conTypeId: '', conTypeId: '',
price:"",
conNames:"",
// surplusStock: '', // surplusStock: '',
conUnit: '', conUnit: '',
conWarning: '', conWarning: '',
@ -267,6 +272,12 @@ export default {
conName: [ conName: [
{ required: true, message: '请输入耗材信息名称', trigger: 'blur' } { required: true, message: '请输入耗材信息名称', trigger: 'blur' }
], ],
conNames: [
{ required: true, message: '请输入耗材类型', trigger: 'blur' }
],
price: [
{ required: true, message: '请输入耗材价格', trigger: 'blur' }
],
conTypeId: [ conTypeId: [
{ required: true, message: '请输入耗材类型id', trigger: 'blur' } { required: true, message: '请输入耗材类型id', trigger: 'blur' }
], ],
@ -377,9 +388,9 @@ export default {
}, },
// //
tableDatatypetable(item) { tableDatatypetable(item) {
console.log(item) console.log(item, '调试-选择完的数据')
this.ruleForm.conCode = item.conTypeCode this.ruleForm.conCode = item.conTypeCode
this.ruleForm.conName = item.conTypeName this.ruleForm.conNames = item.conTypeName
this.ruleForm.conTypeId = item.id this.ruleForm.conTypeId = item.id
this.typedialogshow = false this.typedialogshow = false
}, },
@ -428,6 +439,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,
@ -441,14 +453,9 @@ export default {
this.dialogshow = false this.dialogshow = false
} else {// } else {//
await posttbConsInfo({ await posttbConsInfo({
conCode: this.ruleForm.conCode, ...this.ruleForm
conName: this.ruleForm.conName,
conTypeId: this.ruleForm.conTypeId,
// surplusStock: this.ruleForm.surplusStock,
conWarning: item.conWarning,
conUnit: this.ruleForm.conUnit,
shopId: this.ruleForm.shopId
}) })
this.$message({type:'success',message:'添加成功'})
} }
this.dialogshow = false this.dialogshow = false
this.$refs[formName].resetFields() this.$refs[formName].resetFields()

View File

@ -444,7 +444,6 @@ export default {
} else { } else {
this.informationdialogshowedit = true this.informationdialogshowedit = true
this.dialogtitle = '编辑' this.dialogtitle = '编辑'
// console.log(item,'11')
this.surplusStocks = item this.surplusStocks = item
} }
}, },

View File

@ -24,8 +24,9 @@
<el-table-column label="备注" prop="remark"></el-table-column> <el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="剩余付款金额" prop="waitAmount"> <el-table-column label="剩余付款金额" prop="waitAmount">
<template v-slot="scope"> <template v-slot="scope">
<span class="num" v-if="scope.row.waitAmount > 0">{{ scope.row.waitAmount }}</span> <span class="num">
<span v-else>-</span> {{ scope.row.waitAmount }}
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待付款笔数" prop="waitCount"> <el-table-column label="待付款笔数" prop="waitCount">
@ -84,7 +85,7 @@ export default {
dayjs, dayjs,
query: { query: {
name: '', name: '',
type:"" type: ""
}, },
tableData: { tableData: {
page: 0, page: 0,
@ -135,7 +136,7 @@ export default {
// //
resetHandle() { resetHandle() {
this.query.name = '' this.query.name = ''
this.query.type='' this.query.type = ''
this.tableData.page = 0; this.tableData.page = 0;
this.getTableData() this.getTableData()
}, },