Sfoglia il codice sorgente

feat:商品成本新增字段

snow 1 anno fa
parent
commit
9a73ae9f7a

+ 1 - 1
src/components/globalComponents/search-supplier/main.vue

@@ -98,7 +98,7 @@ export default {
             id: this.options[index].id,
             code: this.options[index].code,
             label: this.options[index].name,
-            isPower: this.options[index].has_account + "" !== "0"
+            isPower: this.options[index].has_account
           };
 
           this.$emit("searchChange", model);

+ 48 - 48
src/views/goodStore/goodsCost/components/baseFormNormal.vue

@@ -110,6 +110,54 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+
+            <template v-if="hasAccount">
+               <el-col :span="8">
+                 <el-form-item label="供应商采购成本" label-width="130px" prop="supplier_origin_price">
+                   <digital-input
+                     :values="ruleForm.supplier_origin_price"
+                     :placeholder="'供应商采购成本'"
+                     :min="0"
+                     :disabled="type === 'view' || is_noble"
+                     :max="100000000000"
+                     :position="'right'"
+                     :precision="2"
+                     :size="'mini'"
+                     :controls="false"
+                     :append="'元'"
+                     @reschange="number_change_origin($event)"
+                   />
+               </el-form-item>
+              </el-col>
+
+              <el-col :span="8">
+                <el-form-item label="采购供应商" label-width="120px" prop="cgd_supplier_code">
+                  <search-supplier
+                    :value="ruleForm.cgd_supplier_code"
+                    :placeholder="'采购供应商'"
+                    :size="'mini'"
+                    :names="cgdSupplierName"
+                    :disabled="type === 'view'"
+                    :isDetail="type !== 'add'"
+                    @searchChange="supplierCgdChange"
+                  />
+                </el-form-item>
+              </el-col>
+
+              <el-col :span="8">
+                <el-form-item label="竞单人" prop="cgd_apply_id">
+                   <search-account
+                    :value="ruleForm.cgd_apply_id"
+                    :disabled="type === 'view'"
+                    :isDetail="type !== 'add'"
+                    :names="ruleForm.cgd_apply_name"
+                    :size="searchSize"
+                    :placeholder="'竞单人'"
+                    @searchChange="handleResignName"
+                  />
+                </el-form-item>
+              </el-col>
+            </template>
           </el-row>
 
           <el-row>
@@ -230,54 +278,6 @@
                 />
               </el-form-item>
             </el-col>
-
-            <template v-if="hasAccount">
-               <el-col :span="8">
-                 <el-form-item label="供应商采购成本" label-width="130px" prop="supplier_origin_price">
-                   <digital-input
-                     :values="ruleForm.supplier_origin_price"
-                     :placeholder="'供应商采购成本'"
-                     :min="0"
-                     :disabled="type === 'view' || is_noble"
-                     :max="100000000000"
-                     :position="'right'"
-                     :precision="2"
-                     :size="'mini'"
-                     :controls="false"
-                     :append="'元'"
-                     @reschange="number_change_origin($event)"
-                   />
-               </el-form-item>
-              </el-col>
-
-              <el-col :span="8">
-                <el-form-item label="采购供应商" label-width="120px" prop="cgd_supplier_code">
-                  <search-supplier
-                    :value="ruleForm.cgd_supplier_code"
-                    :placeholder="'采购供应商'"
-                    :size="'mini'"
-                    :names="cgdSupplierName"
-                    :disabled="type === 'view'"
-                    :isDetail="type !== 'add'"
-                    @searchChange="supplierCgdChange"
-                  />
-                </el-form-item>
-              </el-col>
-
-              <el-col :span="8">
-                <el-form-item label="竞单人" prop="cgd_apply_id">
-                   <search-account
-                    :value="ruleForm.cgd_apply_id"
-                    :disabled="type === 'view'"
-                    :isDetail="type !== 'add'"
-                    :names="ruleForm.cgd_apply_name"
-                    :size="searchSize"
-                    :placeholder="'竞单人'"
-                    @searchChange="handleResignName"
-                  />
-                </el-form-item>
-              </el-col>
-            </template>
           </el-row>
 
           <el-row :span="24" v-show="is_noble">

