xxm 6 anni fa
parent
commit
25b8d08e3f
70 ha cambiato i file con 749 aggiunte e 295 eliminazioni
  1. 2 1
      components/menu/data.js
  2. 8 0
      dist/200.html
  3. 10 10
      dist/README.md
  4. 1 0
      dist/_nuxt/00241d32f5b5f69f1fc1.js
  5. 1 0
      dist/_nuxt/02f5be3f0c4b47ed311b.js
  6. 1 0
      dist/_nuxt/17955ced1ec54bc39da3.js
  7. 1 0
      dist/_nuxt/19a6c2867370766b241e.js
  8. 0 2
      dist/_nuxt/3097a6b2cd13474ce6f4.js
  9. 1 1
      dist/_nuxt/03ffe11e3d86c130fdde.js
  10. 1 0
      dist/_nuxt/3c2eac8ad27a94604319.js
  11. 1 1
      dist/_nuxt/71403128e7d91cbdfa4d.js
  12. 1 0
      dist/_nuxt/64b1121f4d2730441905.js
  13. 1 0
      dist/_nuxt/6966f69ba9f59ad2c697.js
  14. 1 0
      dist/_nuxt/6c7bdded894e57facca8.js
  15. 1 0
      dist/_nuxt/7062c052d26ef1358532.js
  16. 1 0
      dist/_nuxt/79e1fcb959984c26d2a4.js
  17. 1 0
      dist/_nuxt/7a4b1c8e490d76fe5cc9.js
  18. 2 0
      dist/_nuxt/7b388ba9f28bc0cfc779.js
  19. 1 0
      dist/_nuxt/8110229d146e04a11fa2.js
  20. 1 0
      dist/_nuxt/833eded0dd3d214c7447.js
  21. 1 0
      dist/_nuxt/88663e38ac1805f432c5.js
  22. 1 0
      dist/_nuxt/89301e1c0ad3684e1f73.js
  23. 2 0
      dist/_nuxt/94e8b39315738b23162d.js
  24. 1 0
      dist/_nuxt/961adb79fb1a961fae6d.js
  25. 1 0
      dist/_nuxt/9af7277f8f2400625f82.js
  26. 1 0
      dist/_nuxt/ab6afffb7744ea21edcf.js
  27. 1 0
      dist/_nuxt/adeb0f69ba9cc6e63b8e.js
  28. 1 0
      dist/_nuxt/be54ed9fa3999c10059d.js
  29. 1 0
      dist/_nuxt/c446386b22d21f89deb9.js
  30. 1 0
      dist/_nuxt/c4a031f4c2bc545f8de4.js
  31. 1 0
      dist/_nuxt/cb9c8eccf09dcabc7605.js
  32. 1 0
      dist/_nuxt/d6e0439bee2502d447d4.js
  33. 1 0
      dist/_nuxt/dd19ef63be6e8af0e9b1.js
  34. 1 0
      dist/_nuxt/dfbc384cfc90811eb975.js
  35. 1 0
      dist/_nuxt/e244c3e7ea9695739bdf.js
  36. 1 0
      dist/_nuxt/ed5b507fc676391b3106.js
  37. 1 0
      dist/_nuxt/f393e869e2c7f0578dee.js
  38. 1 0
      dist/_nuxt/ffc62a79208030262e37.js
  39. 8 0
      dist/index.html
  40. 8 0
      dist/login/index.html
  41. 8 0
      dist/main/404/index.html
  42. 9 0
      dist/main/artificial_order/index.html
  43. 8 0
      dist/main/artificial_orders/index.html
  44. 8 0
      dist/main/balance_change/index.html
  45. 8 0
      dist/main/cats copy/index.html
  46. 8 0
      dist/main/cats/index.html
  47. 8 0
      dist/main/cert_check/index.html
  48. 8 0
      dist/main/cert_edit/index.html
  49. 8 0
      dist/main/cert_pro/index.html
  50. 8 0
      dist/main/cloud_balance/index.html
  51. 8 0
      dist/main/cloud_developer/index.html
  52. 8 0
      dist/main/cloud_job/index.html
  53. 8 0
      dist/main/cloud_order copy/index.html
  54. 8 0
      dist/main/dev_check/index.html
  55. 8 0
      dist/main/dev_check_detail/index.html
  56. 8 0
      dist/main/dev_show/index.html
  57. 8 0
      dist/main/gongmall/index.html
  58. 8 0
      dist/main/group_list/index.html
  59. 8 0
      dist/main/index.html
  60. 8 0
      dist/main/orders/index.html
  61. 8 0
      dist/main/orders_detail/index.html
  62. 8 0
      dist/main/orders_frozen/index.html
  63. 8 0
      dist/main/vip_manager/index.html
  64. 8 0
      dist/main/vip_order/index.html
  65. 8 0
      dist/main/vip_setting/index.html
  66. 8 0
      dist/main/wage_details/index.html
  67. 8 0
      dist/main/wage_settlement/index.html
  68. 448 0
      pages/main/index/artificial_order.vue
  69. 12 0
      pages/main/index/artificial_orders.vue
  70. 0 280
      pages/main/index/order_detail.vue

