xxm 6 lat temu
rodzic
commit
ebc8863a6d

Plik diff jest za duży
+ 2 - 2
dist/200.html


Plik diff jest za duży
+ 1 - 1
dist/_nuxt/ea2aa90a70e2e07369f8.js


Plik diff jest za duży
+ 1 - 1
dist/_nuxt/c3b08428608d2837525c.js


Plik diff jest za duży
+ 1 - 1
dist/_nuxt/b5b2fb51d64ce83efc1d.js


Plik diff jest za duży
+ 2 - 2
dist/index.html


Plik diff jest za duży
+ 2 - 2
dist/login/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/404/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/artificial_order/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/artificial_orders/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/balance_change/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cats copy/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cats/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cert_check/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cert_edit/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cert_pro/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cloud_balance/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cloud_developer/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cloud_job/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/cloud_order copy/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/dev_check/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/dev_check_detail/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/dev_show/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/gongmall/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/group_list/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/orders/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/orders_detail/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/orders_frozen/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/vip_manager/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/vip_order/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/vip_setting/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/wage_details/index.html


Plik diff jest za duży
+ 2 - 2
dist/main/wage_settlement/index.html


+ 146 - 118
pages/main/index/artificial_order.vue

@@ -24,7 +24,7 @@
             <span class="order-status" v-else-if="form.status === '400'">订单支付中</span>
             <span class="order-status" v-else-if="form.status === '401'">订单支付成功</span>
             <span class="order-status" v-else-if="form.status === '402'">订单支付失败</span>
-            <span class="order-status" v-else>未生成</span> -->
+            <span class="order-status" v-else>未生成</span>-->
           </div>
         </el-form-item>
 
@@ -39,7 +39,11 @@
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="订单类型" prop="productType">
-              <el-select v-model="form.productTypeName" placeholder="请选择订单类型" @change="productTypeChange">
+              <el-select
+                v-model="form.productTypeName"
+                placeholder="请选择订单类型"
+                @change="productTypeChange"
+              >
                 <el-option
                   v-for="item in productTypes"
                   :key="item.id"
@@ -51,7 +55,11 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="交易类型" prop="orderType">
-              <el-select v-model="form.orderTypeName" placeholder="请选择交易类型" @change="orderTypeChange">
+              <el-select
+                v-model="form.orderTypeName"
+                placeholder="请选择交易类型"
+                @change="orderTypeChange"
+              >
                 <el-option
                   v-for="item in orderTypes"
                   :key="item.id"
@@ -129,7 +137,7 @@
           ></quill-editor>
         </el-form-item>
       </el-card>
-    
+
       <el-form-item>
         <el-button class="save-btn" type="primary" @click="saveSubmit()">保存</el-button>
         <el-button class="cancel-btn" @click="cancelSubmit()">取消</el-button>
