luobang 2 年之前
父节点
当前提交
6ec1588345

+ 30 - 18
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -834,27 +834,39 @@ export default {
         map.mapList = arr
         saleOrderListMap.push(map)
       })
-      this.axios
-        .post('/api/v1/ams/addSteelSaleOrderList', saleOrderListMap)
-        .then(res => {
-          if (res.data.code == '200') {
-            this.getRequestUrl()
-            this.tableData = []
-            loading.close()
-            this.$message.success('新增销售订单成功!')
-          } else {
-            console.log(res.data.data)
-            this.$message.error(res.data.data)
-            this.getRequestUrl()
+      if (saleOrderListMap.length > 0) {
+        this.axios
+          .post('/api/v1/ams/addSteelSaleOrderList', saleOrderListMap)
+          .then(res => {
+            if (res.data.code == '200') {
+              this.getRequestUrl()
+              this.tableData = []
+              loading.close()
+              this.$message.success('新增销售订单成功!')
+            } else {
+              console.log(res.data.data)
+              this.$message.error(res.data.data)
+              this.getRequestUrl()
+              loading.close()
+              this.tableData = []
+            }
+          })
+          .catch(e => {
             loading.close()
+            this.$message.error('请检查excel格式')
             this.tableData = []
-          }
-        })
-        .catch(e => {
-          loading.close()
-          this.$message.error('请检查excel格式')
-          this.tableData = []
+          })
+      } else {
+        this.$message({
+          type: 'error',
+          duration: 3500,
+          offset: 250,
+          message:
+            '该Excel系统未识别到订单,请仔细检查格式。(销售订单必须在第一个sheet,且必须遵循导入模板!)'
         })
+        this.tableData = []
+        loading.close()
+      }
     },
     adverseCloseSaleOrder(row) {
       console.log(row)

+ 12 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1060,6 +1060,7 @@
         </div>
         <span slot="footer" class="dialog-footer">
           <el-button @click="centerDialogVisible = false">返 回</el-button>
+          <el-button @click="submitSteel(this.steelMap)">确定</el-button>
         </span>
         <div>
           <vxe-modal
@@ -2095,6 +2096,17 @@ export default {
   },
   computed: {},
   methods: {
+    submitSteel(obj) {
+      this.$confirm('该操作会修改全部改动的内容,请确认核实后点击!', '提醒', {
+        cancelButtonText: '取消',
+        confirmButtonText: '确认',
+        center: true
+      }).then(() => {
+        this.axios.post('/api/v1/uc/submitSteel', this.steelMap).then(res => {
+          console.log(res)
+        })
+      })
+    },
     resetPrintNumber() {
       this.axios
         .post('/api/v1/bp/resetPrintNumber', this.steelMap)