Ver código fonte

静态页面,议价修改

lucky-lzx 2 anos atrás
pai
commit
6bdacc74b5

BIN
public/static/C端订单导入模板.xlsx


+ 0 - 0
src/apis/service/orderEntry/orderEnter/index.js


+ 8 - 0
src/apis/service/orderEntry/orderImport/index.js

@@ -0,0 +1,8 @@
+// c端订单录入/订单导入
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+    // 提交导入数据
+    orderimport: (data, params) => http(api + "orderimport", data, "post", params),
+
+};

+ 96 - 5
src/views/orderEntry/orderConfirm/index.vue

@@ -1,15 +1,106 @@
 <template>
-  <div>
-      222
+  <div class="box">
+      <h1>C端订单确认</h1>
+      <ul>
+        <li class="tbHead">
+          <div class="tbTitle">字段</div>
+          <div class="tbTitle">导入字段</div>
+          <div class="tbTitle">解析字段</div>
+          <div class="tbTitle">订单确认字段</div>
+        </li>
+        <li v-for="(item,index) in table" :key="index">
+          <div>{{item.name}}</div>
+          <div></div>
+          <div></div>
+          <div></div>
+        </li>
+      </ul>
+
+      <div class="btn">
+            <el-button type="primary">提交</el-button>
+          <el-button>取消</el-button>
+      </div>
   </div>
 </template>
 
 <script>
 export default {
-
+  data(){
+    return {
+      table:[
+        {name:"平台订单号",},
+        {name:"平台订单下单时间",},
+        {name:"平台商品编号",},
+        {name:"业务公司信息",},
+        {name:"企业客户信息",},
+        {name:"供应商信息",},
+        {name:"所在平台",},
+        {name:"销售渠道",},
+        {name:"商品名称-商品信息",},
+        {name:"订单单价",},
+        {name:"销售数量",},
+        {name:"订单总金额",},
+        {name:"活动名称",},
+        {name:"优惠金额",},
+        {name:"优惠后的金额",},
+        {name:"优惠原因-用活动名称",},
+        {name:"收费模式",},
+        {name:"订单备注",},
+        {name:"收货人",},
+        {name:"联系电话",},
+        {name:"联系地址",},
+        {name:"联系地址省市区",},
+      ]
+    }
+  }
 }
 </script>
 
-<style lang="sass" scoped>
-
+<style lang="scss" scoped>
+  .box{
+    width: 100%;
+    color: #666;
+    h1{
+        margin: 20px 0 40px 20px;
+        font-size: 26px;
+        color: #333;
+    }
+    ul{
+      width: 80%;
+      height: 70vh;
+      margin: 0 auto 20px;
+      overflow-y: scroll;
+      // position: relative;
+      li{
+        display: flex;
+        width: 100%;
+      }
+      .tbHead{
+        position: sticky;
+        z-index: 1;
+        top: 0;
+        background: #f7f7f7;
+      .tbTitle{
+          height: 48px;
+          font-weight: bold;
+        }
+      }
+      li div{
+        width: 25%;
+        border: 1px solid #ddd;
+        border-collapse: collapse;
+        height: 42px;
+        display: flex;
+        align-items: center;
+        padding-left: 10px;
+        box-sizing: border-box;
+      }
+    }
+    .btn{
+    width: 50%;
+    margin: auto ;
+    display: flex;
+    justify-content: space-around;
+}
+  }
 </style>

+ 69 - 0
src/views/orderEntry/orderEnter/columns.js

@@ -0,0 +1,69 @@
+const listCol = [{
+    type: "selection",
+    fixed: "left",
+    _noset_: true
+  },
+  {
+    prop: "",
+    label: "订单编号",
+    width: "160px",
+  },
+  {
+    prop: "",
+    label: "供应商编码",
+    width: "160px",
+  },
+  {
+    prop: "",
+    label: "供应商名称",
+    width: "160px",
+  },
+  {
+    prop: "",
+    label: "业务公司编号",
+    width: "160px",
+  },
+  {
+    prop: "",
+    label: "业务公司名称",
+    width: "160px",
+  },
+  {
+    prop: "",
+    label: "商品编码",
+    width: "160px",
+  },
+  {
+    prop: "",
+    label: "商品名称",
+    width: "160px",
+  },
+  {
+    prop: "",
+    label: "平台商品编号",
+    width: "160px",
+  },
+  {
+    prop: "",
+    label: "单位",
+    width: "60px",
+  },
+  {
+    prop: "",
+    label: "录入状态",
+    width: "120px",
+  },
+
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    // _noset_: true,
+    width: "80px",
+    _slot_: "operation",
+  },
+]
+
+export {
+  listCol
+}