@@ -148,28 +156,28 @@ export default {
   data() {
     let checkPrice = (rule, value, callback) => {
       if (!value) {
-        return callback(new Error("请输入订单金额"))
+        return callback(new Error("请输入订单金额"));
       } else if (isNaN(value) || value > 100000) {
-        return callback(new Error("请输入实际金额0-10万元"))
-      } else { 
-        callback()
+        return callback(new Error("请输入实际金额0-10万元"));
+      } else {
+        callback();
       }
-    }
+    };
     let checkProductId = (rule, value, callback) => {
       if (isNaN(value)) {
-        return callback(new Error("请输入数字"))
-      } else { 
-        callback()
+        return callback(new Error("请输入数字"));
+      } else {
+        callback();
       }
-    }
+    };
     let checkOriginOrderNo = (rule, value, callback) => {
-      const reg = /^[0-9a-zA-Z]+$/
+      const reg = /^[0-9a-zA-Z]+$/;
       if (!reg.test(value)) {
-        return callback(new Error("请输入数字和字母"))
-      } else { 
-        callback()
+        return callback(new Error("请输入数字和字母"));
+      } else {
+        callback();
       }
-    }
+    };
     return {
       action: "",
       id: "",
@@ -196,17 +204,27 @@ export default {
         uid: [{ required: true, message: "请输入用户uid", trigger: "blur" }],
         productTitle: [
           { required: true, message: "请输入订单名称", trigger: "blur" },
-          { max: 25, message: "订单名称最多输入25个字", trigger: "blur" },
+          { max: 25, message: "订单名称最多输入25个字", trigger: "blur" }
+        ],
+        productType: [
+          { required: true, message: "请选择订单类型", trigger: "change" }
+        ],
+        orderType: [
+          { required: true, message: "请选择交易类型", trigger: "change" }
         ],
-        productType: [{ required: true, message: "请选择订单类型", trigger: "change" }],
-        orderType: [{ required: true, message: "请选择交易类型", trigger: "change" }],
         price: [{ validator: checkPrice, trigger: "blur" }],
         originOrderNo: [{ validator: checkOriginOrderNo, trigger: "blur" }],
         productId: [{ validator: checkProductId, trigger: "blur" }],
-        publicComment: [{ max: 50, message: "外部备注最多输入50个字", trigger: "blur" }],
+        publicComment: [
+          { max: 50, message: "外部备注最多输入50个字", trigger: "blur" }
+        ],
         privateComment: [
           { required: true, message: "请输入内部备注", trigger: "blur" },
-          { max: 10000, message: "内部备注最多输入10000个字符", trigger: "blur" },
+          {
+            max: 10000,
+            message: "内部备注最多输入10000个字符",
+            trigger: "blur"
+          }
         ]
       },
       orderTypes: [],
@@ -248,14 +266,18 @@ export default {
   //   }
   // },
   watch: {
-    'form.orderType': {
+    "form.orderType": {
       handler() {
-        if (this.form.orderType === 2 || this.form.orderType === 5 || this.form.orderType === 8) {
-          this.radio = "1"
+        if (
+          this.form.orderType === 2 ||
+          this.form.orderType === 5 ||
+          this.form.orderType === 8
+        ) {
+          this.radio = "1";
         } else if (this.form.orderType === 9) {
-          this.radio = "2"
+          this.radio = "2";
         } else {
-          this.radio = "3"
+          this.radio = "3";
         }
       }
     }
@@ -264,14 +286,14 @@ export default {
     console.log(this.$route.query);
     const type = this.$route.query.type;
     if (type === "create") {
-      this.action = "create"
-      this.getAllChoice()
+      this.action = "create";
+      this.getAllChoice();
     } else if (type === "edit") {
-      this.action = "create"
-      this.id = this.$route.query.id
-      this.hasSave = true
-      this.getAllChoice()
-      this.getOrder()
+      this.action = "create";
+      this.id = this.$route.query.id;
+      this.hasSave = true;
+      this.getAllChoice();
+      this.getOrder();
     }
   },
   methods: {
@@ -280,38 +302,38 @@ export default {
         action: this.action
       });
       if (res) {
-        console.log(res)
-        const allChoice = res.data
-        this.orderTypes = allChoice.order_types
-        this.productTypes = allChoice.product_types
-        this.channels = allChoice.channels
-        this.orderState = allChoice.order_state
+        console.log(res);
+        const allChoice = res.data;
+        this.orderTypes = allChoice.order_types;
+        this.productTypes = allChoice.product_types;
+        this.channels = allChoice.channels;
+        this.orderState = allChoice.order_state;
       }
     },
     async getOrder() {
       let res = await this.$post("/api/admin/order/get", {
-        order_id: this.id
+        order_no: this.id
       });
       if (res) {
         if (res.status === 1 && res.data) {
-          const data = res.data
-          this.form.uid = data.uid || ""
-          this.form.productTitle = data.product_title || ""
-          this.form.productType = data.product_type || ""
-          this.form.orderType = data.order_type || ""
-          this.form.price = data.price.replace("-","") || ""
-          this.form.channel = data.channel || ""
-          this.form.outOrderId = data.out_order_id || ""
-          this.form.productId = data.product_id || ""
-          this.form.originOrderNo = data.origin_order_no || ""
-          this.form.publicComment = data.public_comment || ""
-          this.form.privateComment = data.private_comment || ""
-          this.form.orderNo = data.order_no || ""
-          this.form.status = data.status || ""
-          this.form.productTypeName = data.product_type_name || ""
-          this.form.orderTypeName = data.order_type_name || ""
-          this.form.channelName = data.channel_name || ""
-          console.log(this.form)
+          const data = res.data;
+          this.form.uid = data.uid || "";
+          this.form.productTitle = data.product_title || "";
+          this.form.productType = data.product_type || "";
+          this.form.orderType = data.order_type || "";
+          this.form.price = data.price.replace("-", "") || "";
+          this.form.channel = data.channel || "";
+          this.form.outOrderId = data.out_order_id || "";
+          this.form.productId = data.product_id || "";
+          this.form.originOrderNo = data.origin_order_no || "";
+          this.form.publicComment = data.public_comment || "";
+          this.form.privateComment = data.private_comment || "";
+          this.form.orderNo = data.order_no || "";
+          this.form.status = data.status || "";
+          this.form.productTypeName = data.product_type_name || "";
+          this.form.orderTypeName = data.order_type_name || "";
+          this.form.channelName = data.channel_name || "";
+          console.log(this.form);
         }
       }
     },
@@ -328,26 +350,26 @@ export default {
         origin_order_no: this.form.originOrderNo,
         public_comment: this.form.publicComment,
         private_comment: this.form.privateComment
-      }
-      this.saveData = data
-      let res = await this.$post("/api/admin/order/create", data)
+      };
+      this.saveData = data;
+      let res = await this.$post("/api/admin/order/create", data);
       if (res) {
         if (res.status === 1) {
-          this.id = res.data.id
-          this.saveData.id = res.data.id
-          this.form.orderNo = res.data.order_no
-          this.hasSave = true
+          this.id = res.data.id;
+          this.saveData.id = res.data.id;
+          this.form.orderNo = res.data.order_no;
+          this.hasSave = true;
           this.$message({
             message: "保存成功",
             type: "success"
-          })
+          });
         } else if (res.status === -2) {
           this.$message({
             message: `当前订单用户的账户余额不足(可用余额${res.data.can_use}元),操作失败!`,
             type: "error"
-          })
+          });
         } else if (res.info) {
-          console.log(res.info)
+          console.log(res.info);
         }
       }
     },