+ 2 - 1
components/menu/data.js

@@ -19,7 +19,8 @@ export default [
 			},
 			{
 				title: '人工财务表单',
-				path: baseUrl + 'order_detail'
+				path: baseUrl + 'artificial_order',
+				hidden: true
 			},
 			{
 				title: '余额变动管理',

File diff suppressed because it is too large
+ 8 - 0
dist/200.html


+ 10 - 10
dist/README.md

@@ -1,10 +1,10 @@
-# STATIC
-
-**This directory is not required, you can delete it if you don't want to use it.**
-
-This directory contains your static files.
-Each file inside this directory is mapped to `/`.
-
-Example: `/static/robots.txt` is mapped as `/robots.txt`.
-
-More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
+# STATIC
+
+**This directory is not required, you can delete it if you don't want to use it.**
+
+This directory contains your static files.
+Each file inside this directory is mapped to `/`.
+
+Example: `/static/robots.txt` is mapped as `/robots.txt`.
+
+More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).

File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/00241d32f5b5f69f1fc1.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/02f5be3f0c4b47ed311b.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/17955ced1ec54bc39da3.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/19a6c2867370766b241e.js


File diff suppressed because it is too large
+ 0 - 2
dist/_nuxt/3097a6b2cd13474ce6f4.js


File diff suppressed because it is too large
+ 1 - 1
dist/_nuxt/03ffe11e3d86c130fdde.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/3c2eac8ad27a94604319.js


File diff suppressed because it is too large
+ 1 - 1
dist/_nuxt/71403128e7d91cbdfa4d.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/64b1121f4d2730441905.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/6966f69ba9f59ad2c697.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/6c7bdded894e57facca8.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/7062c052d26ef1358532.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/79e1fcb959984c26d2a4.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/7a4b1c8e490d76fe5cc9.js


File diff suppressed because it is too large
+ 2 - 0
dist/_nuxt/7b388ba9f28bc0cfc779.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/8110229d146e04a11fa2.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/833eded0dd3d214c7447.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/88663e38ac1805f432c5.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/89301e1c0ad3684e1f73.js


File diff suppressed because it is too large
+ 2 - 0
dist/_nuxt/94e8b39315738b23162d.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/961adb79fb1a961fae6d.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/9af7277f8f2400625f82.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/ab6afffb7744ea21edcf.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/adeb0f69ba9cc6e63b8e.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/be54ed9fa3999c10059d.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/c446386b22d21f89deb9.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/c4a031f4c2bc545f8de4.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/cb9c8eccf09dcabc7605.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/d6e0439bee2502d447d4.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/dd19ef63be6e8af0e9b1.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/dfbc384cfc90811eb975.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/e244c3e7ea9695739bdf.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/ed5b507fc676391b3106.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/f393e869e2c7f0578dee.js


File diff suppressed because it is too large
+ 1 - 0
dist/_nuxt/ffc62a79208030262e37.js


File diff suppressed because it is too large
+ 8 - 0
dist/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/login/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/404/index.html


