戴艳蓉 преди 3 години
родител
ревизия
9499418c4f

+ 59 - 53
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-error-model.vue

@@ -20,6 +20,7 @@
             ref="ruleForm"
             :model="ruleForm"
             status-icon
+            :size="'mini'"
             :rules="rulesThis"
             label-width="85px"
             class="demo-ruleForm"
@@ -33,8 +34,6 @@
                     maxlength="50"
                   />
                 </el-form-item>
-              </el-col>
-              <el-col :span="12">
                 <el-form-item label="异常原因" prop="error_code">
                   <el-select
                     v-model="ruleForm.error_code"
@@ -53,61 +52,68 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-            </el-row>
-            <el-form-item label="异常备注" prop="remark">
-              <el-input
-                type="textarea"
-                maxlength="250"
-                placeholder="异常备注"
-                :autosize="{ minRows: 3, maxRows: 3 }"
-                v-model="ruleForm.remark"
-              />
-            </el-form-item>
-            <el-form-item label="异常图片" prop="error_img">
-              <div class="el-form-item-error-img">
-                <ul>
-                  <li v-for="(item, index) in ruleForm.error_img" :key="item">
-                    <img :src="item" alt="" />
-                    <i class="el-icon-close" @click="imgClose(index)"></i>
-                  </li>
-                </ul>
-                <div
-                  class="btnupload"
-                  v-if="ruleForm.error_img.length < 5"
-                  style="position: relative"
-                  @click="open"
-                >
-                  <i class="el-icon-plus avatar-uploader-icon"></i>
-                  <file-upload
-                    class="Upload"
-                    :accept="'.jpg,.png,.jpeg'"
-                    :multiple="true"
-                    :uploadcondition="beforeAvatarUpload"
-                    @UploadErrorEvent="UploadErrorEvent"
-                    @UploadSuccessEvent="UploadSuccessEvent"
+              <el-col :span="12">
+                <el-form-item label="异常备注" prop="remark">
+                  <el-input
+                    type="textarea"
+                    maxlength="250"
+                    placeholder="异常备注"
+                    :autosize="{ minRows: 3, maxRows: 3 }"
+                    v-model="ruleForm.remark"
                   />
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="异常图片" prop="error_img">
+                  <div class="el-form-item-error-img">
+                    <ul>
+                      <li
+                        v-for="(item, index) in ruleForm.error_img"
+                        :key="item"
+                      >
+                        <img :src="item" alt="" />
+                        <i class="el-icon-close" @click="imgClose(index)"></i>
+                      </li>
+                    </ul>
+                    <div
+                      class="btnupload"
+                      v-if="ruleForm.error_img.length < 5"
+                      style="position: relative"
+                      @click="open"
+                    >
+                      <i class="el-icon-plus avatar-uploader-icon"></i>
+                      <file-upload
+                        class="Upload"
+                        :accept="'.jpg,.png,.jpeg'"
+                        :multiple="true"
+                        :uploadcondition="beforeAvatarUpload"
+                        @UploadErrorEvent="UploadErrorEvent"
+                        @UploadSuccessEvent="UploadSuccessEvent"
+                      />
+                    </div>
+                  </div>
+                </el-form-item>
+              </el-col>
+              <el-col :span="21">
+                <div class="txt-tips fl">
+                  <p>
+                    <span sty>大小:小于1MB;</span
+                    ><span>类型:jpg.png.jpeg</span>
+                  </p>
                 </div>
-              </div>
-            </el-form-item>
+              </el-col>
+              <el-col :span="3" style="text-align: right">
+                <el-button
+                  class="fr"
+                  type="primary"
+                  :size="'mini'"
+                  @click="submitForm"
+                  >保 存
+                </el-button>
+              </el-col>
+            </el-row>
           </el-form>
         </el-col>
-        <el-col :span="24" style="text-align: right">
-          <div class="txt-tips fl">
-            <p>
-              <span sty>大小:小于1MB;</span><span>尺寸:250*160;</span
-              ><span>类型:jpg.png.jpeg</span>
-            </p>
-          </div>
-          <el-button
-            class="fr"
-            @click="showModelThis = false"
-            style="margin-left: 15px"
-            >关 闭</el-button
-          >
-          <el-button class="fr" type="primary" @click="submitForm"
-            >保 存
-          </el-button>
-        </el-col>
       </el-row>
     </el-card>
   </el-dialog>

