耗材修改
This commit is contained in:
@@ -105,9 +105,9 @@
|
||||
<el-form-item v-if="dialogtitle == '添加'">
|
||||
<el-button type="primary" @click="typedialogshow = true">去选择</el-button>
|
||||
</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-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||
<el-button @click="dialogshow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm('refruleForm')">确 定</el-button>
|
||||
@@ -248,7 +248,7 @@ export default {
|
||||
conCode: '',
|
||||
conName: '',
|
||||
conTypeId: '',
|
||||
surplusStock: '',
|
||||
// surplusStock: '',
|
||||
conUnit: '',
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
},
|
||||
@@ -406,7 +406,7 @@ export default {
|
||||
this.ruleForm.conTypeId = item.conTypeId
|
||||
this.ruleForm.conCode = item.conCode
|
||||
this.ruleForm.conName = item.conName
|
||||
this.ruleForm.surplusStock = item.surplusStock
|
||||
// this.ruleForm.surplusStock = item.surplusStock
|
||||
this.ruleForm.conUnit = item.conUnit
|
||||
console.log(this.ruleForm, item)
|
||||
}
|
||||
@@ -421,7 +421,7 @@ export default {
|
||||
conCode: this.ruleForm.conCode,
|
||||
conName: this.ruleForm.conName,
|
||||
conTypeId: this.ruleForm.conTypeId,
|
||||
surplusStock: this.ruleForm.surplusStock,
|
||||
// surplusStock: this.ruleForm.surplusStock,
|
||||
conUnit: this.ruleForm.conUnit,
|
||||
shopId: this.ruleForm.shopId
|
||||
})
|
||||
@@ -431,7 +431,7 @@ export default {
|
||||
conCode: this.ruleForm.conCode,
|
||||
conName: this.ruleForm.conName,
|
||||
conTypeId: this.ruleForm.conTypeId,
|
||||
surplusStock: this.ruleForm.surplusStock,
|
||||
// surplusStock: this.ruleForm.surplusStock,
|
||||
conUnit: this.ruleForm.conUnit,
|
||||
shopId: this.ruleForm.shopId
|
||||
})
|
||||
|
||||
@@ -92,8 +92,11 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="informationdialogshow = true">去选择耗材信息</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否禁用" prop="status">
|
||||
<!-- <el-form-item label="是否禁用" prop="status">
|
||||
<el-switch v-model="ruleForm.status" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="单位耗材值" prop="surplusStock">
|
||||
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||
<el-button @click="dialogshow = false">取 消</el-button>
|
||||
@@ -102,10 +105,13 @@
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<el-dialog title="修改" :visible.sync="dialogshows">
|
||||
<el-form ref="refruleForm" :model="ruleForm" :inline="true">
|
||||
<el-form ref="refruleForm" :model="ruleForm" :inline="true" :rules="rulesdialogshows">
|
||||
<el-form-item label="是否禁用" prop="status">
|
||||
<el-switch v-model="ruleForm.status" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位耗材值" prop="surplusStock">
|
||||
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||
<el-button @click="dialogshows = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm('refruleForm')">确 定</el-button>
|
||||
@@ -136,7 +142,7 @@
|
||||
<el-table-column label="类型名称" prop="conTypeName" />
|
||||
<el-table-column label="单位" prop="conUnit" />
|
||||
<el-table-column label="库存数量" prop="stockNumber" />
|
||||
<el-table-column label="剩余库存量" prop="surplusStock" />
|
||||
<el-table-column label="单位耗材值" prop="surplusStock" />
|
||||
<el-table-column label="" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="tableDatainformationtable(scope.row)">确定</el-button>
|
||||
@@ -248,6 +254,7 @@ export default {
|
||||
productSkuId: "",
|
||||
productSkuIdname: "",
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
surplusStock: '',
|
||||
status: false
|
||||
},
|
||||
rules: {
|
||||
@@ -257,6 +264,17 @@ export default {
|
||||
productSkuIdname: [
|
||||
{ required: true, message: '请输入商品规格', trigger: 'blur' }
|
||||
],
|
||||
surplusStock: [
|
||||
{ required: true, message: '请输入单位耗材值', trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '选择状态', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
rulesdialogshows: {
|
||||
surplusStock: [
|
||||
{ required: true, message: '请输入单位耗材值', trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '选择状态', trigger: 'blur' }
|
||||
]
|
||||
@@ -416,7 +434,10 @@ export default {
|
||||
} else {
|
||||
this.dialogshows = true
|
||||
this.dialogtitle = '编辑'
|
||||
this.ruleForm.id = item.productSkuId
|
||||
this.ruleForm.conInfoId = item.conInfoId
|
||||
this.ruleForm.id = item.id
|
||||
this.ruleForm.surplusStock = item.surplusStock
|
||||
this.ruleForm.status = item.status == 0 ? true : false
|
||||
}
|
||||
},
|
||||
@@ -426,10 +447,11 @@ export default {
|
||||
if (this.dialogtitle == '编辑') {
|
||||
await puttbProskuCon({
|
||||
id: this.ruleForm.id,
|
||||
productSkuId: this.ruleForm.productSkuId,
|
||||
conInfoId: this.ruleForm.conInfoId,
|
||||
// productSkuId: this.ruleForm.productSkuId,
|
||||
// conInfoId: this.ruleForm.conInfoId,
|
||||
shopId: this.ruleForm.shopId,
|
||||
status: this.ruleForm.status ? '0' : '1'
|
||||
status: this.ruleForm.status ? '0' : '1',
|
||||
surplusStock: this.ruleForm.surplusStock
|
||||
})
|
||||
this.dialogshows = false
|
||||
|
||||
@@ -439,7 +461,8 @@ export default {
|
||||
productSkuId: this.ruleForm.productSkuId,
|
||||
conInfoId: this.ruleForm.conInfoId,
|
||||
shopId: this.ruleForm.shopId,
|
||||
status: this.ruleForm.status ? '0' : '1'
|
||||
status: this.ruleForm.status ? '0' : '1',
|
||||
surplusStock: this.ruleForm.surplusStock
|
||||
})
|
||||
this.dialogshow = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user