+ 223 - 61
src/views/orderEntry/orderEnter/index.vue

@@ -1,63 +1,166 @@
 <template>
   <div class="box">
-    <el-form
-      ref="form"
-      :model="ruleForm"
-      label-width="80px"
-      size="medium "
-      class="form"
-    >
-      <el-row>
-        <el-col :span="8">
-          <el-form-item label="销售方" prop="cs1" label-width="100px">
-            <el-select
-              v-model="ruleForm.cs1"
-              style="width: 100%"
-              placeholder="咨询类型"
+    <div class="searchBox">
+      <el-form
+        ref="form"
+        :model="ruleForm"
+        label-width="80px"
+        size="medium "
+        class="form"
+      >
+        <el-row>
+          <el-col :span="7">
+            <el-form-item label="销售方" prop="cs1" label-width="100px">
+              <el-select
+                v-model="ruleForm.cs1"
+                style="width: 100%"
+                placeholder="咨询类型"
+              >
+                <el-option
+                  v-for="item in cs1Arr"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="平台订单号" prop="cs2" label-width="110px">
+              <el-input
+                v-model="ruleForm.cs2"
+                placeholder="平台订单号"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="10">
+            <el-form-item label="平台下单时间" prop="cs3" label-width="120px">
+              <period-date-picker
+                :start="ruleForm.start1"
+                :end="ruleForm.end1"
+                :width="'130px'"
+                :size="searchSize"
+                @timeReturned="handleTime"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="PO编号" prop="cs4" label-width="100px">
+              <el-input v-model="ruleForm.cs4" placeholder="PO编号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="平台商品编号" prop="cs5" label-width="110px">
+              <el-input
+                v-model="ruleForm.cs5"
+                placeholder="平台商品编号"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="10">
+            <el-form-item label="导入时间" prop="cs6" label-width="120px">
+              <period-date-picker
+                :start="ruleForm.start2"
+                :end="ruleForm.end2"
+                :width="'130px'"
+                :size="searchSize"
+                @timeReturned="handleTime"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div class="rightBtn">
+        <el-button type="primary" icon="el-icon-search" class="btn"
+          >批量关联库存</el-button
+        >
+        <el-button type="primary" icon="el-icon-search" class="btn"
+          >搜索</el-button
+        >
+        <el-button type="primary" icon="el-icon-download" class="btn"
+          ><a href="./static/C端订单导入模板.xlsx">下载导入模板</a></el-button
+        >
+        <el-button icon="el-icon-refresh-right" class="btn">重置</el-button>
+      </div>
+    </div>
+    <div class="tableBox">
+      <ex-table
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @selection="selection_change"
+      >
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
           >
-            <el-option
-              v-for="item in cs1Arr"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item label="平台订单号" prop="cs2" label-width="100px">
-              <el-input v-model="ruleForm.cs2" placeholder="平台订单号"></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item label="PO编号" prop="cs3" label-width="100px">
-              <el-input v-model="ruleForm.cs3" placeholder="PO编号"></el-input>
-          </el-form-item>
-        </el-col>
+            <i
+              class="el-icon-view tb-icon"
+              @click="
+                routeGoto('goodsCostDetail', {
+                  id: scope.row.spuCode,
+                  type: 'view',
+                })
+              "
+            ></i>
+          </el-tooltip>
 
-
-        <el-col :span="8">
-          <el-form-item label="平台下单时间" prop="cs3" label-width="100px">
-              <!-- <period-date-picker
-                  :start="parmValue.start"
-                  :end="parmValue.end"
-                  :width="'134px'"
-                  :size="searchSize"
-                  @timeReturned="handleTime"
-                /> -->
-          </el-form-item>
-        </el-col>
-      </el-row>
-    </el-form>
-    <a class="downloadAddr" href="./static/C端订单导入模板.xlsx">下载模板</a>
+          <el-tooltip
+            v-if="
+              (powers.some((item) => item == '054') &&
+                scope.row.status === '1') ||
+              (powers.some((item) => item == '054') && scope.row.status === '4')
+            "
+            effect="dark"
+            content="修改基础信息"
+            placement="top"
+          >
+            <i
+              class="el-icon-c-scale-to-original tb-icon"
+              @click="
+                wantto(
+                  scope.row.is_online,
+                  scope.row.spuCode,
+                  scope.row.status,
+                  '2'
+                )
+              "
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+    </div>
   </div>
 </template>
 
 <script>
