Quellcode durchsuchen

Merge branch 'sit'

xiaodai2022 vor 2 Jahren
Ursprung
Commit
513c29bbba

Datei-Diff unterdrückt, da er zu groß ist
+ 10 - 0
dist/static/js/0.js


+ 1 - 1
src/views/purchaseIn/purchaseOrder/columns.js

@@ -126,7 +126,7 @@ const columns = [
     prop: "status",
     label: "状态",
     _slot_: "status",
-    width: "110px",
+    width: "120px",
   },
   {
     prop: "order_type",

+ 11 - 11
src/views/purchaseIn/purchaseOrder/components/tolerance.vue

@@ -1,7 +1,7 @@
 <template>
   <span>
     <el-button
-      v-show="isshow && showBtn"
+      v-show="isshow && showBtn && order_type && order_type !== '1'"
       type="primary"
       :size="'mini'"
       class="fr"
@@ -36,15 +36,15 @@ export default {
       spuCode: "",
       is_noble: false,
       isshow: false,
-      showItem:null,
-      cgdNo:"",
+      showItem: null,
+      cgdNo: "",
     };
   },
   mounted() {
-    const { order_type, spuCode,cgdNo } = this.sitem;
+    const { order_type, spuCode, cgdNo } = this.sitem;
     this.order_type = order_type;
     this.spuCode = spuCode;
-    this.cgdNo=cgdNo
+    this.cgdNo = cgdNo;
     // this.queryId = this.$route.query.id;
     this.initData();
   },
@@ -61,7 +61,7 @@ export default {
 
       const { code, data, message } = res;
       if (code === 0) {
-        const { cat_info, is_diff ,noble_weight} = data;
+        const { cat_info, is_diff, noble_weight } = data;
         if (cat_info && cat_info.length > 0) {
           cat_info.forEach((e) => {
             if (e.id === "6") {
@@ -71,10 +71,10 @@ export default {
         }
         if (this.is_noble && is_diff === "1") {
           this.isshow = true;
-          this.showItem={
-            cgdNo:this.cgdNo,
-            weight:noble_weight
-          }
+          this.showItem = {
+            cgdNo: this.cgdNo,
+            weight: noble_weight,
+          };
         }
       } else if (code >= 100 && code <= 104) {
         await this.logout();
@@ -82,7 +82,7 @@ export default {
         this.$message.warning(message);
       }
     },
-    showDiffAdd(){
+    showDiffAdd() {
       // diffAdd = true
     },
   },

+ 2 - 2
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -150,7 +150,7 @@
             <el-collapse-item
               title="入库单"
               name="3"
-              v-if="sitem&&sitem.status !== '0'"
+              v-if="sitem && sitem.status !== '0'"
             >
               <order-in-table
                 :newTime="newTime"
@@ -163,7 +163,7 @@
             <el-collapse-item
               title="工差单"
               name="4"
-              v-if="sitem&&sitem.status !== '0' && sitem.status !== '1'"
+              v-if="sitem&&sitem.order_type!=='1'&&sitem.status !== '0' && sitem.status !== '1'&&sitem.purcheasediff"
             >
               <work-diff-table
                 :newTime="newTime"

+ 49 - 5
src/views/sellOut/zixunOrder/components/buyGoodModal.vue

@@ -22,6 +22,7 @@
             :newTime="newTime"
             v-if="newTime !== '' && sitem"
             :sitem="sitem"
+            border
             :columns="ShowDataTableColumns"
           >
             <template slot="good_name">
@@ -65,7 +66,7 @@
             class="demo-ruleForm"
           >
             <el-row>
-              <el-col :span="10">
+              <el-col :span="8">
                 <el-form-item label="购买数量" prop="good_num">
                   <digital-input
                     :values="ruleForm.good_num"
@@ -82,7 +83,24 @@
                   />
                 </el-form-item>
               </el-col>
-              <el-col :span="10">
+              <el-col :span="8">
+                <el-form-item label="商品单价" prop="sale_price">
+                  <digital-input
+                    :values="ruleForm.sale_price"
+                    :placeholder="'商品单价'"
+                    :min="sitem.sale_price"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="2"
+                    :size="'mini'"
+                    :controls="false"
+                    :disabled="false"
+                    :append="'元'"
+                    @reschange="num_change($event, 'sale_price')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
                 <el-form-item label="发货方式" prop="sendtype">
                   <el-select
                     v-model="ruleForm.sendtype"
@@ -99,7 +117,7 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="4" style="text-align: right">
+              <el-col :span="2" style="text-align: right">
                 <el-button :size="'mini'" type="primary" @click="submitForm"
                   >保 存
                 </el-button>
@@ -370,6 +388,23 @@ export default {
         }
       }
     };
+    const validate_num_0 = (rule, value, callback) => {
+      const { required } = rule;
+      if (required && value === "") {
+        callback(new Error("不能为空!"));
+      } else if (
+        required &&
+        (value === "0" ||
+          value === "0." ||
+          value === "0.0" ||
+          value === "0.00" ||
+          value === "0.000")
+      ) {
+        callback(new Error("不能为零!"));
+      } else {
+        callback();
+      }
+    };
     return {
       loading: false,
       addrmodel: false,
@@ -391,6 +426,7 @@ export default {
       ruleForm: {
         bidNo: "", //咨询单反馈编号
         good_num: "", //商品数量
+        sale_price: "",
         sendtype: "1", // 发货方式
         arrtime: "", // 到货时间
       },
@@ -399,7 +435,14 @@ export default {
         good_num: [
           {
             required: true,
-            message: "商品数量",
+            validator: validate_num_0,
+            trigger: "blur",
+          },
+        ],
+        sale_price: [
+          {
+            required: true,
+            validator: validate_num_0,
             trigger: "blur",
           },
         ],
@@ -513,10 +556,11 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
-          const { bidNo, in_num, in_arrival_time } = this.sitem;
+          const { bidNo, in_num, in_arrival_time, sale_price } = this.sitem;
           this.ruleForm = {
             bidNo: bidNo || "", //咨询单反馈编号
             good_num: in_num || "0", //商品数量
+            sale_price: sale_price || "",
             sendtype: "1", // 发货方式
             arrtime: in_arrival_time || "", // 到货时间
           };

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.