Przeglądaj źródła

修改账号规则 订单信息展示

戴艳蓉 3 lat temu
rodzic
commit
9a9dd2f677

+ 12 - 12
src/views/mobile/order/index.vue

@@ -277,15 +277,15 @@ export default {
           label: "用户名",
         },
         {
-          prop: "order_goods_num",
+          prop: "border_num",
           label: "订单数量",
           width: "100px",
         },
-        {
-          prop: "order_goods_num_t",
-          label: "总克重",
-          width: "80px",
-        },
+        // {
+        //   prop: "order_goods_num_t",
+        //   label: "总克重",
+        //   width: "80px",
+        // },
         {
           prop: "order_time",
           label: "下单时间",
@@ -371,12 +371,12 @@ export default {
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
-        this.tableData.forEach((v1) => {
-          v1.order_goods_num =
-            v1.order_num + v1.unit + "/" + v1.unit_weight + "kg";
-          v1.order_goods_num_t = v1.order_num * 1 * (v1.unit_weight * 1) + "kg";
-        });
-        console.log(this.tableData);
+        // this.tableData.forEach((v1) => {
+        //   v1.order_goods_num =
+        //     v1.order_num + v1.unit + "/" + v1.unit_weight + "kg";
+        //   v1.order_goods_num_t = v1.order_num * 1 * (v1.unit_weight * 1) + "kg";
+        // });
+        // console.log(this.tableData);
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 11 - 5
src/views/mobile/park/addEdit.vue

@@ -27,7 +27,7 @@
             <el-form-item :disabled="isDetail" label="账号" prop="username">
               <el-input
                 v-model="ruleForm.username"
-                placeholder="XXXXXX"
+                placeholder="XXXXXXXXX"
                 :disabled="isDetail !== '003'"
                 ><template slot="prepend">CJ1745</template></el-input
               >
@@ -157,13 +157,19 @@ export default {
       if (value === "") {
         callback(new Error("账号不能为空!"));
       } else {
-        if (value.length !== 6) {
+        if (value.length !== 9) {
           callback(new Error("账号不正确!"));
         } else {
-          if (!isnumber(value)) {
-            callback(new Error("账号不正确!"));
+          let a = value.slice(0, 3);
+          let b = value.slice(3, 9);
+          if (a == "TKS" || a == "TKR") {
+            if (!isnumber(b)) {
+              callback(new Error("账号不正确!"));
+            } else {
+              callback();
+            }
           } else {
-            callback();
+            callback(new Error("账号不正确!"));
           }
         }
       }

+ 2 - 3
src/views/mobile/park/index.vue

@@ -101,7 +101,7 @@
                     刷新
                   </el-button>
                 </el-col>
-
+<!-- 
                 <el-col
                   :span="3"
                   style="width: 60px; float: right"
@@ -115,7 +115,7 @@
                   >
                     添加
                   </el-button>
-                </el-col>
+                </el-col> -->
               </el-col>
             </el-row>
           </div>
@@ -278,7 +278,6 @@ export default {
         {
           prop: "username",
           label: "账号",
-          width: "120px",
           fixed: "left",
         },
         {