+import { listCol } from "./columns";
+import { mapGetters } from "vuex";
 export default {
   data() {
     return {
+      cs1Arr: [
+        { value: "0", label: "一地" },
+        { value: "1", label: "多地" },
+      ],
       ruleForm: {
         cs1: "",
         cs2: "",
@@ -65,15 +168,55 @@ export default {
         cs4: "",
         cs5: "",
         cs6: "",
-       
+        end1: "",
+        start1: "",
+        end2: "",
+        start2: "",
+      },
+      changeList: [],
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
       },
-       cs1Arr:[
-          { value: "0", label: "一地" },
-          { value: "1", label: "多地" },
-        ]
+      table: {
+        stripe: true,
+        border: true,
+      },
+      tableData: [],
+      columns: listCol,
+      
     };
   },
-  methods: {},
+  computed: {
+    //组件SIZE设置
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+  },
+  methods: {
+    async handleTime(e) {
+      console.log(this.ruleForm.start);
+      console.log(this.ruleForm.end);
+      // this.ruleForm.start = e.startTime || "";
+      // this.ruleForm.end = e.endTime || "";
+      // if (
+      //   (this.ruleForm.start !== "" && this.ruleForm.end !== "") ||
+      //   (this.ruleForm.start === "" && this.ruleForm.end === "")
+      // ) {
+      //   this.pageInfo.curr = 1;
+      //   this.ruleForm.page = 1;
+      //   // await this.searchList();
+      // }
+    },
+    searchList(){
+      alert(11)
+    },
+
+    selection_change(e) {
+      const { list } = e;
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+  },
 };
 </script>
 
@@ -82,14 +225,33 @@ export default {
   width: 100%;
   padding: 8px 12px 0 10px;
 }
-.downloadAddr {
-  width: 60px;
-  height: 30px;
-  background: red;
-  display: block;
+.searchBox {
+  width: 100%;
+  margin-top: 20px;
+  display: flex;
 }
 .form {
-  width: 70%;
+  width: 80%;
+}
+/deep/ .el-input__inner {
+  height: 36px;
+  line-height: 36px;
+}
+.rightBtn {
+  width: 20%;
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-around;
+  .btn {
+    height: 36px;
+    margin-left: 0px;
+    display: flex;
+    align-items: center;
+  }
+}
+.tableBox {
+  width: 100%;
+  margin-top: 20px;
 }
 </style>
 

+ 16 - 16
src/views/orderEntry/orderImport/columns.js

@@ -1,83 +1,83 @@
 const columns = [
 
   {
-    prop: "cs0",
+    prop: "platform_code",
     label: "平台订单号",
     fixed: "left",
     width: "152px",
   },
   {
-    prop: "cs1",
+    prop: "po_code",
     label: "其他单号",
     width: "140px",
   },
   {
-    prop: "cs2",
+    prop: "platform_time",
     label: "平台订单下单时间",
     width: "140px",
   },
   {
-    prop: "cs3",
+    prop: "sale_source",
     label: "销售渠道",
     width: "140px",
   },
   {
-    prop: "cs4",
+    prop: "good_code",
     label: "平台商品编号",
     width: "140px",
   },
   {
-    prop: "cs5",
+    prop: "price",
     label: "单价(元)",
     width: "140px",
   },
   {
-    prop: "cs6",
+    prop: "num",
     label: "数量",
     width: "140px",
   },
   {
-    prop: "cs7",
+    prop: "before_discount_all_price",
     label: "优惠前总金额",
     width: "140px",
   },
   {
-    prop: "cs8",
+    prop: "discount_price",
     label: "优惠金额",
     width: "140px",
   },
   {
-    prop: "cs9",
+    prop: "after_price",
     label: "商品优惠后的金额",
     width: "140px",
   },
   {
-    prop: "cs10",
+    prop: "activity_name",
     label: "优惠活动名称",
     width: "140px",
   },
   {
-    prop: "cs11",
+    prop: "mode",
     label: "收费模式",
     width: "140px",
   },
   {
-    prop: "cs12",
+    prop: "order_remark",
     label: "订单备注",
     width: "140px",
   },
   {
-    prop: "cs13",
+    prop: "contactor",
     label: "收货人",
     width: "140px",
   },
   {
-    prop: "cs14",
+    prop: "mobile",
     label: "联系电话",
     width: "140px",
   },
   {
-    prop: "cs15",
+    prop: "addr",
     label: "联系地址",
     width: "140px",
   },

+ 49 - 42
src/views/orderEntry/orderImport/index.vue

@@ -13,39 +13,21 @@
         </ex-table>
       </div>
       <div class="btn">
-            <el-button type="primary">提交</el-button>
-          <el-button>取消</el-button>
+            <el-button type="primary" @click="submit">提交</el-button>
+          <el-button @click="cancel">取消</el-button>
       </div>
   </div>
 </template>
 
 <script>
+import asyncRequest from "@/apis/service/orderEntry/orderImport";
+import resToken from "@/mixins/resToken";
 import { province_list, city_list, county_list } from "@/assets/js/area-data";
 import {columns} from "./columns";
 export default {
+  mixins: [resToken],
   data() {
-      const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("联系电话不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("联系电话格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    const validateWeight = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("收货总数不能为空!"));
-      } else {
-        if (!isnumber(value)) {
-          callback(new Error("收货总数仅支持整数!"));
-        } else {
-          callback();
-        }
-      }
-    };
+      
     return {
         
       
@@ -136,30 +118,31 @@ export default {
       list.forEach((v1) => {
         
         let b = Object.values(v1);
-        console.log(b)
+        
         // let item = this.get_code(b[3], b[4], b[5]);
         let model = {
-          cs0: b[0] + "",
-          cs1: b[1] + "",
-          cs2: b[2] + "",
-          cs3: b[3] + "",
-          cs4: b[4] + "",
-          cs5: b[5] + "",
-          cs6: b[6] + "",
-          cs7: b[7] + "",
-          cs8: b[8] + "",
-          cs9: b[9] + "",
-          cs10: b[10] + "",
-          cs11: b[11] + "",
-          cs12: b[12] + "",
-          cs13: b[13] + "",
-          cs14: b[14] + "",
-          cs15: b[15] + "",
+          platform_code: b[0] + "",
+          po_code: b[1] + "",
+          platform_time: b[2] + "",
+          sale_source: b[3] + "",
+          good_code: b[4] + "",
+          price: b[5] + "",
+          num: b[6] + "",
+          before_discount_all_price: b[7] + "",
+          discount_price: b[8] + "",
+          after_price: b[9] + "",
+          activity_name: b[10] + "",
+          mode: b[11] + "",
+          order_remark: b[12] + "",
+          contactor: b[13] + "",
+          mobile: b[14] + "",
+          addr: b[15] + "",
           
         };
-        console.log(model)
+       
         this.tableData.push(model);
       });
+
       // if (!tableOk) {
       //   this.$message.error("最晚收货日期不正确,请将表格格式转为文本上传!");
       // }
@@ -219,6 +202,30 @@ export default {
       }
       return { name: name, code: code };
     },
+    //取消
+    cancel(){
+      this.tableData = [];
+    },
+    //提交
+   async submit(){
+     const model = {
+       list:this.tableData
+     }
+      console.log(model)
+      const res = await asyncRequest.orderimport(model)
+      console.log(res)
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: "成功!",
+          message: "",
+        });
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+     
+    }
   },
 };
 </script>

