Tang 3 年之前
父節點
當前提交
9ba8650e93

+ 10 - 2
src/newApi/newOrder.js

@@ -64,6 +64,14 @@ export default {
             params: data
         })
     },
-    
-    
+    //导出错误录入订单
+    inquireorderexportWrongInputOrder(data) {
+        return request({
+            url: '/order/exportWrongInputOrder',
+            method: 'post',
+            data
+        })
+    },
+
+
 }

+ 36 - 1
src/views/Marketing/order/offlineOrder/batchRecord/thirdStep/index.vue

@@ -102,6 +102,7 @@
 </template>
 
 <script>
+import * as baseUrls from "@/utils/request.js";
 import informationAdd from "./informationAdd.vue";
 export default {
   components: { informationAdd },
@@ -268,7 +269,41 @@ export default {
   },
   methods: {
     downErrorData() {
-      console.log(this.errorobj);
+      if (!this.errorobj.length) {
+        this.$message.warning("无失败录入数据");
+        return;
+      }
+      const LIST = this.errorobj.map((item) => {
+        let subjectName = "";
+        for (let i = 0; i < this.sujectList.length; i++) {
+          if (this.sujectList[i].id == item.subjectId) {
+            subjectName = this.sujectList[i].subjectName;
+            break;
+          }
+        }
+        return {
+          cause: item.errmsg,
+          idCard: item.idCard,
+          realname: item.realname,
+          subjectName: subjectName,
+          telphone: item.telphone,
+          goodsName: item.goodsName,
+          goodsPrice: item.standPrice,
+          goodsRealPrice: item.goodsRealPrice,
+          goodsReceived: item.goodsReceived,
+        };
+      });
+      this.$api.inquireorderexportWrongInputOrder(LIST).then((res) => {
+        let url =
+          baseUrls.baseURL + "common/download?fileName=" + res.data.excel.msg;
+        let link = document.createElement("a");
+        let fileName = "导入模板" + ".xlsx";
+        document.body.appendChild(link);
+        link.href = url;
+        link.dowmload = fileName;
+        link.click();
+        link.remove();
+      });
     },
     backSearch() {
       const jump = () => {

+ 1 - 1
src/views/Marketing/order/offlineOrder/orderChargeInfo/topBox.vue

@@ -10,7 +10,7 @@
           >
             <el-input
               readonly
-              :value="formData[item.prop1] - formData[item.prop2]"
+              :value="(formData[item.prop1] - formData[item.prop2]).toFixed(2)"
             ></el-input>
           </el-form-item>
           <el-form-item