+ 22 - 29
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-record-form.vue

@@ -1,42 +1,37 @@
 <template>
   <div v-loading="loading">
     <el-row>
-      <el-col :span="24">
+      <el-col :span="4">
         <el-form
           :model="ruleForm"
           :rules="rulesThis"
           status-icon
+          :size="'mini'"
           ref="ruleForm"
-          label-width="100px"
+          label-width="80px"
           class="demo-ruleForm"
         >
-          <el-row>
-            <el-col :span="12">
-              <el-form-item label="发货总数">
-                <el-input
-                  placeholder="发货总数"
-                  disabled
-                  v-model="ruleForm.send_num"
-                  maxlength="100"
-                >
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="正常数量" prop="wsm_num">
-                <el-input
-                  placeholder="无异常数量"
-                  :disabled="status !== '1'"
-                  v-model="ruleForm.wsm_num"
-                  maxlength="100"
-                >
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
+          <el-form-item label="发货总数">
+            <el-input
+              placeholder="发货总数"
+              disabled
+              v-model="ruleForm.send_num"
+              maxlength="100"
+            >
+            </el-input>
+          </el-form-item>
+          <el-form-item label="正常数量" prop="wsm_num">
+            <el-input
+              placeholder="正常数量"
+              :disabled="status !== '1'"
+              v-model="ruleForm.wsm_num"
+              maxlength="100"
+            >
+            </el-input>
+          </el-form-item>
         </el-form>
       </el-col>
-      <el-col :span="24">
+      <el-col :span="20" style="padding:0 0 0 10px">
         <wsm-in-order-error-model
           :showModel="showModel"
           :id="modelId"
@@ -220,8 +215,6 @@ export default {
     this.initForm();
   },
   methods: {
-    
-
     async initForm() {
       this.loading = true;
       this.rulesThis = this.rules;

+ 1 - 1
src/views/sellOut/project/components/buyGoodModal.vue

@@ -533,7 +533,7 @@ export default {
       let isedit = false;
       order_addr.forEach((e) => {
         if (e.edit) {
-          ta += receipt_quantity * 1;
+          ta += e.receipt_quantity * 1;
           isedit = true;
         }
       });

+ 24 - 23
src/views/sellOut/sellOutOrder/components/want-deliver.vue

@@ -32,13 +32,19 @@
 
       <el-col :span="8">
         <el-form-item label="物流费用" prop="post_fee">
-          <el-input
-            placeholder="物流费用"
-            v-model="ruleForm.post_fee"
-            maxlength="100"
-          >
-            <template slot="append">元</template>
-          </el-input>
+          <digital-input
+            :values="ruleForm.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>
         <el-form-item label="物流单号" prop="post_code">
           <el-input
@@ -66,17 +72,12 @@ export default {
   props: ["id", "sitem", "newTime"],
   mixins: [resToken],
   data() {
-    const validatePrice = (rule, value, callback) => {
-      if (value === "") {
+    const validate_num = (rule, value, callback) => {
+      const { required } = rule;
+      if (required && value === "") {
         callback(new Error("不能为空!"));
       } else {
-        if (isnumber(value)) {
-          callback();
-        } else if (isnumber2(value)) {
-          callback();
-        } else {
-          callback(new Error("仅支持整数或两位小数!"));
-        }
+        callback();
       }
     };
     const validateCode = (rule, value, callback) => {
@@ -115,7 +116,7 @@ export default {
         },
         post_fee: {
           required: true,
-          validator: validatePrice,
+          validator: validate_num,
           trigger: "blur",
         },
       },
@@ -187,14 +188,14 @@ export default {
       });
     },
     handleCompany(e) {
-      console.log(e);
-      if (e && e.code) {
-        this.ruleForm.post_name = [e.shortName];
-        this.ruleForm.page = 1;
-      }
-      console.log(this.ruleForm.express_company);
+      const { code, id, label } = e;
+      this.ruleForm.post_name = label ? [label] : [];
       this.$refs.ruleForm.validateField("post_name");
     },
+    number_change(e, key) {
+      this.ruleForm[key] = e + "" || "0";
+      this.$refs.ruleForm.validateField(key);
+    },
   },
 };
 </script>