戴艳蓉 3 years ago
parent
commit
6a2cd55ca4

+ 3 - 29
src/views/goodStore/goodsCost/columns.js

@@ -413,28 +413,8 @@ const rules = {
     },
   ],
 
-  //固定成本
-  cert_fee: [
-    {
-      required: true,
-      validator: validate_num,
-      trigger: "blur",
-    },
-  ],
-  packing_fee: [
-    {
-      required: true,
-      validator: validate_num,
-      trigger: "blur",
-    },
-  ],
-  cost_fee: [
-    {
-      required: true,
-      validator: validate_num,
-      trigger: "blur",
-    },
-  ],
+  
+
   mark_fee: [
     {
       required: true,
@@ -492,13 +472,7 @@ const rules = {
       trigger: "blur",
     },
   ],
-  nake_price: [
-    {
-      required: true,
-      validator: validate_num,
-      trigger: "blur",
-    },
-  ],
+
   cgd_gold_price: [
     {
       required: true,

+ 2 - 1
src/views/goodStore/goodsCost/components/baseForm.vue

@@ -1009,7 +1009,7 @@
               <el-table-column prop="nake_price" label="裸价" />
               <el-table-column prop="cert_fee" label="证书费" />
               <el-table-column prop="packing_fee" label="包装费" />
-              <el-table-column prop="cost_fee" label="成本工艺费" />
+              <el-table-column prop="cost_fee" label="工艺费" />
               <el-table-column prop="delivery_fee" label="物流费" />
               <el-table-column prop="new_nake_fee" label="系统成本合计" />
               <el-table-column prop="nake_fee" label="系统成本合计" />
@@ -1051,6 +1051,7 @@
           :index="costmodelIndex"
           :show-model="costshowModel"
           :sitem="costsitem"
+          :goodsitem="ruleForm"
           @refresh="costrefreshEdit"
           @cancel="costshowModel = false"
         />

+ 203 - 68
src/views/goodStore/goodsCost/components/costFormAddEdit.vue

@@ -5,7 +5,7 @@
     :center="true"
     align="left"
     top="18vh"
-    width="500px"
+    width="700px"
     :close-on-click-modal="false"
     :visible.sync="showModelThis"
     element-loading-text="拼命加载中"
@@ -25,71 +25,145 @@
             label-width="80px"
             class="demo-ruleForm"
           >
-            <el-form-item label="起订量" prop="min_num">
-              <digital-input
-                :values="ruleForm.min_num"
-                :placeholder="'起订量'"
-                :min="0"
-                :name="'ruleForm.min_num'"
-                :disabled="false"
-                :max="100000000000"
-                :position="'right'"
-                :precision="0"
-                :size="'mini'"
-                :controls="false"
-                :append="''"
-                @reschange="number_change($event, 'min_num')"
-              />
-            </el-form-item>
-            <el-form-item label="成本合计" prop="nake_fee">
-              <digital-input
-                :values="ruleForm.nake_fee"
-                :placeholder="'成本合计'"
-                :min="0"
-                :name="'ruleForm.nake_fee'"
-                :disabled="false"
-                :max="100000000000"
-                :position="'right'"
-                :precision="2"
-                :size="'mini'"
-                :controls="false"
-                :append="'元'"
-                @reschange="number_change($event, 'nake_fee')"
-              />
-            </el-form-item>
-            <el-form-item label="工艺费" prop="cost_fee">
-              <digital-input
-                :values="ruleForm.cost_fee"
-                :placeholder="'工艺费'"
-                :min="0"
-                :name="'ruleForm.cost_fee'"
-                :disabled="false"
-                :max="100000000000"
-                :position="'right'"
-                :precision="2"
-                :size="'mini'"
-                :controls="false"
-                :append="'元'"
-                @reschange="number_change($event, 'cost_fee')"
-              />
-            </el-form-item>
-
-            <el-form-item label="物流费" prop="delivery_fee">
-              <digital-input
-                :values="ruleForm.delivery_fee"
-                :placeholder="'物流费'"
-                :min="0"
-                :name="'ruleForm.delivery_fee'"
-                :disabled="false"
-                :max="100000000000"
-                :position="'right'"
-                :precision="2"
-                :size="'mini'"
-                :controls="false"
-                :append="'元'"
-                @reschange="number_change($event, 'delivery_fee')"
-              />
-            </el-form-item>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="起订量" prop="min_num">
+                  <digital-input
+                    :values="ruleForm.min_num"
+                    :placeholder="'起订量'"
+                    :min="0"
+                    :name="'ruleForm.min_num'"
+                    :disabled="false"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="0"
+                    :size="'mini'"
+                    :controls="false"
+                    :append="''"
+                    @reschange="number_change($event, 'min_num')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="裸价" prop="nake_price">
+                  <digital-input
+                    :values="ruleForm.nake_price"
+                    :placeholder="'裸价'"
+                    :min="0"
+                    :name="'ruleForm.nake_price'"
+                    :disabled="false"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="2"
+                    :size="'mini'"
+                    :controls="false"
+                    :append="'元'"
+                    @reschange="number_change($event, 'nake_price')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="证书费" prop="cert_fee">
+                  <digital-input
+                    :values="ruleForm.cert_fee"
+                    :placeholder="'证书费'"
+                    :min="0"
+                    :name="'ruleForm.cert_fee'"
+                    :disabled="false"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="2"
+                    :size="'mini'"
+                    :controls="false"
+                    :append="'元'"
+                    @reschange="number_change($event, 'cert_fee')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="包装费" prop="packing_fee">
+                  <digital-input
+                    :values="ruleForm.nake_fee"
+                    :placeholder="'packing_fee'"
+                    :min="0"
+                    :name="'ruleForm.packing_fee'"
+                    :disabled="false"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="2"
+                    :size="'mini'"
+                    :controls="false"
+                    :append="'元'"
+                    @reschange="number_change($event, 'packing_fee')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="工艺费" prop="cost_fee">
+                  <digital-input
+                    :values="ruleForm.cost_fee"
+                    :placeholder="'工艺费'"
+                    :min="0"
+                    :name="'ruleForm.cost_fee'"
+                    :disabled="false"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="2"
+                    :size="'mini'"
+                    :controls="false"
+                    :append="'元'"
+                    @reschange="number_change($event, 'cost_fee')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="物流费" prop="delivery_fee">
+                  <digital-input
+                    :values="ruleForm.delivery_fee"
+                    :placeholder="'物流费'"
+                    :min="0"
+                    :name="'ruleForm.delivery_fee'"
+                    :disabled="false"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="2"
+                    :size="'mini'"
+                    :controls="false"
+                    :append="'元'"
+                    @reschange="number_change($event, 'delivery_fee')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="系统成本合计" label-width="110px" required>
+                  <el-input
+                    v-model="ruleForm.new_nake_fee"
+                    disabled
+                    placeholder="系统成本合计"
+                  >
+                    <template slot="append">元</template></el-input
+                  >
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="成本合计" prop="nake_fee">
+                  <digital-input
+                    :values="ruleForm.nake_fee"
+                    :placeholder="'成本合计'"
+                    :min="0"
+                    :name="'ruleForm.nake_fee'"
+                    :disabled="false"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="2"
+                    :size="'mini'"
+                    :controls="false"
+                    :append="'元'"
+                    @reschange="number_change($event, 'nake_fee')"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
           </el-form>
         </el-col>
         <el-col :span="24" style="text-align: right">
@@ -108,7 +182,7 @@
 import resToken from "@/mixins/resToken";
 export default {
   name: "brand",
-  props: ["showModel", "index", "sitem"],
+  props: ["showModel", "index", "sitem", "goodsitem"],
   mixins: [resToken],
   data() {
     const validate_num_0 = (rule, value, callback) => {
@@ -120,6 +194,14 @@ export default {
         callback();
       }
     };
+    const validate_num = (rule, value, callback) => {
+      const { required } = rule;
+      if (required && value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        callback();
+      }
+    };
     return {
       loading: false,
       title: "",
@@ -130,8 +212,35 @@ export default {
         min_num: [
           { required: true, validator: validate_num_0, trigger: "blur" },
         ],
+        nake_price: [
+          {
+            required: true,
+            validator: validate_num,
+            trigger: "blur",
+          },
+        ],
+        //固定成本
+        cert_fee: [
+          {
+            required: true,
+            validator: validate_num,
+            trigger: "blur",
+          },
+        ],
+        packing_fee: [
+          {
+            required: true,
+            validator: validate_num,
+            trigger: "blur",
+          },
+        ],
+
         cost_fee: [
-          { required: true, message: "工艺费不能为空!", trigger: "blur" },
+          {
+            required: true,
+            validator: validate_num,
+            trigger: "blur",
+          },
         ],
         nake_fee: [
           { required: true, message: "成本合计不能为空!", trigger: "blur" },
@@ -208,6 +317,32 @@ export default {
       this.ruleForm[key] = e + "" || "0";
       this.$refs.ruleForm.validateField(key);
     },
+    async get_new_nake_price() {
+      const { nake_price, cert_fee, packing_fee, cost_fee, delivery_fee } =
+        this.ruleForm;
+      const { mark_fee, is_gold_price, noble_metal, cat_id, noble_weight } =
+        this.goodsitem;
+      let is_noble = false,
+        new_p = 0;
+      if (cat_id && cat_id.length > 0) {
+        cat_id.foreach((a) => {
+          if (a === "6") {
+            is_noble = true;
+          }
+        });
+      }
+      // this.ruleForm.new_nake_fee
+      new_p =
+        packing_fee * 100 +
+        nake_price * 100 +
+        mark_fee * 100 +
+        cert_fee * 100 +
+        delivery_fee * 100;
+      if (is_noble) {
+        // new_p+=is_gold_price
+      }
+      this.ruleForm.new_nake_fee = parseFloat(new_p);
+    },
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {

+ 2 - 2
src/views/purchaseIn/purchaseOrder/components/order-in-table.vue

@@ -32,8 +32,8 @@
                 class="fr"
                 style="margin: 3px 0 0 0"
                 v-if="
-                  (status === '0' && powers.some((item) => item == '028')) ||
-                  (status === '1' && powers.some((item) => item == '028'))
+                  (status === '1' && powers.some((item) => item == '028')) ||
+                  (status === '2' && powers.some((item) => item == '028'))
                 "
                 effect="dark"
                 content="添加"

+ 5 - 8
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -253,16 +253,12 @@ export default {
       activeNames: ["0", "1", "2", "3", "4", "5", "10"],
       sitem: null,
       statusOptions: [
-        { value: "0", label: "待发货" },
-        { value: "1", label: "部分发货" },
-        { value: "2", label: "发货完成" },
-        { value: "3", label: "已取消订单" },
+        { value: "1", label: "待发货" },
+        { value: "2", label: "部分发货" },
+        { value: "3", label: "发货完成" },
+        { value: "4", label: "已取消订单" },
       ],
       statusList: [
-        {
-          code: "0",
-          label: "待同意发货",
-        },
         {
           code: "1",
           label: "待发货",
@@ -275,6 +271,7 @@ export default {
           code: "3",
           label: "发货完成",
         },
+        { value: "4", label: "已取消订单" },
       ],
       status: "",
       newTime: "",

+ 4 - 4
src/views/purchaseIn/purchaseOrder/index.vue

@@ -240,19 +240,19 @@ export default {
       // 状态
       statusOptions: [
         {
-          code: "0",
+          code: "1",
           label: "待发货",
         },
         {
-          code: "1",
+          code: "2",
           label: "部分发货",
         },
         {
-          code: "2",
+          code: "3",
           label: "发货完成",
         },
         {
-          code: "3",
+          code: "4",
           label: "已取消订单",
         },
       ],

+ 55 - 34
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-addEdit-form.vue

@@ -2,7 +2,7 @@
   <el-form
     v-loading="loading"
     :model="ruleForm"
-    :rules="rules"
+    :rules="rulesThis"
     status-icon
     :size="'small'"
     ref="ruleForm"
@@ -45,6 +45,7 @@
             style="width: 100%"
             :disabled="id !== 'add'"
             placeholder="发货方式"
+            @change="sendtypeChange"
           >
             <el-option
               v-for="item in options"
@@ -74,7 +75,7 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="id === 'add' ? 24 : 12" v-show="ruleForm.sendtype === '1'">
+      <el-col :span="id === 'add' ? 24 : 12" v-if="ruleForm.sendtype === '1'">
         <el-form-item label="物流公司" prop="post_company">
           <search-express
             :disabled="id !== 'add'"
@@ -86,7 +87,7 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="id === 'add' ? 24 : 12" v-show="ruleForm.sendtype === '1'">
+      <el-col :span="id === 'add' ? 24 : 12" v-if="ruleForm.sendtype === '1'">
         <el-form-item label="物流单号" prop="post_code">
           <el-input
             :disabled="id !== 'add'"
@@ -181,6 +182,7 @@ export default {
         send_num: "",
         status: "1",
       },
+      rulesThis: this.rules,
       options: [
         {
           value: "1",
@@ -197,37 +199,49 @@ export default {
         },
       },
       rules: {
-        send_num: {
-          required: true,
-          validator: validate_num_0,
-          trigger: "blur",
-        },
-        post_company: {
-          type: "array",
-          required: true,
-          trigger: "change",
-          message: "请输入物流公司",
-        },
-        sendtype: {
-          required: true,
-          trigger: "change",
-          message: "选择发货方式",
-        },
-        post_code: {
-          required: true,
-          validator: validateCode,
-          trigger: "blur",
-        },
-        post_fee: {
-          required: true,
-          validator: validate_num,
-          trigger: "blur",
-        },
-        post_time: {
-          required: true,
-          message: "请选择发货时间",
-          trigger: "change",
-        },
+        send_num: [
+          {
+            required: true,
+            validator: validate_num_0,
+            trigger: "blur",
+          },
+        ],
+        post_company: [
+          {
+            type: "array",
+            required: true,
+            trigger: "change",
+            message: "请输入物流公司",
+          },
+        ],
+        sendtype: [
+          {
+            required: true,
+            trigger: "change",
+            message: "选择发货方式",
+          },
+        ],
+        post_code: [
+          {
+            required: true,
+            validator: validateCode,
+            trigger: "blur",
+          },
+        ],
+        post_fee: [
+          {
+            required: true,
+            validator: validate_num,
+            trigger: "blur",
+          },
+        ],
+        post_time: [
+          {
+            required: true,
+            message: "请选择发货时间",
+            trigger: "change",
+          },
+        ],
       },
     };
   },
@@ -244,6 +258,7 @@ export default {
   methods: {
     async initForm() {
       this.loading = true;
+      this.rulesThis = this.rules;
       await this.resetForm();
       this.loading = false;
     },
@@ -290,8 +305,14 @@ export default {
       this.ruleForm[key] = e + "" || "0";
       this.$refs.ruleForm.validateField(key);
     },
+    sendtypeChange() {
+      const { sendtype } = this.ruleForm;
+      this.rulesThis.post_code[0].required = sendtype === "1";
+      this.rulesThis.post_company[0].required = sendtype === "1";
+    },
     // 保存更改
     async submitForm() {
+      console.log(this.rules);
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;

+ 1 - 1
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-model.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog
-    :title="'新建备货入库单'"
+    :title="'新建入库单'"
     :center="true"
     align="left"
     top="15vh"

+ 88 - 84
src/views/stock/stockWarning/index.vue

@@ -27,61 +27,62 @@
         <template #table-header="{}">
           <div style="width: 100%" class="min">
             <el-row style="padding: 0 0 0 80px">
-              <el-col :span="24">
-                <el-col :span="12" style="width: 300px; padding: 0">
-                  <search-supplier
-                    :size="searchSize"
-                    :placeholder="'供应商公司'"
-                    :value="parmValue.supplier_code"
-                    @searchChange="selectSupplier"
-                  />
-                </el-col>
-                <el-col :span="12" style="width: 200px; padding-left: 10px">
-                  <search-stock
-                    :isDetail="true"
-                    :size="searchSize"
-                    :value="parmValue.stock_code"
-                    :disabled="isDisabled"
-                    :placeholder="'出库仓库'"
-                    :isRelation="true"
-                    :companyCode="supplier_code"
-                    :names="''"
-                    @searchChange="selectStock"
-                  />
-                </el-col>
-                <el-col style="width: 200px; padding-left: 10px">
-                  <el-input
-                    placeholder="商品编码"
-                    :size="searchSize"
-                    v-model="parmValue.goods_sn"
-                    @blur="searchList"
-                    clearable
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 54px; margin-left: 10px">
-                  <el-button
-                    :size="searchSize"
-                    class="fr"
-                    type="warning"
-                    @click="restSearch"
-                    >重置</el-button
-                  >
-                </el-col>
-                <el-col :span="3" style="width: 56px; float: right">
-                  <el-button
-                    type="primary"
-                    :size="searchSize"
-                    style="float: right; margin-left: 5px"
-                    @click="searchList"
-                  >
-                    刷新
-                  </el-button>
-                </el-col>
+              <el-col :span="12" style="width: 300px">
+                <search-work-company
+                  :value="parmValue.companyNo"
+                  :names="''"
+                  :size="searchSize"
+                  :is-detail="id !== 'add'"
+                  :disabled="isDetail"
+                  :placeholder="'业务公司'"
+                  @searchChange="supplierChange"
+                />
+              </el-col>
+              <el-col :span="12" style="width: 300px; padding: 0">
+                <search-supplier
+                  :size="searchSize"
+                  :placeholder="'供应商公司'"
+                  :value="parmValue.supplier_code"
+                  @searchChange="selectSupplier"
+                />
+              </el-col>
+              <el-col :span="12" style="width: 200px; padding-left: 10px">
+                <search-stock
+                  :isDetail="true"
+                  :size="searchSize"
+                  :value="parmValue.stock_code"
+                  :disabled="isDisabled"
+                  :placeholder="'出库仓库'"
+                  :isRelation="true"
+                  :companyCode="supplier_code"
+                  :names="''"
+                  @searchChange="selectStock"
+                />
+              </el-col>
+          
+              <el-col :span="4" style="width: 54px; margin-left: 10px">
+                <el-button
+                  :size="searchSize"
+                  class="fr"
+                  type="warning"
+                  @click="restSearch"
+                  >重置</el-button
+                >
+              </el-col>
+              <el-col :span="3" style="width: 56px; float: right">
+                <el-button
+                  type="primary"
+                  :size="searchSize"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
               </el-col>
             </el-row>
             <el-row>
               <el-col :span="6" style="width: 273px; padding: 10px 0 0 0px">
-                <num-ber-range
+                <number-range
                   :lower="parmValue.stock_num_low"
                   :online="parmValue.stock_num_up"
                   :title="'库存量'"
@@ -91,7 +92,7 @@
                 />
               </el-col>
               <el-col :span="6" style="width: 303px; padding-top: 10px">
-                <num-ber-range
+                <number-range
                   :lower="parmValue.warn_num_low"
                   :online="parmValue.warn_num_up"
                   :width="'135px'"
@@ -218,6 +219,7 @@ export default {
       parmValue: {
         goods_sn: "",
         supplier_code: [],
+        companyNo: "",
         stock_code: [],
         warn_num_low: "",
         warn_num_up: "",
@@ -247,38 +249,40 @@ export default {
   },
 
   methods: {
+    //业务公司选择
+    async supplierChange(e) {
+      const { code } = e;
+      this.parmValue.companyNo = code || ""; //供应商编码
+      this.parmValue.supplier_code = [];
+      this.supplier_code = "";
+      this.parmValue.stock_code = [];
+
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.stockList();
+      await this.searchList();
+    },
     // 选择供应商仓库
-    selectStock(e) {
-      if (e && e.id) {
-        this.parmValue.stock_code = [e.code];
-        this.stock_code = e.code;
-      } else {
-        this.parmValue.stock_code = [];
-        this.stock_code = "";
-      }
-      if (this.parmValue.stock_code) {
-        this.searchList();
-      }
+    async selectStock(e) {
+      const { code } = e;
+      this.parmValue.stock_code = code ? [code] : [];
+      this.stock_code = code || "";
+      await this.searchList();
     },
     // 选择供应商
-    selectSupplier(e) {
-      if (e && e.id) {
-        this.parmValue.supplier_code = [e.code];
-        this.supplier_code = e.code;
-        this.isDisabled = false;
-      } else {
-        this.parmValue.stock_code = [];
-        this.parmValue.supplier_code = [];
-        this.stock_code = "";
-        this.supplier_code = "";
-        this.isDisabled = true;
-      }
-      if (this.parmValue.supplier_code) {
-        this.searchList();
-      }
+    async selectSupplier(e) {
+      const { code } = e;
+
+      this.parmValue.supplier_code = code ? [code] : [];
+      this.supplier_code = code || "";
+
+      this.stock_code = "";
+      this.supplier_code = "";
+
+      await this.searchList();
     },
     // 预警量范围框
-    numReturned1(e) {
+    async numReturned1(e) {
       if (e && e.lower != "" && e.online != "") {
         this.parmValue.warn_num_low = e.lower;
         this.parmValue.warn_num_up = e.online;
@@ -290,11 +294,11 @@ export default {
         this.parmValue.warn_num_low != "" &&
         this.parmValue.warn_num_up != ""
       ) {
-        this.searchList();
+        await this.searchList();
       }
     },
     // 库存量范围框
-    numReturned(e) {
+    async numReturned(e) {
       if (e && e.lower != "" && e.online != "") {
         this.parmValue.stock_num_low = e.lower;
         this.parmValue.stock_num_up = e.online;
@@ -306,11 +310,11 @@ export default {
         this.parmValue.stock_num_low != "" &&
         this.parmValue.stock_num_up != ""
       ) {
-        this.searchList();
+        await this.searchList();
       }
     },
     // 重置搜索栏
-    restSearch() {
+    async restSearch() {
       // 表格 - 分页
       this.pageInfo = {
         size: 15,
@@ -326,7 +330,7 @@ export default {
         stock_num_low: "",
         stock_num_up: "",
       };
-      this.searchList();
+      await this.searchList();
     },
 
     openModal(id, isDetail, sitem) {

+ 29 - 28
src/views/stock/survey/index.vue

@@ -5,10 +5,10 @@
     >
       <div style="width: 100%">
         <el-row style="padding: 15px 0 0 0px">
-          <el-col :span="12" style="width: 290px;">
+          <el-col :span="12" style="width: 290px">
             <search-work-company
-              :value="parmValue.supplierNo"
-              :names="supplier_name"
+              :value="parmValue.companyNo"
+              :names="''"
               :size="searchSize"
               :is-detail="id !== 'add'"
               :disabled="isDetail"
@@ -20,6 +20,7 @@
             <search-supplier
               :size="searchSize"
               :placeholder="'供应商公司'"
+              :disabled="parmValue.companyNo === ''"
               :value="parmValue.supplier_code"
               @searchChange="selectSupplier"
             />
@@ -141,7 +142,7 @@ export default {
       stock_code: "",
       supplier_code: "",
       parmValue: {
-        supplierNo:[],
+        companyNo: "",
         supplier_code: [],
         stock_code: [],
         page: 1,
@@ -267,39 +268,38 @@ export default {
   },
 
   methods: {
+    //业务公司选择
+    supplierChange(e) {
+      const { code } = e;
+      this.parmValue.companyNo = code || ""; //供应商编码
+      this.parmValue.supplier_code = [];
+      this.supplier_code = "";
+      this.parmValue.stock_code = [];
+
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      this.stockList();
+      this.searchList();
+    },
     // 选择供应商
     selectSupplier(e) {
-      if (e && e.id) {
-        this.parmValue.supplier_code = [e.code];
-        this.supplier_code = e.code;
-      } else {
-        this.parmValue.stock_code = [];
-        this.parmValue.supplier_code = [];
-        this.stock_code = "";
-        this.supplier_code = "";
-      }
+      const { code } = e;
+      this.parmValue.supplier_code = code ? [code] : [];
+      this.supplier_code = code;
+      this.parmValue.stock_code = [];
+      this.stock_code = "";
       this.parmValue.page = 1;
       this.pageInfo.curr = 1;
       this.stockList();
       this.searchList();
     },
-       //供应商公司选择
-    supplierChange(e) {
-      if (e && e.id) {
-        this.parmValue.supplierNo = [e.code]; //供应商编码
-      } else {
-        this.parmValue.supplierNo = [];
-      }
-    },
+
     // 选择供应商仓库
     selectStock(e) {
-      if (e && e.id) {
-        this.parmValue.stock_code = [e.code];
-        this.stock_code = e.code;
-      } else {
-        this.parmValue.stock_code = [];
-        this.stock_code = "";
-      }
+      const { code } = e;
+      this.parmValue.stock_code = code ? [code] : [];
+      this.stock_code = code || "";
+
       this.parmValue.page = 1;
       this.pageInfo.curr = 1;
       this.stockList();
@@ -309,6 +309,7 @@ export default {
     //获取表格上方的卡片数据
     async stockList() {
       let model = {
+        companyNo: this.parmValue.companyNo,
         supplier_code: this.supplier_code,
         stock_code: this.stock_code,
       };