dev01 2 years ago
parent
commit
f5a0c1c439

+ 45 - 1
js/component/manageCenter/order/orderNew/addService.jsx

@@ -1966,6 +1966,41 @@ const NewService = Form.create()(
         }.bind(this)
       );
     },
+    //订单作废
+    examOks() {
+      this.setState({
+        loading: true,
+      });
+      $.ajax({
+        method: "post",
+        dataType: "json",
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
+        data: {
+          orderNo: this.state.orderNo, //订单编号
+        },
+        success: function (data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            message.success("该订单已作废~");
+            this.setState({
+              visible: false,
+              loading: false,
+            });
+            this.loadData();
+          }
+        }.bind(this),
+      }).always(
+        function () {
+          this.setState({
+            loading: false,
+          });
+        }.bind(this)
+      );
+    },
     //订单详情修改
     xiangqingClick(e) {
       e.preventDefault();
@@ -2509,7 +2544,7 @@ const NewService = Form.create()(
         isSubmit: 1,
       });
     },
-    //点击签单
+    //点击保存
     handleCancelq() {
       this.setState({
         isSubmit: 0,
@@ -6317,6 +6352,15 @@ const NewService = Form.create()(
                               </Button>
                               <Button
                                 className="cancel"
+                                type="danger"
+                                onClick={this.examOks}
+                                style={{ marginLeft: "50px" }}
+                                loading={this.state.loading}
+                              >
+                                订单作废
+                              </Button>
+                              <Button
+                                className="cancel"
                                 type="ghost"
                                 onClick={this.handleCancelclose}
                                 style={{ marginLeft: "50px" }}

+ 1 - 1
js/component/manageCenter/order/orderNew/reject.jsx

@@ -2578,7 +2578,7 @@ const IntentionCustomer = Form.create()(
                       </Button>
                       <Button
                         className="cancel"
-                        type="primary"
+                        type="danger"
                         onClick={this.examOks}
                         style={{ marginLeft: "50px" }}
                         htmlType="submit"

+ 1 - 1
js/component/manageCenter/order/source/index.jsx

@@ -585,7 +585,7 @@ class Source extends Component {
             title={
               <div>
                 <span style={{ marginRight: 20 }}>客户订单列表</span>
-                {!!datas["salesType"] && <span style={{ color: "red", marginRight: 20 }}>销售类型:{salesList[datas["salesType"]]}</span>}
+                {!!salesList[datas["salesType"]] && <span style={{ color: "red", marginRight: 20 }}>销售类型:{salesList[datas["salesType"]]}</span>}
                 <span style={{ color: "red" }}>省份:{getProvince(datas["province"])}</span>
               </div>}
             width="90%"