فهرست منبع

build(发货申请):新建售后申请

snow 2 سال پیش
والد
کامیت
96e4869edc

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/0.js


+ 42 - 3
src/views/sellOut/sellAfterApply/components/wait-return.vue

@@ -25,7 +25,19 @@
       </el-form-item>
 
       <el-form-item label="物流费用" prop="post_fee">
-        <el-input v-model="formData.post_fee" placeholder="物流费用" />
+        <digital-input
+          :values="formData.post_fee"
+          :placeholder="'物流费用'"
+          :min="0"
+          :disabled="type === 'view' || type === 'post_fee'"
+          :max="100000000000"
+          :position="'right'"
+          :precision="2"
+          :size="'mini'"
+          :controls="false"
+          :append="'元'"
+          @reschange="number_change($event, 'post_fee')"
+        />
       </el-form-item>
     </template>
 
@@ -37,6 +49,29 @@
   </el-form>
 </template>
 <script>
+import { isnumber, isNumeric } from '../../../../utils/validate'
+
+const validateCode = (rule, value, callback) => {
+  const { required } = rule
+  const l = value.length
+  if (required) {
+    if (value === '') {
+      callback(new Error('物流单号不能为空!'))
+    } else if (l < 9 || l > 20) {
+      callback(new Error('仅支持纯数字或字母数字组合(9~20位)!'))
+    } else if (isnumber(value)) {
+      callback()
+    } else if (!isNumeric(value)) {
+      console.log(!isNumeric(value))
+      callback(new Error('仅支持纯数字或字母数字组合(9~20位)!'))
+    } else {
+      callback()
+    }
+  } else {
+    callback()
+  }
+}
+
 export default {
   name: 'SupplierExam',
   mixins: [],
@@ -73,8 +108,8 @@ export default {
         post_code: [
           {
             required: true,
-            trigger: 'change',
-            message: '请输入物流单号'
+            validator: validateCode,
+            trigger: 'blur'
           }
         ],
         post_fee: [
@@ -112,6 +147,10 @@ export default {
 
         this.$emit('changeStatus', params)
       })
+    },
+    number_change(e, key) {
+      this.formData[key] = e + '' || '0'
+      this.$refs.formData.validateField(key)
     }
   }
 }

+ 11 - 14
src/views/sellOut/sellOutOrder/components/addEditFormA.vue

@@ -118,7 +118,7 @@
         <el-form-item label="期望意愿" prop="except_code">
           <el-select
             style="width: 100%"
-            :disabled="ruleForm.is_receive === ''"
+            disabled
             v-model="ruleForm.except_code"
             placeholder="期望意愿"
           >
@@ -210,7 +210,7 @@ export default {
         stock_out_numbers: "", //发货单编号
         num: "", //异常数量
         errorCode: "", //异常原因
-        except_code: "", //期望意愿
+        except_code: "1", //期望意愿
         img: [],
         remark: "", //异常备注
       },
@@ -262,26 +262,23 @@ export default {
         ],
       },
       reason_options: [],
-      expect_options: [],
-      expect_options1: [
+      expect_options: [
         {
           value: "1",
           label: "退货",
-        },
+        }
+      ],
+      expect_options1: [
         {
-          value: "2",
-          label: "货",
+          value: "1",
+          label: "退货",
         },
       ],
       expect_options0: [
         {
           value: "1",
           label: "退货",
-        },
-        {
-          value: "2",
-          label: "补发",
-        },
+        }
       ],
       expect_value: "", //期望意愿
       code: "",
@@ -357,7 +354,7 @@ export default {
     async is_receive_change() {
       const { is_receive } = this.ruleForm;
       this.ruleForm.errorCode = "";
-      this.ruleForm.except_code = "";
+      this.ruleForm.except_code = "1";
       if (is_receive === "0") {
         this.ruleForm.num = this.ruleForm.send_num;
       }
@@ -389,7 +386,7 @@ export default {
             send_num: send_num || "",
             num: send_num || "", //异常数量
             errorCode: "", //异常原因
-            except_code: "", //期望意愿
+            except_code: "1", //期望意愿
             img: [],
             outCode: this.code,
           };

+ 42 - 3
src/views/supplierSellOut/supplierSellAfterApply/components/wait-return.vue

@@ -25,7 +25,19 @@
       </el-form-item>
 
       <el-form-item label="物流费用" prop="post_fee">
-        <el-input v-model="formData.post_fee" placeholder="物流费用" />
+        <digital-input
+          :values="formData.post_fee"
+          :placeholder="'物流费用'"
+          :min="0"
+          :disabled="type === 'view' || type === 'post_fee'"
+          :max="100000000000"
+          :position="'right'"
+          :precision="2"
+          :size="'mini'"
+          :controls="false"
+          :append="'元'"
+          @reschange="number_change($event, 'post_fee')"
+        />
       </el-form-item>
     </template>
 
@@ -37,6 +49,29 @@
   </el-form>
 </template>
 <script>
+import { isnumber, isNumeric } from '../../../../utils/validate'
+
+const validateCode = (rule, value, callback) => {
+  const { required } = rule
+  const l = value.length
+  if (required) {
+    if (value === '') {
+      callback(new Error('物流单号不能为空!'))
+    } else if (l < 9 || l > 20) {
+      callback(new Error('仅支持纯数字或字母数字组合(9~20位)!'))
+    } else if (isnumber(value)) {
+      callback()
+    } else if (!isNumeric(value)) {
+      console.log(!isNumeric(value))
+      callback(new Error('仅支持纯数字或字母数字组合(9~20位)!'))
+    } else {
+      callback()
+    }
+  } else {
+    callback()
+  }
+}
+
 export default {
   name: 'SupplierExam',
   mixins: [],
@@ -73,8 +108,8 @@ export default {
         post_code: [
           {
             required: true,
-            trigger: 'change',
-            message: '请输入物流单号'
+            validator: validateCode,
+            trigger: 'blur'
           }
         ],
         post_fee: [
@@ -112,6 +147,10 @@ export default {
 
         this.$emit('changeStatus', params)
       })
+    },
+    number_change(e, key) {
+      this.formData[key] = e + '' || '0'
+      this.$refs.formData.validateField(key)
     }
   }
 }

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است