|
@@ -13,7 +13,7 @@
|
|
|
</t-td>
|
|
</t-td>
|
|
|
<t-td align="center" color="info">
|
|
<t-td align="center" color="info">
|
|
|
<view>
|
|
<view>
|
|
|
- <input v-model="item.inTurn" @focus="item.inTurn=''" name="inTurn"
|
|
|
|
|
|
|
+ <input v-model="item.inTurn" name="inTurn" @focus="clear(item)"
|
|
|
type="number" style="border:1upx solid #cccccc;color:#333333;" />
|
|
type="number" style="border:1upx solid #cccccc;color:#333333;" />
|
|
|
</view>
|
|
</view>
|
|
|
</t-td>
|
|
</t-td>
|
|
@@ -61,6 +61,10 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ clear(item){
|
|
|
|
|
+ item.inTurn=''
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ },
|
|
|
affirmBatch(val) {
|
|
affirmBatch(val) {
|
|
|
let that = this
|
|
let that = this
|
|
|
if (val.index === 0) {
|
|
if (val.index === 0) {
|
|
@@ -84,23 +88,23 @@ export default {
|
|
|
let addData = [];
|
|
let addData = [];
|
|
|
uni.showLoading({mask:true})
|
|
uni.showLoading({mask:true})
|
|
|
this.list.data.forEach(function(value,index,array){
|
|
this.list.data.forEach(function(value,index,array){
|
|
|
- if(that.$util.isMoney(value.inTurn) == false){
|
|
|
|
|
- that.$msg('【'+value.name+'】的排序值填写错误')
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if(that.$util.isMoney(value.shelfLife) == false){
|
|
|
|
|
- that.$msg('【'+value.name+'】的保持期填写错误')
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- addData.push({id:value.id,inTurn:value.inTurn,shelfLife:value.shelfLife})
|
|
|
|
|
|
|
+ if(that.$util.isMoney(value.inTurn) == false){
|
|
|
|
|
+ that.$msg('【'+value.name+'】的排序值填写错误')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if(that.$util.isMoney(value.shelfLife) == false){
|
|
|
|
|
+ that.$msg('【'+value.name+'】的保持期填写错误')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ addData.push({id:value.id,inTurn:value.inTurn,shelfLife:value.shelfLife})
|
|
|
})
|
|
})
|
|
|
let addString = JSON.stringify(addData)
|
|
let addString = JSON.stringify(addData)
|
|
|
batchChangeMore({addData:addString}).then(res=>{
|
|
batchChangeMore({addData:addString}).then(res=>{
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
- setTimeout(function(){
|
|
|
|
|
- that.$msg(res.msg)
|
|
|
|
|
- },500)
|
|
|
|
|
|
|
+ that.$msg(res.msg)
|
|
|
|
|
+ that.resetList();
|
|
|
|
|
+ that.init()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|