高敬炎 2 years ago
parent
commit
bf2fb84b59

+ 1 - 2
src/views/profitable/expensemanagementdetails.vue

@@ -133,8 +133,7 @@
               </div>
               <div v-else-if="scope.row.expensesPurpose == 3">
                 库点费用
-                <span v-if="scope.row.storageFeeFlag == 1">-仓储费</span>
-                <span v-else>-非粮款</span>
+                <span v-if="scope.row.wareExpenseType">-{{ scope.row.wareExpenseType }}</span>
               </div>
               <div v-else-if="scope.row.expensesPurpose == 5">经营性费用</div>
               <div v-else-if="scope.row.expensesPurpose == 7">备用金</div>

+ 44 - 40
src/views/profitable/fixedAssets.vue

@@ -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 = '确定提交资产信息?'