完善初始化必填逻辑
This commit is contained in:
@@ -237,8 +237,16 @@
|
|||||||
showAdd() {
|
showAdd() {
|
||||||
console.log("this.imgList", this.imgList)
|
console.log("this.imgList", this.imgList)
|
||||||
this.hideUploadBtn = this.imgList.length != 0
|
this.hideUploadBtn = this.imgList.length != 0
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
showEdit(row) {
|
showEdit(row) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
req.initBrands(row.sid)
|
req.initBrands(row.sid)
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
|
|||||||
@@ -66,8 +66,8 @@
|
|||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="span-sty"><span class="must">*</span> 出库规则</div>
|
<div class="span-sty"><span class="must">*</span> 出库规则</div>
|
||||||
<el-form-item prop="outStockRuleValue">
|
<el-form-item prop="outStockRuleVaule">
|
||||||
<el-select v-model="formobj.outStockRuleValue" placeholder="请选择出库规则" class="addinputw addinputInfo"
|
<el-select v-model="formobj.outStockRuleVaule" placeholder="请选择出库规则" class="addinputw addinputInfo"
|
||||||
@change="selectOutStockRuleChange">
|
@change="selectOutStockRuleChange">
|
||||||
<el-option v-for="item in outStockRuleList" :key="item.dictKey" :label="item.dictValue"
|
<el-option v-for="item in outStockRuleList" :key="item.dictKey" :label="item.dictValue"
|
||||||
:value="item.dictKey" />
|
:value="item.dictKey" />
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
percentageRate: '',
|
percentageRate: '',
|
||||||
percentageAmount: '',
|
percentageAmount: '',
|
||||||
outStockRule: '',
|
outStockRule: '',
|
||||||
outStockRuleValue: '',
|
outStockRuleVaule: '',
|
||||||
sids: '',
|
sids: '',
|
||||||
pname: '',
|
pname: '',
|
||||||
sortNo: '',
|
sortNo: '',
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
message: '类别编码不能为空',
|
message: '类别编码不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}],
|
}],
|
||||||
outStockRuleValue: [{
|
outStockRuleVaule: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择出库规则',
|
message: '请选择出库规则',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
@@ -309,8 +309,16 @@
|
|||||||
},
|
},
|
||||||
showAdd() {
|
showAdd() {
|
||||||
this.initData()
|
this.initData()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
showEdit(row) {
|
showEdit(row) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
this.initData()
|
this.initData()
|
||||||
req.initTypes(row.sid)
|
req.initTypes(row.sid)
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
@@ -335,7 +343,7 @@
|
|||||||
const choose = this.outStockRuleList.filter((item) => item.dictKey == val)
|
const choose = this.outStockRuleList.filter((item) => item.dictKey == val)
|
||||||
console.log('>>>>>>>>>selectOutStockRuleChange', choose)
|
console.log('>>>>>>>>>selectOutStockRuleChange', choose)
|
||||||
this.formobj.outStockRule = choose[0].dictKey
|
this.formobj.outStockRule = choose[0].dictKey
|
||||||
this.formobj.outStockRuleValue = choose[0].dictValue
|
this.formobj.outStockRuleVaule = choose[0].dictValue
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<el-table-column prop="pname" label="上级类别" align="center" />
|
<el-table-column prop="pname" label="上级类别" align="center" />
|
||||||
<el-table-column prop="percentageRate" label="提成比例" align="center" />
|
<el-table-column prop="percentageRate" label="提成比例" align="center" />
|
||||||
<el-table-column prop="percentageAmount" label="提成金额" align="center" />
|
<el-table-column prop="percentageAmount" label="提成金额" align="center" />
|
||||||
<el-table-column prop="outstockRulevalue" label="出库规则" align="center" />
|
<el-table-column prop="outStockRuleVaule" label="出库规则" align="center" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- End 项目列表 -->
|
<!-- End 项目列表 -->
|
||||||
|
|||||||
@@ -185,8 +185,17 @@
|
|||||||
}
|
}
|
||||||
this.$emit('doback')
|
this.$emit('doback')
|
||||||
},
|
},
|
||||||
showAdd() {},
|
showAdd() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
showEdit(row) {
|
showEdit(row) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
req.initFacturer(row.sid)
|
req.initFacturer(row.sid)
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
|
|||||||
@@ -429,12 +429,21 @@
|
|||||||
// var sid = require('uuid').v1()
|
// var sid = require('uuid').v1()
|
||||||
// console.log('>>>>>>>>>showAdd', sid)
|
// console.log('>>>>>>>>>showAdd', sid)
|
||||||
|
|
||||||
// this.formobj.sid = sid
|
// this.formobj.sid = sid this.$nextTick(() => {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
indexMethod(index) {
|
indexMethod(index) {
|
||||||
return index + 1
|
return index + 1
|
||||||
},
|
},
|
||||||
showEdit(row) {
|
showEdit(row) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
req.initGoods(row.sid)
|
req.initGoods(row.sid)
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
|
|||||||
@@ -124,8 +124,18 @@
|
|||||||
}
|
}
|
||||||
this.$emit('doback')
|
this.$emit('doback')
|
||||||
},
|
},
|
||||||
showAdd() {},
|
showAdd() {
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
showEdit(row) {
|
showEdit(row) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form_obj'].clearValidate()
|
||||||
|
})
|
||||||
|
|
||||||
req.initUnits(row.sid)
|
req.initUnits(row.sid)
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
|
|||||||
Reference in New Issue
Block a user