Эх сурвалжийг харах

手机号、身份证、钢瓶状态搜索

qianduan 11 сар өмнө
parent
commit
b8ab50cfbd

+ 5 - 0
src/assets/js/blockSort.js

@@ -110,6 +110,11 @@ export const orderStatus = () => {
       bgcolor: '#67C23A',
       label: '配送中',
       value: 5,
+    },
+    {
+      bgcolor: '#67C23A',
+      label: '配送中',
+      value: 6,
     }
   ]
 }

+ 9 - 1
src/components/formEmployee.vue

@@ -56,7 +56,7 @@
         </el-col>
         <el-col :span="12" v-if="ruleForm.provUser.userType == 3">
           <el-form-item>
-            <el-radio-group v-model="ruleForm.provUser.isorders">
+            <el-radio-group v-model="ruleForm.provUser.isorders" :disabled="forbid">
               <el-radio :label="0">送气员</el-radio>
               <el-radio :label="1">库管</el-radio>
             </el-radio-group>
@@ -244,6 +244,10 @@
             required: true,
             message: '请填写身份证号',
             trigger: 'blur'
+          }, {
+            pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
+            message: '请输入正确身份证号',
+            trigger: "blur"
           }],
           "provUser.no": [{
             required: true,
@@ -254,6 +258,10 @@
             required: true,
             message: '请填写联系电话',
             trigger: 'blur'
+          }, {
+            pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+            message: '请输入正确手机号码',
+            trigger: "blur"
           }],
           "provUser.userType": [{
             required: true,

+ 9 - 1
src/components/forms.vue

@@ -1,7 +1,8 @@
 <template>
   <!-- 表单 -->
   <div class="card_employee">
-    <el-form ref="ruleForm" @submit.native.prevent :label-position="labelPosition" :model="ruleForm" :label-width="labelWidth">
+    <el-form ref="ruleForm" @submit.native.prevent :label-position="labelPosition" :model="ruleForm"
+      :label-width="labelWidth">
       <el-row :gutter="10">
         <el-col :span="item.colWidth" v-for="(item, index) in formList" :key="index">
           <el-form-item class="card_independent" :label-width="item.labelWidth" :label="item.label" :prop="item.field"
@@ -10,6 +11,13 @@
               v-model="ruleForm[`${item.field}`]"></el-input>
             <div class="unit_card" v-if="item.unit">{{item.unit}}</div>
           </el-form-item>
+          <el-form-item class="card_independent" :label-width="item.labelWidth" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'number'">
+            <el-input :placeholder="item.placeholder" :disabled="item.disabled" :id="item.field"
+              v-model="ruleForm[`${item.field}`]"
+              @input="value => ruleForm[`${item.field}`] = Number(value.replace(/[^\d]/g,''))"></el-input>
+            <div class="unit_card" v-if="item.unit">{{item.unit}}</div>
+          </el-form-item>
           <el-form-item :label-width="item.labelWidth" :label="item.label" :prop="item.field"
             :rules="detail ? item.rules : {}" v-if="item.type === 'textarea'">
             <el-input :maxlength="item.maxLenght" type="textarea" :rows="item.rowsHeight" :disabled="item.disabled"

+ 2 - 1
src/utils/request.js

@@ -75,7 +75,8 @@ request.interceptors.response.use((response) => {
       localStorage.removeItem('username');
       return store.dispatch('Logout').then(() => {
         router.push('/login');
-        Message.error(res.msg || res.message)
+        // 登录过期
+        // Message.error(res.msg || res.message)
       })
     }
     if (res.code == 200 || res.code == 404) {

+ 26 - 1
src/views/customer/agentOrdering.vue

@@ -131,7 +131,20 @@
         formRuleList: [],
         orderRecordList: [],
         informationList: [],
-        ruleForm: {},
+        ruleForm: {
+          phone: '',
+          type: 0,
+          name: '',
+          cityRegion: [],
+          address: '',
+          remark: '',
+          goodsId: null,
+          specId: '',
+          quantity: 1,
+          storeId: null,
+          userId: null,
+          orderNote: '',
+        },
         operationType: '',
         confirmLoading: false,
         detailedAddress: '',
@@ -230,6 +243,11 @@
           var propertyName = arr.location.split(",")
           params.lng = Number(propertyName[0])
           params.lat = Number(propertyName[1])
+          const loading = this.$loading({
+            lock: true,
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
           if (this.operationType == 'edit') {
             await putCustomer({
               id: this.clientId,
@@ -238,12 +256,18 @@
               if (res.code == 200) {
                 this.placePutOrder(params)
               }
+              loading.close();
+            }).catch(() => {
+              loading.close();
             })
           } else {
             await addCustomer(params).then(res => {
               if (res.code == 200) {
                 this.placeOrder(res.data)
               }
+              loading.close();
+            }).catch(() => {
+              loading.close();
             })
           }
         } else {
@@ -393,6 +417,7 @@
         }).then(res => {
           // console.log(res, '配送员')
           if (res.code == 200) {
+            this.ruleForm.userId = null
             const arrList = []
             const arr = res.data.list
             arr.forEach((item, index) => {

+ 20 - 1
src/views/customer/orderProcessing.vue

@@ -83,7 +83,17 @@
         tableData: [],
         Total: 0,
         formRuleList: [],
-        ruleForm: {},
+        ruleForm: {
+          name: '',
+          phone: '',
+          cityRegion: [],
+          address: '',
+          goodsId: null,
+          quantity: null,
+          storeId: null,
+          userId: null,
+          remark: '',
+        },
         confirmLoading: false,
         searchValue: {},
         orderId: '',
@@ -133,6 +143,11 @@
             storeId: Number(this.ruleForm.storeId),
             userId: Number(this.ruleForm.userId),
           }
+          const loading = this.$loading({
+            lock: true,
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
           orderDelivery(params).then((res) => {
             if (res.code == 200) {
               this.staffDialogVisible = false
@@ -142,6 +157,9 @@
                 type: 'success'
               });
             }
+            loading.close();
+          }).catch(() => {
+            loading.close();
           })
         } else {
           this.$message.error('表单信息不完整,请继续填写完整');
@@ -235,6 +253,7 @@
         }).then(res => {
           // console.log(res, '配送员')
           if (res.code == 200) {
+            this.ruleForm.userId = null
             const arrList = []
             const arr = res.data.list
             arr.forEach((item, index) => {

+ 5 - 1
src/views/customer/orderTable.js

@@ -110,6 +110,10 @@ export const formRules = () => {
       required: true,
       message: '请输入来电号码',
       trigger: 'blur'
+    }, {
+      pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+      message: '请输入正确手机号码',
+      trigger: "blur"
     }]
   }, {
     label: '搜索客户信息',
@@ -215,7 +219,7 @@ export const formRules = () => {
     field: 'quantity',
     label: '数量',
     placeholder: '数量',
-    type: 'input',
+    type: 'number',
     colWidth: 8,
     labelWidth: '60px',
     rules: [{

+ 4 - 0
src/views/customer/pigeonhole.js

@@ -43,6 +43,10 @@ export const formRules = () => {
       required: true,
       message: '请输入电话',
       trigger: 'blur'
+    }, {
+      pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+      message: '请输入正确手机号码',
+      trigger: "blur"
     }]
   }, {
     field: 'cityRegion',

+ 4 - 0
src/views/manufacture/carTable.js

@@ -162,6 +162,10 @@ export const rules = () => {
       required: true,
       message: '请输入联系电话',
       trigger: 'blur'
+    }, {
+      pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+      message: '请输入正确手机号码',
+      trigger: "blur"
     }]
   }, {
     field: 'issueAuthority',

+ 20 - 4
src/views/manufacture/cylinderCondition.vue

@@ -6,7 +6,8 @@
       <div class="card_district">
         <div class="herderArea center_in title_green">重瓶区</div>
         <div class="same_row_in card_add_cylinder">
-          <el-input style="margin-right: 10px;" v-model="input" placeholder="输入单位内编号搜索"></el-input>
+          <el-input style="margin-right: 10px;" v-model="input" placeholder="输入单位内编号搜索"
+            @input="cylinderSearch"></el-input>
           <el-button type="primary" size="medium" icon="el-icon-plus" @click="AddCylinder(1)">添加</el-button>
         </div>
         <div style="width: calc(100% - 30px);padding: 0px 15px 15px 15px;" v-if="bottleData.length > 0">
@@ -32,7 +33,8 @@
       <div class="card_district">
         <div class="herderArea center_in title_yellow">空瓶区</div>
         <div class="same_row_in card_add_cylinder">
-          <el-input style="margin-right: 10px;" v-model="input" placeholder="输入单位内编号搜索"></el-input>
+          <el-input style="margin-right: 10px;" v-model="input1" placeholder="输入单位内编号搜索"
+            @input="cylinderSearch1"></el-input>
           <el-button type="primary" size="medium" icon="el-icon-plus" @click="AddCylinder(2)">添加</el-button>
         </div>
         <div style="width: calc(100% - 30px);padding: 0px 15px 15px 15px;" v-if="bottleData1.length > 0">
@@ -58,7 +60,8 @@
       <div class="card_district">
         <div class="herderArea center_in title_red">不合格瓶区</div>
         <div class="same_row_in card_add_cylinder">
-          <el-input style="margin-right: 10px;" v-model="input" placeholder="输入单位内编号搜索"></el-input>
+          <el-input style="margin-right: 10px;" v-model="input2" placeholder="输入单位内编号搜索"
+            @input="cylinderSearch2"></el-input>
           <el-button type="primary" size="medium" icon="el-icon-plus" @click="AddCylinder(3)">添加</el-button>
         </div>
         <div style="width: calc(100% - 30px);padding: 0px 15px 15px 15px;" v-if="bottleData2.length > 0">
@@ -141,6 +144,8 @@
     data() {
       return {
         input: '',
+        input1: '',
+        input2: '',
         // 重瓶
         Pagination: {
           PageIndex: 1,
@@ -197,6 +202,7 @@
           page: this.Pagination.PageIndex,
           pageSize: this.Pagination.PageSize,
           status: state,
+          inner_code: this.input,
         }).then(res => {
           if (res.code == 200) {
             this.bottleData = res.data.list
@@ -209,6 +215,7 @@
           page: this.Pagination1.PageIndex,
           pageSize: this.Pagination1.PageSize,
           status: state,
+          inner_code: this.input1,
         }).then(res => {
           if (res.code == 200) {
             this.bottleData1 = res.data.list
@@ -221,14 +228,23 @@
           page: this.Pagination2.PageIndex,
           pageSize: this.Pagination2.PageSize,
           status: state,
+          inner_code: this.input2,
         }).then(res => {
           if (res.code == 200) {
             this.bottleData2 = res.data.list
             this.Pagination2.Total = res.data.count
-            console.log(this.Pagination1, 2566)
           }
         })
       },
+      cylinderSearch(value) {
+        this.getList(1)
+      },
+      cylinderSearch1(value) {
+        this.getList1(2)
+      },
+      cylinderSearch2(value) {
+        this.getList2(3)
+      },
       // 添加钢瓶
       AddCylinder(type) {
         if (type == 1) {

+ 2 - 1
src/views/system/employee.vue

@@ -66,7 +66,7 @@
           type: 'input',
           label: '登录账号',
           field: 'username',
-          placeholder: '姓名',
+          placeholder: '登录账号',
         }, {
           type: 'input',
           label: '姓名',
@@ -103,6 +103,7 @@
             hireTime: '',
             education: '',
             jobCategory: '',
+            personQual: '',
             description: '',
           },
           provTruck: {

+ 4 - 0
src/views/system/outlet.js

@@ -49,6 +49,10 @@ export const formRules = () => {
         required: true,
         message: '请输入联系人电话',
         trigger: 'blur'
+      }, {
+        pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+        message: '请输入正确手机号码',
+        trigger: "blur"
       }]
     }, {
       field: 'cityRegion',

+ 9 - 1
src/views/system/salesStore.vue

@@ -104,6 +104,7 @@
       // 搜索
       searchProtocol(value) {
         this.searchValue = value
+        this.treeDataList = []
         this.getList()
       },
       getList() {
@@ -298,7 +299,14 @@
           this.shopTitle = '详情'
         }
         if (type == 'del') {
-          this.deleteItem(row.id)
+          if (row.children && row.children.length > 0) {
+            this.$message({
+              message: '请先删除子级门店',
+              type: 'warning'
+            });
+          } else {
+            this.deleteItem(row.id)
+          }
         } else if (type == 'edit' || type == 'logs') {
           if (row.provStore) {
             this.$nextTick(() => {

+ 9 - 1
src/views/system/transport.vue

@@ -77,6 +77,7 @@
       // 搜索
       searchProtocol(value) {
         this.searchValue = value
+        this.treeDataList = []
         this.getList()
       },
       getList() {
@@ -207,7 +208,14 @@
           this.shopTitle = '详情'
         }
         if (type == 'del') {
-          this.deleteItem(row.id)
+          if (row.children && row.children.length > 0) {
+            this.$message({
+              message: '请先删除子级企业',
+              type: 'warning'
+            });
+          } else {
+            this.deleteItem(row.id)
+          }
         } else if (type == 'edit' || type == 'logs') {
           if (row.provTruckEnterprise) {
             this.ruleForm = JSON.parse(JSON.stringify(row.provTruckEnterprise))

+ 18 - 6
src/views/system/transportation.js

@@ -3,18 +3,18 @@ import {
 } from '@/assets/js/districtCode'
 export const rules = () => {
   return [{
-    field: 'provTruckEnterprise.socialCode',
-    label: '社会信用代码',
-    colWidth: '200',
-    align: 'center',
-    fixed: 'left',
-  }, {
     field: 'name',
     label: '企业名称',
     colWidth: '150',
     align: 'center',
     fixed: 'left',
   }, {
+    field: 'provTruckEnterprise.socialCode',
+    label: '社会信用代码',
+    colWidth: '200',
+    align: 'center',
+    fixed: 'left',
+  }, {
     field: 'provTruckEnterprise.enterPhone',
     label: '企业联系电话',
     colWidth: '150',
@@ -171,6 +171,10 @@ export const formRules = () => {
       required: true,
       message: '请输入企业联系电话',
       trigger: 'blur'
+    }, {
+      pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+      message: '请输入正确手机号码',
+      trigger: "blur"
     }]
   }, {
     field: 'address',
@@ -204,6 +208,10 @@ export const formRules = () => {
       required: true,
       message: '请输入法人代表电话',
       trigger: 'blur'
+    }, {
+      pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+      message: '请输入正确手机号码',
+      trigger: "blur"
     }]
   }, {
     field: 'securityPerson',
@@ -226,6 +234,10 @@ export const formRules = () => {
       required: true,
       message: '请输入安全管理员电话',
       trigger: 'blur'
+    }, {
+      pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+      message: '请输入正确手机号码',
+      trigger: "blur"
     }]
   }, {
     field: 'cityRegion',

+ 1 - 1
src/views/user/Login.vue

@@ -51,7 +51,7 @@
       </el-form>
       <div class="tipBox">
         <div class="random_title" v-if="!enterWay" @click="getEnter(true)">账号密码登录</div>
-        <div class="random_title" v-else @click="getEnter(false)">验证码登录</div>
+        <!-- <div class="random_title" v-else @click="getEnter(false)">验证码登录</div> -->
         <!-- <div class="random_title" @click="randomEntry">直接登录</div> -->
       </div>
       <div class="btnBox center_in">