+ 50 - 49
src/views/purchaseIn/workbench/components/baseForm.vue

@@ -34,7 +34,7 @@
             :value="ruleForm.supplierNo"
             :placeholder="'供应商'"
             :size="'mini'"
-            :names="cgd_supplier_name"
+            :names="supplierNo_name"
             :disabled="type === 'view'"
             :isDetail="true"
             :isp="true"
@@ -56,6 +56,54 @@
         </el-form-item>
       </el-col>
 
+      <template v-if="hasAccount">
+        <el-col :span="8">
+          <el-form-item label="供应商采购成本" label-width="130px" prop="supplier_origin_price">
+            <digital-input
+              :values="ruleForm.supplier_origin_price"
+              :placeholder="'供应商采购成本'"
+              :min="0"
+              :disabled="type === 'view' || is_noble"
+              :max="100000000000"
+              :position="'right'"
+              :precision="2"
+              :size="'mini'"
+              :controls="false"
+              :append="'元'"
+              @reschange="number_change_origin($event)"
+            />
+        </el-form-item>
+       </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="采购供应商" label-width="120px" prop="cgd_supplier_code">
+            <search-supplier
+              :value="ruleForm.cgd_supplier_code"
+              :placeholder="'采购供应商'"
+              :size="'mini'"
+              :names="cgd_supplier_name"
+              :disabled="type === 'view'"
+              :isDetail="true"
+              @searchChange="supplierCgdChange"
+            />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="竞单人" prop="cgd_apply_id">
+             <search-account
+              :value="ruleForm.cgd_apply_id"
+              :disabled="type === 'view'"
+              :isDetail="type !== 'add'"
+              :names="ruleForm.cgd_apply_name"
+              :size="searchSize"
+              :placeholder="'竞单人'"
+              @searchChange="handleResignName"
+            />
+          </el-form-item>
+        </el-col>
+      </template>
+
       <el-col :span="5">
         <el-form-item label="有效期" prop="expire_day">
           <digital-input
@@ -450,54 +498,6 @@
         </el-form-item>
       </el-col>
 
-      <template v-if="hasAccount">
-        <el-col :span="8">
-          <el-form-item label="供应商采购成本" label-width="130px" prop="supplier_origin_price">
-            <digital-input
-              :values="ruleForm.supplier_origin_price"
-              :placeholder="'供应商采购成本'"
-              :min="0"
-              :disabled="type === 'view' || is_noble"
-              :max="100000000000"
-              :position="'right'"
-              :precision="2"
-              :size="'mini'"
-              :controls="false"
-              :append="'元'"
-              @reschange="number_change_origin($event)"
-            />
-        </el-form-item>
-       </el-col>
-
-        <el-col :span="8">
-          <el-form-item label="采购供应商" label-width="120px" prop="cgd_supplier_code">
-            <search-supplier
-              :value="ruleForm.cgd_supplier_code"
-              :placeholder="'采购供应商'"
-              :size="'mini'"
-              :names="cgd_supplierNo_name"
-              :disabled="type === 'view'"
-              :isDetail="true"
-              @searchChange="supplierCgdChange"
-            />
-          </el-form-item>
-        </el-col>
-
-        <el-col :span="8">
-          <el-form-item label="竞单人" prop="cgd_apply_id">
-             <search-account
-              :value="ruleForm.cgd_apply_id"
-              :disabled="type === 'view'"
-              :isDetail="type !== 'add'"
-              :names="ruleForm.cgd_apply_name"
-              :size="searchSize"
-              :placeholder="'竞单人'"
-              @searchChange="handleResignName"
-            />
-          </el-form-item>
-        </el-col>
-      </template>
-
       <el-col :span="24" v-show="pid + '' === '6'">
         <el-col :span="6">
           <el-form-item label="金属重量" prop="noble_weight">
@@ -1315,6 +1315,7 @@ export default {
         this.ruleForm.supplierNo = [];
       }
 
+      console.log(isPower);
       this.hasAccount = isPower;
       this.$refs.ruleForm.validateField("supplierNo");
     },