File diff suppressed because it is too large
+ 9 - 0
dist/main/artificial_order/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/artificial_orders/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/balance_change/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cats copy/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cats/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cert_check/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cert_edit/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cert_pro/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cloud_balance/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cloud_developer/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cloud_job/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/cloud_order copy/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/dev_check/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/dev_check_detail/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/dev_show/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/gongmall/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/group_list/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/orders/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/orders_detail/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/orders_frozen/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/vip_manager/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/vip_order/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/vip_setting/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/wage_details/index.html


File diff suppressed because it is too large
+ 8 - 0
dist/main/wage_settlement/index.html


+ 448 - 0
pages/main/index/artificial_order.vue

@@ -0,0 +1,448 @@
+<template>
+  <div>
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-card class="box-card">
+        <div slot="header" class="header clearfix">
+          <span>基本信息</span>
+        </div>
+
+        <el-form-item label="订单编号">
+          <div class="order-number">
+            <span>{{form.orderNo ? form.orderNo : '未生成'}}</span>
+            <span>{{form.orderNo ? `订单编号:${form.orderNo}` : '未生成订单'}}</span>
+            <span class="order-status" v-if="form.status === '0'">订单创建</span>
+            <span class="order-status" v-else-if="form.status === '100'">待审核</span>
+            <span class="order-status" v-else-if="form.status === '101'">审核中</span>
+            <span class="order-status" v-else-if="form.status === '102'">订单审核成功</span>
+            <span class="order-status" v-else-if="form.status === '200'">订单开始处理</span>
+            <span class="order-status" v-else-if="form.status === '201'">订单处理中</span>
+            <span class="order-status" v-else-if="form.status === '202'">订单已处理</span>
+            <span class="order-status" v-else-if="form.status === '300'">订单成功</span>
+            <span class="order-status" v-else-if="form.status === '301'">订单部分退款</span>
+            <span class="order-status" v-else-if="form.status === '302'">订单已失败</span>
+            <span class="order-status" v-else-if="form.status === '303'">订单全额退款</span>
+            <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>
+          </div>
+        </el-form-item>
+
+        <el-form-item label="订单用户" prop="uid">
+          <el-input v-model="form.uid" placeholder="请输入用户uid"></el-input>
+        </el-form-item>
+
+        <el-form-item label="订单名称" prop="productTitle">
+          <el-input v-model="form.productTitle" placeholder="请输入订单名称,尽量遵循命名规则"></el-input>
+        </el-form-item>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="订单类型" prop="productType">
+              <el-select v-model="form.productType" placeholder="请选择订单类型">
+                <el-option
+                  v-for="item in productTypes"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="交易类型" prop="orderType">
+              <el-select v-model="form.orderType" placeholder="请选择交易类型">
+                <el-option
+                  v-for="item in orderTypes"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="订单金额" prop="price">
+              <el-input v-model="form.price" placeholder="请输入实际金额"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="变更余额">
+              <el-radio v-model="radio" label="1" disabled>收入</el-radio>
+              <el-radio v-model="radio" label="2" disabled>支出</el-radio>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="收支类型" prop="channel">
+              <el-select v-model="form.channel" placeholder="请选择支付方式">
+                <el-option
+                  v-for="item in channels"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="支付编码">
+              <el-input v-model="form.outOrderId" placeholder="请输入支付编号,选填"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-card>
+
+      <el-card class="box-card">
+        <div slot="header" class="header clearfix">
+          <span>其他信息(选填)</span>
+        </div>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="项目ID">
+              <el-input v-model="form.productId" placeholder="请输入项目ID"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="关联订单">
+              <el-input v-model="form.originOrderNo" placeholder="请输入平台订单编号"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-form-item label="外部备注">
+          <el-input v-model="form.publicComment" placeholder="请输入用户可见的备注信息"></el-input>
+        </el-form-item>
+
+        <el-form-item label="内部备注">
+          <quill-editor
+            ref="quillEditor"
+            class="editer"
+            :options="editorOption"
+            v-model="form.privateComment"
+          ></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>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button v-if="hasSave" class="comfirm-btn" type="primary" @click="confirmSubmit()">确认提交订单</el-button>
+        <el-button v-else class="comfirm-btn" type="info">确认提交订单</el-button>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      action: "",
+      id: "",
+      form: {
+        uid: "",
+        productTitle: "",
+        productType: "",
+        orderType: "",
+        price: "",
+        channel: "",
+        outOrderId: "",
+        productId: "",
+        originOrderNo: "",
+        publicComment: "",
+        privateComment: "",
+        orderNo: "",
+        status: ""
+      },
+      saveData: {},
+      rules: {
+        uid: [{ required: true, message: "请输入用户uid", trigger: "blur" }],
+        productTitle: [{ required: true, max: 25, message: "请输入订单名称,尽量遵守命名规则", trigger: "blur" }],
+        productType: [{ required: true, message: "请选择订单类型", trigger: "change" }],
+        orderType: [{ required: true, message: "请选择交易类型", trigger: "change" }],
+        price: [{ required: true, message: "请输入实际金额0-10万元", trigger: "blur" }]
+      },
+      orderTypes: [],
+      productTypes: [],
+      channels: [],
+      orderState: [],
+      hasSave: false,
+      radio: "1",
+      editorOption: {
+        modules: {
+          toolbar: [
+            ["bold", "italic", "underline", "strike"], // toggled buttons
+            ["blockquote", "code-block"],
+            [{ header: 1 }, { header: 2 }], // custom button values
+            [{ list: "ordered" }, { list: "bullet" }],
+            [{ script: "sub" }, { script: "super" }], // superscript/subscript
+            [{ indent: "-1" }, { indent: "+1" }], // outdent/indent
+            [{ direction: "rtl" }], // text direction
+            [{ size: ["small", false, "large", "huge"] }], // custom dropdown
+            [{ header: [1, 2, 3, 4, 5, 6, false] }],
+            [{ font: [] }],
+            ["clean"], // remove formatting button
+            ["link", "image"]
+          ],
+          imageResize: {}
+        }
+      }
+    };
+  },
+  // computed: {
+  //   radio() {
+  //     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"
+  //     } else {
+  //       this.radio = "3"
+  //     }
+  //   }
+  // },
+  watch: {
+    'form.orderType': {
+      handler() {
+        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"
+        } else {
+          this.radio = "3"
+        }
+      }
+    }
+  },
+  mounted() {
+    console.log(this.$route.query);
+    const type = this.$route.query.type;
+    if (type === "create") {
+      this.action = "create";
+      this.getAllChoice();
+    } else if (type === "edit") {
+      this.action = ""
+      this.id = this.$route.query.id
+      this.hasSave = true
+      this.getAllChoice()
+      this.getOrder()
+    }
+  },
+  methods: {
+    async getAllChoice() {
+      let res = await this.$post("/api/admin/order/get_all_choice", {
+        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
+      }
+    },
+    async getOrder() {
+      let res = await this.$post("/api/admin/order/get", {
+        order_id: 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 || ""
+          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)
+        }
+      }
+    },
+    async saveOrder() {
+      const data = {
+        id: this.id,
+        uid: this.form.uid,
+        product_title: this.form.productTitle,
+        product_type: this.form.productType,
+        order_type: this.form.orderType,
+        price: this.form.price,
+        channel: this.form.channel,
+        out_order_id: this.form.outOrderId,
+        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)
+      if (res) {
+        if (res.status === 1) {
+          this.hasSave = true
+          this.$message({
+            message: "保存成功",
+            type: "success"
+          })
+        } else if (res.info) {
+          console.log(res.info)
+        }
+      }
+    },
+    async confirmOrder() {
+      const data = {
+        id: this.id,
+        uid: this.form.uid,
+        product_title: this.form.productTitle,
+        product_type: this.form.productType,
+        order_type: this.form.orderType,
+        price: this.form.price,
+        channel: this.form.channel,
+        out_order_id: this.form.outOrderId,
+        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
+      for (const key in confirmData) {
+        if (confirmData[key] !== saveData[key]) {
+          this.$message({
+            message: '与保存订单不一致,请先保存订单!',
+            type: 'warning'
+          })
+          rerun
+        }
+      }
+      let res = await this.$post("/api/admin/order/confirm_order", data)
+      if (res) {
+        if (res.status === 1) {
+          this.$message({
+            message: "提交成功",
+            type: "success"
+          })
+        } else if (res.info) {
+          console.log(res.info)
+        }
+      }
+    },
+    saveSubmit() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          this.saveOrder()
+        } else {
+          console.log("error submit!!")
+          return false
+        }
+      })
+    },
+    confirmSubmit() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          this.confirmOrder()
+        } else {
+          console.log("error submit!!")
+          return false
+        }
+      })
+    },
+    cancelSubmit() {
+      this.$router.push('/main/artificial_orders')
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.box-card {
+  margin-bottom: 10px;
+  width: 100%;
+}
+
+.header {
+  font-size: 24px;
+  color: #222222;
+  font-weight: 600;
+}
+
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  content: "";
+}
+
+.clearfix:after {
+  clear: both;
+}
+
+.order-number {
+  display: flex;
+  align-items: center;
+}
+
+.order-number span:first-child {
+  flex: 1;
+  font-size: 14px;
+  color: #999999;
+}
+
+.order-number span:nth-child(2) {
+  font-size: 14px;
+  color: #999999;
+}
+
+.order-status {
+  display: block;
+  margin-left: 7px;
+  padding: 0 2px;
+  height: 22px;
+  line-height: 22px;
+  border: 1px solid #3c95ff;
+  font-size: 12px;
+  color: #308eff;
+}
+
+.el-select {
+  width: 100%;
+}
+
+.editer {
+  width: 100%;
+  height: 600px;
+  padding: 0 0 50px;
+}
+
+.save-btn {
+  width: 100px;
+  height: 40px;
+}
+
+.cancel-btn {
+  margin-left: 10px;
+  width: 100px;
+  height: 40px;
+}
+
+.comfirm-btn {
+  width: 210px;
+  height: 40px;
+}
+</style>