@@ -364,86 +386,92 @@ export default {
         origin_order_no: this.form.originOrderNo,
         public_comment: this.form.publicComment,
         private_comment: this.form.privateComment
-      }
-      const confirmData = data
-      const saveData = this.saveData
-      const isConfirm = true
+      };
+      const confirmData = data;
+      const saveData = this.saveData;
+      const isConfirm = true;
       for (const key in confirmData) {
         if (confirmData[key] !== saveData[key]) {
-          console.log(confirmData[key],saveData[key])
+          console.log(confirmData[key], saveData[key]);
           this.$message({
-            message: '与保存订单不一致,请先保存订单!',
-            type: 'warning'
-          })
-          return
+            message: "与保存订单不一致,请先保存订单!",
+            type: "warning"
+          });
+          return;
         }
       }
-      let res = await this.$post("/api/admin/order/confirm_order", data)
+      let res = await this.$post("/api/admin/order/confirm_order", data);
       if (res) {
         if (res.status === 1) {
           this.$message({
             message: "提交成功",
             type: "success"
-          })
+          });
           setTimeout(() => {
-            this.$router.push('/main/artificial_orders')
-          }, 1000)
+            this.$router.push("/main/artificial_orders");
+          }, 1000);
         } else if (res.info) {
-          console.log(res.info)
+          console.log(res.info);
         }
       }
     },
     saveSubmit() {
-      this.$refs['form'].validate(valid => {
+      this.$refs["form"].validate(valid => {
         if (valid) {
-          this.saveOrder()
+          this.saveOrder();
         } else {
-          console.log("error submit!!")
-          return false
+          console.log("error submit!!");
+          return false;
         }
-      })
+      });
     },
     confirmSubmit() {
-      this.$refs['form'].validate(valid => {
+      this.$refs["form"].validate(valid => {
         if (valid) {
-          this.$confirm(`确认提价订单后,${this.form.uid}的账户将${this.form.orderTypeName}${this.form.price}元 ,交易方式为${this.form.channelName},请您再次确认操作!`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          }).then(() => {
-            this.confirmOrder()
-          }).catch(() => {
-            this.$message({
-              type: 'info',
-              message: '已取消提交'
-            })       
-          })
+          this.$confirm(
+            `确认提价订单后,${this.form.uid}的账户将${this.form.orderTypeName}${this.form.price}元 ,交易方式为${this.form.channelName},请您再次确认操作!`,
+            "提示",
+            {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }
+          )
+            .then(() => {
+              this.confirmOrder();
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "已取消提交"
+              });
+            });
         } else {
-          console.log("error submit!!")
-          return false
+          console.log("error submit!!");
+          return false;
         }
-      })
+      });
     },
     cancelSubmit() {
-      this.$router.push('/main/artificial_orders')
+      this.$router.push("/main/artificial_orders");
     },
     productTypeChange() {
-      const productTypeObject = this.productTypes.find((element) => {
-        return element.name === this.form.productTypeName
-      })
-      this.form.productType = productTypeObject.id
+      const productTypeObject = this.productTypes.find(element => {
+        return element.name === this.form.productTypeName;
+      });
+      this.form.productType = productTypeObject.id;
     },
     orderTypeChange() {
-      const orderTypeObject = this.orderTypes.find((element) => {
-        return element.name === this.form.orderTypeName
-      })
-      this.form.orderType = orderTypeObject.id
+      const orderTypeObject = this.orderTypes.find(element => {
+        return element.name === this.form.orderTypeName;
+      });
+      this.form.orderType = orderTypeObject.id;
     },
     channelChange() {
-      const channelObject = this.channels.find((element) => {
-        return element.name === this.form.channelName
-      })
-      this.form.channel = channelObject.id
+      const channelObject = this.channels.find(element => {
+        return element.name === this.form.channelName;
+      });
+      this.form.channel = channelObject.id;
     }
   }
 };

+ 1 - 1
pages/main/index/artificial_orders.vue

@@ -84,7 +84,7 @@
         <el-table-column label="编辑">
           <template slot-scope="scope">
             <!-- 需求是状态等于“待提交的时候显示”给我一个状态_name 或者是待提交的id -->
-            <nuxt-link :to="{path:'/main/artificial_order/?type=edit&id='+scope.row.id}">
+            <nuxt-link :to="{path:'/main/artificial_order/?type=edit&id='+scope.row.order_no}">
               <span v-if="scope.row.status==0" class="lblue point">编辑</span>
             </nuxt-link>
           </template>