+ 24 - 2
src/views/sellOut/bargainList/detail.vue

@@ -189,6 +189,23 @@
                 @searchChange="examForm($event, 3, '财务主管')"
               />
             </el-collapse-item>
+
+
+              <!-- 需修改item == 059条件 -->
+            <el-collapse-item
+              title="BOSS审批"
+              name="5"                         
+              
+              v-if="status == '8' && powers.some((item) => item == '084')"
+            >
+              <exam-form
+                :statusList="[]"
+                :newTime="newTime"
+                :disabled="false"
+                :isMust="false"
+                @searchChange="examForm($event, 8, 'BOSS')"
+              />
+            </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
         <el-tab-pane label="审批记录" name="3">
@@ -281,6 +298,8 @@ export default {
         { id: "5", label: "主管驳回", type: "" },
         { id: "6", label: "财务主管驳回", type: "" },
         { id: "7", label: "已取消议价", type: "" },
+        { id: "8", label: "待BOSS审批", type: "" },
+        { id: "9", label: "BOSS驳回", type: "" },
       ],
     };
   },
@@ -349,10 +368,13 @@ export default {
           model.status = e.state === "1" ? "2" : "5";
         } else if (type === 2) {
           model.status = "3";
-        } else {
+        }else if (type === 3) {
+          model.status = "8";
+        }else if (type === 8) {
+          model.status = e.state === "1" ? "4" : "9";
+        }   else {
           model.status = e.state === "1" ? "4" : "6";
         }