+ 12 - 0
pages/main/index/artificial_orders.vue

@@ -6,9 +6,13 @@
     <div class="type-boxs">
       <div class="clear">
         <div class="floatr">
+<<<<<<< HEAD
           <nuxt-link :to="{path:'/main/order_detail'}">
             <el-button type="primary">新增订单</el-button>
           </nuxt-link>
+=======
+          <el-button type="primary" @click="createOrder()">新增订单</el-button>
+>>>>>>> 42fa5027cccf279afcd8b7554c0fbfe0c734a7cf
           <el-button>导出报表</el-button>
         </div>
       </div>
@@ -312,6 +316,14 @@ export default {
       var data = res.data;
       this.finaceList = data.orders;
       this.totalCount = Number(data.count);
+    },
+    createOrder() {
+      this.$router.push({
+        path:'artificial_order/',
+        query:{
+          type:'create'
+        }}
+      )
     }
   }
 };

+ 0 - 280
pages/main/index/order_detail.vue

@@ -1,280 +0,0 @@
-<template>
-  <div>
-    <el-card class="box-card">
-
-      <div slot="header" class="header clearfix">
-        <span>基本信息</span>
-      </div>
-      <el-form ref="form" :model="form" label-width="80px">
-
-        <el-form-item label="订单编号">
-          <div class="order-number">
-            <span>未生成</span>
-            <span>订单编号: 7r99r40048</span>
-            <button>待提交</button>
-          </div>
-        </el-form-item>
-
-        <el-form-item label="订单用户">
-          <el-input v-model="form.user" placeholder="请输入用户uid"></el-input>
-        </el-form-item>
-
-        <el-form-item label="订单名称">
-          <el-input v-model="form.name" placeholder="请输入订单名称,尽量遵循命名规则"></el-input>
-        </el-form-item>
-
-        <el-row :gutter="20">
-          <el-col :span="12">
-            <el-form-item label="订单类型">
-              <el-select v-model="value" placeholder="请选择订单类型">
-                <el-option
-                  v-for="item in orderTypes"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.name">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="交易类型">
-              <el-select v-model="value" placeholder="请选择交易类型">
-                <el-option
-                  v-for="item in productTypes"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.name">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-        <el-row :gutter="20">
-          <el-col :span="12">
-            <el-form-item label="订单金额" placeholder="请输入实际金额">
-              <el-input v-model="form.user"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="交易类型">
-              <el-radio v-model="radio" label="1">收入</el-radio>
-              <el-radio v-model="radio" label="2">支出</el-radio>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-        <el-row :gutter="20">
-          <el-col :span="12">
-            <el-form-item label="收支类型">
-              <el-select v-model="value" placeholder="请选择支付方式">
-                <el-option
-                  v-for="item in channels"
-                  :key="item.id"
-                  :label="item. name"
-                  :value="item.name">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="支付编码">
-              <el-input v-model="form.user" placeholder="请输入支付编号,选填"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-      </el-form>
-
-    </el-card>
-
-    <el-card class="box-card">
-
-      <div slot="header" class="header clearfix">
-        <span>其他信息(选填)</span>
-      </div>
-      <el-form ref="form" :model="form" label-width="80px">
-
-        <el-row :gutter="20">
-          <el-col :span="12">
-            <el-form-item label="关联项目">
-              <el-select v-model="value" placeholder="请选择项目类型">
-                <el-option
-                  v-for="item in orderState"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.name">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="项目ID">
-              <el-select v-model="value" placeholder="请输入项目ID">
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-        <el-form-item label="关联订单">
-          <el-input v-model="form.user" placeholder="请输入平台订单编号"></el-input>
-        </el-form-item>
-
-        <el-form-item label="外部备注">
-          <el-input v-model="form.name" placeholder="请输入用户可见的备注信息"></el-input>
-        </el-form-item>
-
-        <el-form-item label="内部备注">
-          <el-input type="textarea" v-model="form.name" placeholder="请输入仅内部可见的备注信息,必填"></el-input>
-        </el-form-item>
-
-      </el-form>
-
-    </el-card>
-
-    <el-form ref="form" :model="form" style="padding: 20px;">
-
-      <el-form-item>
-        <el-button class="save-btn" type="primary">保存</el-button>
-        <el-button class="cancel-btn">取消</el-button>
-      </el-form-item>
-
-      <el-form-item>
-        <el-button class="comfirm-btn" type="primary">确认提交订单</el-button>
-      </el-form-item>
-
-    </el-form>
-
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      form: {
-        user: '',
-        name: '',
-      },
-      options: [{
-        value: '选项1',
-        label: '黄金糕'
-      }, {
-        value: '选项2',
-        label: '双皮奶'
-      }, {
-        value: '选项3',
-        label: '蚵仔煎'
-      }, {
-        value: '选项4',
-        label: '龙须面'
-      }, {
-        value: '选项5',
-        label: '北京烤鸭'
-      }],
-      orderTypes: [],
-      productTypes: [],
-      channels: [],
-      orderState: [],
-      value: '',
-      radio: '1'
-    }
-  },
-  mounted() {
-    this.getAllChoice()
-  },
-  methods: {
-    async getAllChoice() {
-      let res = await this.$post('/api/admin/order/get_all_choice', {
-        action: 'create'
-      })
-      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
-      }
-    },
-  },
-}
-</script>
-
-<style lang="scss" scoped>
-  .box-card {
-    margin-bottom: 10px;
-    width: 100%;
-  }
-
-  .header {
-    font-size: 24px;
-    color: #222222;
-    font-weight: 600;
-  }
-
-  .clearfix:before,
-  .clearfix:after {
-    display: table;
-    content: "";
-  }
-
-  .clearfix:after {
-    clear: both
-  }
-
-  .order-number {
-    display: flex;
-    align-items: center;
-  }
-
-  .order-number span:first-child {
-    flex: 1;
-    font-size: 14px;
-    color: #999999;
-  }
-
-  .order-number span:nth-child(2) {
-    font-size: 14px;
-    color: #999999;
-  }
-
-  .order-number button {
-    margin-left: 7px;
-    height: 22px;
-    border: 1px solid #3C95FF;
-    font-size: 12px;
-    color: #308EFF;
-  }
-
-  .el-select {
-    width: 100%;
-  }
-
-  textarea {
-    width: 100%;
-    height: 100px;
-  }
-
-  .save-btn {
-    width: 100px;
-    height:40px;
-  }
-
-  .cancel-btn {
-    margin-left: 10px;
-    width: 100px;
-    height:40px;
-  }
-
-  .comfirm-btn {
-    width: 210px;
-    height:40px;
-  }
-</style>