chenrui 2 年 前
コミット
eb6770e854

+ 7 - 2
src/views/numsGoodsShelves/recallStockManagement/editStock.vue

@@ -45,7 +45,6 @@
               :min="0"
               placeholder="请输入入库单价"
               @blur="handleEdit(record.putCost,record)"></a-input-number>
-            <div v-if="!record.putCost" style="font-size:12px;color:red;">*入库单价不能为空</div>
           </template>
         </s-table>
         <div style="text-align: center;margin-top: 20px;">
@@ -84,6 +83,7 @@ export default {
         payWay: undefined
       },
       settleData: null,
+      loadDataList: [],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -102,7 +102,6 @@ export default {
         return recallrStockDetailList({ stockPutSn: this.$route.params.stockPutSn }).then(res => {
           let data
           if (res.status == 200) {
-            console.log(res, 'liebiao')
             data = res.data
             for (let i = 0; i < data.length; i++) {
               data[i].no = i + 1
@@ -116,6 +115,7 @@ export default {
             }
           }
           this.spinning = false
+          this.loadDataList = data || []
           return data
         })
       }
@@ -123,6 +123,11 @@ export default {
   },
   methods: {
     handleBack (val) {
+      const flag = this.loadDataList.every(con => con.putCost != null && con.putCost != '')
+      if (!flag) {
+        this.$message.warning('入库单价不能为空!')
+        return
+      }
       if (val == 1) {
         const _this = this
         this.$confirm({