-
         await this.setstatus(`提交${title}审核`, model);
       }
     },

+ 3 - 0
src/views/sellOut/bargainList/index.vue

@@ -131,6 +131,7 @@
           </div>
         </template>
         <template #status="{ scope }">
+          <div>{{scope.row.status}}</div>
           <el-tag
             :size="tablebtnSize"
             :type="scope.row.status == '0' ? 'warning' : ''"
@@ -218,6 +219,8 @@ export default {
         { id: "5", label: "业务主管驳回" },
         { id: "6", label: "财务主管驳回" },
         { id: "7", label: "已取消议价" },
+        { id: "8", label: "待BOSS审批" },
+        { id: "9", label: "BOSS驳回" },
       ],
 
       sitem: null,

+ 119 - 42
src/views/sellOut/zixunOrder/components/addEditBargain.vue

@@ -38,7 +38,12 @@
           </el-col>
           <el-col :span="4">
             <el-form-item label="单位" label-width="50px">
-              <el-input v-if="show_sitem"  maxlength="10" v-model="show_sitem.unit" disabled />
+              <el-input
+                v-if="show_sitem"
+                maxlength="10"
+                v-model="show_sitem.unit"
+                disabled
+              />
             </el-form-item>
           </el-col>
           <el-col :span="17">
@@ -46,7 +51,7 @@
               <el-input
                 v-if="show_sitem"
                 v-model="show_sitem.good_name"
-                 maxlength="100"
+                maxlength="100"
                 disabled
               />
             </el-form-item>
@@ -73,7 +78,7 @@
               <el-input
                 v-if="show_sitem"
                 v-model="show_sitem.sale_price"
-                 maxlength="20"
+                maxlength="20"
                 disabled
               />
             </el-form-item>
@@ -100,14 +105,13 @@
               />
             </el-form-item>
           </el-col>
-
           <!-- 需修改字段 -->
           <el-col :span="12">
             <el-form-item label="当前工艺费" label-width="108px">
               <el-input
                 v-if="show_sitem"
-                v-model="show_sitem.sale_price"
-                 maxlength="20"
+                v-model="show_sitem.sale_cost_fee"
+                maxlength="20"
                 disabled
               />
             </el-form-item>
@@ -115,27 +119,30 @@
           <el-col :span="12">
             <el-form-item
               label="期望工艺费"
-              prop="bargain_price"
+              prop="cost_price"
               label-width="108px"
             >
               <digital-input
-                :values="ruleForm.bargain_price"
-                :name="'ruleForm.bargain_price'"
+                :values="ruleForm.cost_price"
+                :name="'ruleForm.cost_price'"
                 :placeholder="'期望工艺费'"
                 :min="0"
-                :disabled="sitem.is_gold_price == 1 ? false : true"
+                :disabled="
+                  sitem.is_gold_price == 1 && sitem.can[0].id == 6
+                    ? false
+                    : true
+                "
                 :max="100000000000"
                 :position="'right'"
                 :precision="2"
                 :size="'mini'"
                 :controls="false"
                 :append="'元'"
-                @reschange="number_change($event, 'bargain_price')"
+                @reschange="number_change($event, 'cost_price')"
               />
             </el-form-item>
           </el-col>
 
-
           <el-col :span="18">
             <el-form-item
               label="议价备注:"
@@ -204,6 +211,7 @@ export default {
         bargain_price: "0",
         result_info_id_name: "",
         bargain_remark: "",
+        cost_price: "0",
       },
       show_sitem: null,
       rulesThis: this.rules,
