戴艳蓉 3 years ago
parent
commit
b9d778b2c6

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.js


+ 14 - 0
src/views/purchaseIn/workbench/detail.vue

@@ -165,6 +165,20 @@
               width="110"
               show-overflow-tooltip
             />
+            <el-table-column
+              prop="bargain_status"
+              label="采返信息状态"
+              width="100"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <el-tag type="''" :size="'mini'" v-if="scope.row.bargain_status === '0'"
+                  >新建信息</el-tag
+                >
+                <el-tag type="danger" :size="'mini'" v-else>历史信息,需确认</el-tag>
+              </template></el-table-column
+            >
+
             <el-table-column
               prop="specinfo"
               label="规格"

+ 8 - 6
src/views/sellOut/zixunOrder/columns.js

@@ -23,29 +23,31 @@ const validate_num = (rule, value, callback) => {
   }
 };
 const validate_total_weight = (rule, value, callback) => {
-  if (value === "") {
+  const { required } = rule
+  if (required && value === "") {
     callback(new Error("商品重量不能为空!"));
-  } else if (
+  } else if (required && (
     value === "0" ||
     value === "0." ||
     value === "0.0" ||
     value === "0.00" ||
     value === "0.000"
-  ) {
+  )) {
     callback(new Error("商品重量不能为零!"));
   } else {
     callback();
   }
 };
 const validate_specs_weight = (rule, value, callback) => {
-  if (value === "") {
+  const { required } = rule
+  if (required && value === "") {
     callback(new Error("金属克重不能为空!"));
-  } else if (
+  } else if (required && (
     value === "0" ||
     value === "0." ||
     value === "0.0" ||
     value === "0.00" ||
-    value === "0.000") {
+    value === "0.000")) {
     callback(new Error("金属克重不能为零!"));
   } else {
     callback();

+ 33 - 23
src/views/sellOut/zixunOrder/components/editForm.vue

@@ -97,10 +97,7 @@
       </el-col>
 
       <el-col :span="8" v-show="ruleForm.is_project === '1'">
-        <el-form-item
-          label="项目名称"
-          :prop="ruleForm.is_project === '1' ? 'projectNo' : ''"
-        >
+        <el-form-item label="项目名称" prop="projectNo">
           <el-select
             v-model="ruleForm.projectNo"
             multiple
@@ -473,7 +470,7 @@
           <el-col :span="24">
             <el-row>
               <el-col :span="12" v-show="is_noble">
-                <el-form-item label="配置要求" :prop="is_noble ? 'config' : ''">
+                <el-form-item label="配置要求" prop="config">
                   <el-select
                     v-model="ruleForm.config"
                     multiple
@@ -492,10 +489,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6" v-show="is_noble">
-                <el-form-item
-                  label="金属克重"
-                  :prop="is_noble ? 'specs_weight' : ''"
-                >
+                <el-form-item label="金属克重" prop="specs_weight">
                   <digital-input
                     :values="ruleForm.specs_weight"
                     :placeholder="'金属克重'"
@@ -512,10 +506,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6" v-show="is_noble">
-                <el-form-item
-                  label="启用金价"
-                  :prop="is_noble ? 'is_gold_price' : ''"
-                >
+                <el-form-item label="启用金价" prop="is_gold_price">
                   <el-select
                     v-model="ruleForm.is_gold_price"
                     placeholder="启用金价"
@@ -572,10 +563,7 @@
                     </el-form-item>
                   </el-col>
                   <el-col :span="8" v-show="is_noble">
-                    <el-form-item
-                      label="金属种类"
-                      :prop="is_noble ? 'metal_id' : ''"
-                    >
+                    <el-form-item label="金属种类" prop="metal_id">
                       <search-metal-kind
                         :value="ruleForm.metal_id"
                         :size="'mini'"
@@ -586,9 +574,8 @@
                       />
                     </el-form-item>
                     <el-form-item
-                      v-show="ruleForm.is_gold_price === '1'"
+                      v-if="ruleForm.is_gold_price === '1'"
                       label="当前金价"
-                      :prop="ruleForm.is_gold_price === '1' ? 'gold_price' : ''"
                       style="margin: 0 0 0 0"
                     >
                       <el-input
@@ -601,9 +588,8 @@
                       >
                     </el-form-item>
                   </el-col>
-                  <el-col :span="8" class="fr tr">
+                  <el-col :span="8" class="fr tr" v-show="is_noble">
                     <el-form-item
-                      v-show="is_noble"
                       label="其他配置要求"
                       prop="other_config"
                       label-width="120px"
@@ -617,6 +603,8 @@
                         maxlength="200"
                       />
                     </el-form-item>
+                  </el-col>
+                  <el-col :span="8" class="fr tr">
                     <el-button
                       v-if="type !== 'view'"
                       type="primary"
@@ -634,7 +622,6 @@
           </el-col>
         </el-row>
       </el-col>
-      
     </el-row>
   </el-form>
 </template>
@@ -785,6 +772,7 @@ export default {
       this.rulesThis = this.rules;
       this.disabled = false;
       await this.resetForm();
+      this.sch_is_noble();
       this.loading = false;
     },
 
@@ -792,6 +780,28 @@ export default {
       this.multipleSelection = val;
     },
 
+    sch_is_noble() {
+      this.rulesThis["projectNo"][0].required =
+        this.ruleForm.is_project === "1";
+      this.$refs.ruleForm.validateField("projectNo");
+      let list = [
+        "config",
+        "specs_weight",
+        "is_gold_price",
+        "metal_id",
+        "other_config",
+        "gold_price"
+      ];
+
+      for (let i = 0; i < list.length; i++) {
+        if (this.rulesThis[list[i]]) {
+          this.rulesThis[list[i]][0].required = this.is_noble;
+          console.log(list[i] + "===" + this.rulesThis[list[i]][0].required);
+          this.$refs.ruleForm.validateField(list[i]);
+        }
+      }
+    },
+
     //咨询类型选择
     is_project_change() {
       const { is_project } = this.ruleForm;
@@ -946,7 +956,7 @@ export default {
       this.showOtherModel = false;
     },
     async submitForm() {
-      console.log(this.ruleForm);
+      this.sch_is_noble();
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;

+ 1 - 1
src/views/serviceParam/business/addEdit.vue

@@ -30,7 +30,7 @@
                   <el-select
                     v-model="ruleForm.region"
                     style="width: 100%"
-                    :disabled="isDetail == '007'"
+                    :disabled="isDetail == '003'"
                     placeholder="请选择组织/企业"
                   >
                     <el-option label="组织" value="0"></el-option>

Some files were not shown because too many files changed in this diff