|
@@ -792,47 +792,51 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.fixedAssetsInfo.purchasePrice) {
|
|
|
- this.$message({
|
|
|
- message: '采购单价不能为空',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (
|
|
|
- isNaN(this.fixedAssetsInfo.purchasePrice) ||
|
|
|
- (String(this.fixedAssetsInfo.purchasePrice).indexOf('.') != -1 &&
|
|
|
- String(this.fixedAssetsInfo.purchasePrice).length -
|
|
|
- (String(this.fixedAssetsInfo.purchasePrice).indexOf('.') + 1) >
|
|
|
- 2) ||
|
|
|
- this.fixedAssetsInfo.purchasePrice <= 0
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- message: '采购单价输入有误!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (!this.fixedAssetsInfo.currentPrice) {
|
|
|
- this.$message({
|
|
|
- message: '当前单价不能为空',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
+ // if (!this.fixedAssetsInfo.purchasePrice) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '采购单价不能为空',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ if (this.fixedAssetsInfo.purchasePrice) {
|
|
|
+ if (
|
|
|
+ isNaN(this.fixedAssetsInfo.purchasePrice) ||
|
|
|
+ (String(this.fixedAssetsInfo.purchasePrice).indexOf('.') != -1 &&
|
|
|
+ String(this.fixedAssetsInfo.purchasePrice).length -
|
|
|
+ (String(this.fixedAssetsInfo.purchasePrice).indexOf('.') + 1) >
|
|
|
+ 2) ||
|
|
|
+ this.fixedAssetsInfo.purchasePrice <= 0
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '采购单价输入有误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
- if (
|
|
|
- isNaN(this.fixedAssetsInfo.currentPrice) ||
|
|
|
- (String(this.fixedAssetsInfo.currentPrice).indexOf('.') != -1 &&
|
|
|
- String(this.fixedAssetsInfo.currentPrice).length -
|
|
|
- (String(this.fixedAssetsInfo.currentPrice).indexOf('.') + 1) >
|
|
|
- 2) ||
|
|
|
- this.fixedAssetsInfo.currentPrice <= 0
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- message: '当前单价输入有误!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
+ // if (!this.fixedAssetsInfo.currentPrice) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '当前单价不能为空',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ if (this.fixedAssetsInfo.currentPrice) {
|
|
|
+ if (
|
|
|
+ isNaN(this.fixedAssetsInfo.currentPrice) ||
|
|
|
+ (String(this.fixedAssetsInfo.currentPrice).indexOf('.') != -1 &&
|
|
|
+ String(this.fixedAssetsInfo.currentPrice).length -
|
|
|
+ (String(this.fixedAssetsInfo.currentPrice).indexOf('.') + 1) >
|
|
|
+ 2) ||
|
|
|
+ this.fixedAssetsInfo.currentPrice <= 0
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '当前单价输入有误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
if (this.flag == 1) {
|
|
|
title = '确定提交资产信息?'
|