@@ -218,7 +226,14 @@ export default {
         bargain_price: [
           {
             required: true,
-            validator: validate_num,
+            message: "期望售价不能为空!",
+            trigger: "blur",
+          },
+        ],
+        cost_price: [
+          {
+            required: true,
+            message: "期望工艺费不能为空!",
             trigger: "blur",
           },
         ],
@@ -246,7 +261,7 @@ export default {
     },
   },
   mounted() {
-    console.log("11111111111111111",this.sitem.is_gold_price)
+    console.log("11111111111111111", this.sitem.is_gold_price);
   },
   methods: {
     itemidChange(e) {
@@ -281,9 +296,10 @@ export default {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
           this.ruleForm = {
-            bargain_price: sale_price || "0",
+            bargain_price: "0",
             result_info_id: "",
             bargain_remark: "",
+            cost_price: "0",
             result_info_id_name: "",
           };
         }
@@ -299,36 +315,97 @@ export default {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;
-          const { bargain_price, result_info_id, bargain_remark } = JSON.parse(
-            JSON.stringify(this.ruleForm)
-          );
-          const { bidNo, sale_price } = this.sitem;
-          if (sale_price * 100 === bargain_price * 100) {
-            this.$message.warning("期望售价不能等于当前售价!");
+          const { bargain_price, result_info_id, bargain_remark, cost_price } =
+            JSON.parse(JSON.stringify(this.ruleForm));
+          const { bidNo, sale_price, is_gold_price, can ,sale_cost_fee} = this.sitem;
+          //根据实时金价对接口进行不同传参
+          if (is_gold_price == "1" && can[0].id == 6) {
+            if (sale_cost_fee * 100 <= cost_price * 100) {
+              this.$message.warning("期望工艺费不能大于等于当前工艺费!");
+              this.loading = false;
+              return;
+            }
+            const model = {
+              bidNo: bidNo,
+              bargain_price: "0", //议价金额固定0
+              result_info_id,
+              bargain_remark,
+              cost_price: cost_price,
+            };
+
+            let res = await asyncRequest.bargain_add(model);
             this.loading = false;
-            return;
-          }
-          const model = {
-            bidNo: bidNo,
-            bargain_price: bargain_price, // 账号
-            result_info_id,
-            bargain_remark,
-          };
-          let res = await asyncRequest.bargain_add(model);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "议价流程创建成功!",
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
+            if (res && res.code === 0) {
+              this.$notify.success({
+                title: "议价流程创建成功!",
+                message: "",
+              });
+              this.showModelThis = false;
+              // 刷新
+              this.$emit("refresh");
+            } else if (res && res.code >= 100 && res.code <= 104) {
+              await this.logout();
+            } else {
+              this.$message.warning(res.message);
+            }
           } else {
-            this.$message.warning(res.message);
+            if (sale_price * 100 <= bargain_price * 100) {
+              this.$message.warning("期望售价不能大于等于当前售价!");
+              this.loading = false;
+              return;
+            }
+            const model = {
+              bidNo: bidNo,
+              bargain_price: bargain_price, // 账号
+              result_info_id,
+              bargain_remark,
+              cost_price: "0", //工艺费固定0
+            };
+
+            let res = await asyncRequest.bargain_add(model);
+            this.loading = false;
+            if (res && res.code === 0) {
+              this.$notify.success({
+                title: "议价流程创建成功!",
+                message: "",
+              });
+              this.showModelThis = false;
+              // 刷新
+              this.$emit("refresh");
+            } else if (res && res.code >= 100 && res.code <= 104) {
+              await this.logout();
+            } else {
+              this.$message.warning(res.message);
+            }
           }
+          // if (sale_price * 100 === bargain_price * 100) {
+          //   this.$message.warning("期望售价不能等于当前售价!");
+          //   this.loading = false;
+          //   return;
+          // }
+          // const model = {
+          //   bidNo: bidNo,
+          //   bargain_price: bargain_price, // 账号
+          //   result_info_id,
+          //   bargain_remark,
+          //   cost_price:"0",  //工艺费固定0
+          // };
+
+          // let res = await asyncRequest.bargain_add(model);
+          // this.loading = false;
+          // if (res && res.code === 0) {
+          //   this.$notify.success({
+          //     title: "议价流程创建成功!",
+          //     message: "",
+          //   });
+          //   this.showModelThis = false;
+          //   // 刷新
+          //   this.$emit("refresh");
+          // } else if (res && res.code >= 100 && res.code <= 104) {
+          //   await this.logout();
+          // } else {
+          //   this.$message.warning(res.message);
+          // }
         } else {
           console.log("error submit!!");
           return false;