|
|
@@ -3,15 +3,15 @@
|
|
|
<div class="batch-publish-top clearfix">
|
|
|
<div class="w50">
|
|
|
<img src="/images/applyPurchase/batch-icon.png" alt="">
|
|
|
- Bom名称:<input type="text" v-model="bomInfo.name" class="text" />
|
|
|
+ Bom名称:<input type="text" v-model="bomInfo.name" class="text" maxlength="100"/>
|
|
|
共上传<b class="blue-text">{{bomNumber.successImport || 0}}</b>个产品
|
|
|
<!--,其中<span class="red-text">{{bomNumber.nullField || 0}}</span>个产品的必填项缺失,请在当前页完善信息-->
|
|
|
</div>
|
|
|
<div class="w50">
|
|
|
- 采购套数:<input type="text" v-model="bomInfo.count" class="text"/>
|
|
|
+ 采购套数:<input type="text" maxlength="5" v-model="bomInfo.count" class="text" @blur="countBlur(bomInfo.count)" />
|
|
|
</div>
|
|
|
<div class="w50" style="padding-left: 62px;">
|
|
|
- 规格:<input type="text" v-model="bomInfo.spec" class="text" />
|
|
|
+ 规格:<input type="text" v-model="bomInfo.spec" class="text" maxlength="100"/>
|
|
|
</div>
|
|
|
<div class="w50">
|
|
|
<span style="margin-right: 1px;">*截止时间: </span><el-date-picker
|
|
|
@@ -225,7 +225,7 @@
|
|
|
</div>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input type="text" class="form-control" v-model="modifyObj.amount" :class="{'error': !validObj.amount}" @blur="checkAmount" @input="onAmountInput">
|
|
|
+ <input type="text" maxlength="4" class="form-control" v-model="modifyObj.amount" :class="{'error': !validObj.amount}" @blur="checkAmount" @input="onAmountInput">
|
|
|
</td>
|
|
|
<!--<td>
|
|
|
<input type="text" class="form-control" v-model="modifyObj.produceDate" @input="onProduceDateChange">
|
|
|
@@ -396,6 +396,11 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ countBlur(item) {
|
|
|
+ if (this.bomInfo.count < 1 || this.bomInfo.count === '') {
|
|
|
+ this.bomInfo.count = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
getDate1: function () {
|
|
|
this.bomInfo.endTime = this.bomInfo.endTime ? this.baseUtils.getFullDay(this.baseUtils.getClearDay(new Date(this.baseUtils.formatDate(new Date(this.bomInfo.endTime), 'yyyy-MM-dd')))) : null
|
|
|
this.bomInfo.flag = true
|
|
|
@@ -447,10 +452,11 @@
|
|
|
} else if (!this.bomInfo.endTime || this.bomInfo.endTime === '') {
|
|
|
this.$message.error('请选择截止时间')
|
|
|
return
|
|
|
- } else if (!this.bomInfo.spec || this.bomInfo.spec === '') {
|
|
|
- this.$message.error('请输入规格')
|
|
|
- return
|
|
|
}
|
|
|
+ // else if (!this.bomInfo.spec || this.bomInfo.spec === '') {
|
|
|
+ // this.$message.error('请输入规格')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
let bom = this.bomInfo
|
|
|
this.$http.post('/seek/bom/edit', bom).then(response => {
|
|
|
this.$http.post('/seek/confirmBom?bomId=' + Number(this.$route.params.id) + '&endTime=' + this.bomInfo.endTime.getTime() + '&count=' + this.bomInfo.count)
|
|
|
@@ -1076,6 +1082,7 @@
|
|
|
// noDetail
|
|
|
this.$http.get('/seek/bom/noDetail?bomId=' + this.$route.params.id).then(res => {
|
|
|
this.bomInfo = res.data
|
|
|
+ this.bomInfo.count = this.bomInfo.count || 1
|
|
|
})
|
|
|
}
|
|
|
}
|