戴艳蓉 3 years ago
parent
commit
f9e4ccd489
28 changed files with 648 additions and 5454 deletions
  1. 1 1
      src/apis/service/sellOut/bargainList/index.js
  2. 3 1
      src/views/good-share/index.vue
  3. 309 470
      src/views/sellOut/bargainList/columns.js
  4. 0 325
      src/views/sellOut/bargainList/components/ShowDataTableColumns.js
  5. 0 231
      src/views/sellOut/bargainList/components/addEditBargain.vue
  6. 0 971
      src/views/sellOut/bargainList/components/addEditForm.vue
  7. 0 755
      src/views/sellOut/bargainList/components/addEditGoodModal.vue
  8. 0 264
      src/views/sellOut/bargainList/components/baseFormAddEdit.vue
  9. 0 1185
      src/views/sellOut/bargainList/components/editForm.vue
  10. 0 361
      src/views/sellOut/bargainList/components/feedbackList.vue
  11. 0 284
      src/views/sellOut/bargainList/components/returnExpress.vue
  12. 0 314
      src/views/sellOut/bargainList/components/supplier_feedback.vue
  13. 23 31
      src/views/sellOut/bargainList/detail.vue
  14. 7 49
      src/views/sellOut/bargainList/index.vue
  15. 23 8
      src/views/sellOut/project/columns.js
  16. 11 14
      src/views/sellOut/project/components/addForm.vue
  17. 54 11
      src/views/sellOut/project/components/backGoodShow.vue
  18. 25 7
      src/views/sellOut/project/components/columnsForm.js
  19. 3 3
      src/views/sellOut/project/components/costFormAddEdit.vue
  20. 6 0
      src/views/sellOut/project/components/search-good-online-table-modal/columns.js
  21. 34 12
      src/views/sellOut/project/components/search-good-online-table-modal/index.vue
  22. 30 0
      src/views/sellOut/project/detail.vue
  23. 6 6
      src/views/sellOut/project/index.vue
  24. 0 45
      src/views/sellOut/zixunOrder/components/ShowDataTableColumns.js
  25. 1 2
      src/views/sellOut/zixunOrder/components/addEditBargain.vue
  26. 13 40
      src/views/sellOut/zixunOrder/components/addEditForm.vue
  27. 24 2
      src/views/sellOut/zixunOrder/components/addEditGoodModal.vue
  28. 75 62
      src/views/serviceParam/supplier/components/baseForm.vue

+ 1 - 1
src/apis/service/sellOut/bargainList/index.js

@@ -7,7 +7,7 @@ export default {
   // 更新
   update: (data, params) => http(api + "zxedit", data, "post", params),
   // 修改状态
-  status: (data, params) => http(api + "bargainstatus", data, "post", params),
+  status: (data, params) => http(api + "bragainstatus", data, "post", params),
   // 分页查询 反馈列表
   feedList: (data, params) => http(api + "consultbidlist", data, "post", params),
  // 分页查询

+ 3 - 1
src/views/good-share/index.vue

@@ -69,7 +69,7 @@ export default {
       status: "",
       radio: "",
       sitem: {},
-      queryId: "PROa8gi220310202256",
+      queryId: "",
       multipleSelection: [],
       tableData: [],
       newTime: "",
@@ -84,6 +84,8 @@ export default {
   },
 
   mounted() {
+    const { id } = this.$route.query;
+    this.queryId = id;
     this.initData();
   },
   methods: {

+ 309 - 470
src/views/sellOut/bargainList/columns.js

@@ -1,495 +1,309 @@
-const validate_budget_price = (rule, value, callback) => {
-  if (value === "") {
-    callback(new Error("预算单价不能为空!"));
-  } else if (
-    value === "0" ||
-    value === "0." ||
-    value === "0.0" ||
-    value === "0.00"
-  ) {
-    callback(new Error("预算单价不能为零!"));
-  } else {
-    callback();
-  }
-};
-const validate_num = (rule, value, callback) => {
-  if (value === "") {
-    callback(new Error("购买数量不能为空!"));
-  } else if (
-    value === "0") {
-    callback(new Error("购买数量不能为零!"));
-  } else {
-    callback();
-  }
-};
-const validate_total_weight = (rule, value, callback) => {
-  if (value === "") {
-    callback(new Error("商品重量不能为空!"));
-  } else if (
-    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 === "") {
-    callback(new Error("金属克重不能为空!"));
-  } else if (
-    value === "0" ||
-    value === "0." ||
-    value === "0.0" ||
-    value === "0.00" ||
-    value === "0.000") {
-    callback(new Error("金属克重不能为零!"));
-  } else {
-    callback();
-  }
-};
-const rules = {
-  arrival_time: [
-    {
-      required: true,
-      message: "到货时间不能为空",
-      trigger: "change",
-    },
-  ],
-  budget_price: [
-    {
-      required: true,
-      validator: validate_budget_price,
-      trigger: "change",
-    },
-  ],
-  num: [
-    {
-      required: true,
-      validator: validate_num,
-      trigger: "change",
-    },
-  ],
-  brand_id: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择品牌",
-      trigger: "change",
-    },
-  ],
-  unit: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择单位",
-      trigger: "change",
-    },
-  ],
-  cat_id: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择商品分类",
-      trigger: "change",
-    },
-  ],
-  good_img: [
-    {
-      required: true,
-      message: "商品图片不能为空",
-      trigger: "change",
-    },
-  ],
-  good_name: [
-    { required: true, message: "商品名称不能为空", trigger: "blur" },
-  ],
-
-  model: [
-    {
-      required: true,
-      message: "型号不能为空",
-      trigger: "blur",
-    },
-  ],
-  color: [
-    {
-      required: true,
-      message: "颜色不能为空",
-      trigger: "blur",
-    },
-  ],
-  material: [
-    {
-      required: true,
-      message: "材质不能为空",
-      trigger: "blur",
-    },
-  ],
-  total_weight: [
-    {
-      required: true,
-      validator: validate_total_weight,
-      trigger: "blur",
-    },
-  ],
-  is_addrs: [
-    {
-      required: true,
-      message: "请选择是否多地",
-      trigger: "change",
-    },
-  ],
-  is_custom: [
-    {
-      required: true,
-      message: "请选择是否定制",
-      trigger: "change",
-    },
-  ],
-  is_gold_price: [
-    {
-      required: true,
-      message: "请选择是否启用实时金价",
-      trigger: "change",
-    },
-  ],
-  config: [
-    {
-      required: true,
-      type: "array",
-      message: "至少选择一个配置",
-      trigger: "change",
-    },
-  ],
-  specs_weight: [
-    {
-      required: true,
-      validator: validate_specs_weight,
-      trigger: "blur",
-    },
-  ],
-  other_config: [
-    {
-      required: true,
-      message: "其他要求不能为空",
-      trigger: "blur",
-    },
-  ],
-  cost_desc: [
-    {
-      required: true,
-      message: "工艺说明不能为空",
-      trigger: "blur",
-    },
-  ],
-  use_desc: [
-    {
-      required: true,
-      message: "产品用途不能为空",
-      trigger: "blur",
-    },
-  ],
-  remark: [
-    {
-      required: true,
-      message: "商品备注不能为空",
-      trigger: "blur",
-    },
-  ],
-  metal_id: [
-    {
-      required: true,
-      message: "贵金属种类不能为空",
-      trigger: "blur",
-    },
-  ],
-  gold_price: [
-    {
-      required: true,
-      message: "当前金价不能为空",
-      trigger: "blur",
-    },
-  ],
-};
-const edutRules = {
-  companyNo: [
-    {
-      required: true,
-      message: "请选择销售方公司",
-      trigger: "change",
-    },
-  ],
-  khNo: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择购买方公司",
-      trigger: "change",
-    },
-  ],
-  platform_code: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择所属平台",
-      trigger: "change",
-    },
-  ],
-  endtime: [
-    {
-      required: true,
-      message: "咨询截止时间不能为空",
-      trigger: "change",
-    },
-  ],
-
-  is_project: [
-    {
-      required: true,
-      message: "请选择咨询类型!",
-      trigger: "change",
-    },
-  ],
-  projectNo: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择项目",
-      trigger: "change",
-    },
-  ],
-  arrival_time: [
-    {
-      required: true,
-      message: "到货时间不能为空",
-      trigger: "change",
-    },
-  ],
-  budget_price: [
-    {
-      required: true,
-      validator: validate_budget_price,
-      trigger: "change",
-    },
-  ],
-  num: [
-    {
-      required: true,
-      validator: validate_num,
-      trigger: "change",
-    },
-  ],
-  brand_id: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择品牌",
-      trigger: "change",
-    },
-  ],
-  unit: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择单位",
-      trigger: "change",
-    },
-  ],
-  cat_id: [
-    {
-      type: "array",
-      required: true,
-      message: "请选择商品分类",
-      trigger: "change",
-    },
-  ],
-  good_img: [
-    {
-      required: true,
-      message: "商品图片不能为空",
-      trigger: "change",
-    },
-  ],
-  good_name: [
-    { required: true, message: "商品名称不能为空", trigger: "blur" },
-  ],
-
-  model: [
-    {
-      required: true,
-      message: "型号不能为空",
-      trigger: "blur",
-    },
-  ],
-  color: [
-    {
-      required: true,
-      message: "颜色不能为空",
-      trigger: "blur",
-    },
-  ],
-  material: [
-    {
-      required: true,
-      message: "材质不能为空",
-      trigger: "blur",
-    },
-  ],
-  total_weight: [
-    {
-      required: true,
-      validator: validate_total_weight,
-      trigger: "blur",
-    },
-  ],
-  is_addrs: [
-    {
-      required: true,
-      message: "请选择是否多地",
-      trigger: "change",
-    },
-  ],
-  is_custom: [
-    {
-      required: true,
-      message: "请选择是否定制",
-      trigger: "change",
-    },
-  ],
-  is_gold_price: [
-    {
-      required: true,
-      message: "请选择是否启用实时金价",
-      trigger: "change",
-    },
-  ],
-  config: [
-    {
-      required: true,
-      type: "array",
-      message: "至少选择一个配置",
-      trigger: "change",
-    },
-  ],
-  specs_weight: [
-    {
-      required: true,
-      validator: validate_specs_weight,
-      trigger: "blur",
-    },
-  ],
-  other_config: [
-    {
-      required: true,
-      message: "其他要求不能为空",
-      trigger: "blur",
-    },
-  ],
-  cost_desc: [
-    {
-      required: true,
-      message: "工艺说明不能为空",
-      trigger: "blur",
-    },
-  ],
-  use_desc: [
-    {
-      required: true,
-      message: "产品用途不能为空",
-      trigger: "blur",
-    },
-  ],
-  remark: [
-    {
-      required: true,
-      message: "商品备注不能为空",
-      trigger: "blur",
-    },
-  ],
-  metal_id: [
-    {
-      required: true,
-      message: "贵金属种类不能为空",
-      trigger: "blur",
-    },
-  ],
-  gold_price: [
-    {
-      required: true,
-      message: "当前金价不能为空",
-      trigger: "blur",
-    },
-  ],
-};
-const feedbackListCol = [
-  {
-    prop: "bidNo",
+
+//是否定制
+const options1 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//专属类型
+const options2 = [
+  { id: "0", name: "非泰康" },
+  { id: "1", name: "泰康" },
+]
+//销售权限
+const options3 = [
+  { id: "0", name: "无销售权限" },
+  { id: "1", name: "有销售权限" },
+]
+
+//是否库存品
+const options4 = [
+  { id: "0", name: "非库存品" },
+  { id: "1", name: "库存品" },
+]
+//是否启用实时金价
+const options5 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//供货区域
+const options6 = [
+  { id: "1", name: "全国" },
+  { id: "2", name: "全国除偏远" },
+]
+//是否启用阶梯
+const options7 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//有无工差
+const options8 = [
+  { id: "0", name: "无工差" },
+  { id: "1", name: "有工差" },
+]
+//配置要求
+const options9 = ["证书", "包装盒", "绒布袋", "标签", "其他"]
+//付款方式
+const options10 = [
+  { id: "0", name: "现结" },
+  { id: "1", name: "月清" },
+  { id: "2", name: "双月清" },
+]
+//发货方式
+const options11 = [
+  { id: "0", name: "公司自提" },
+  { id: "1", name: "供应商包邮" },
+]
+
+const options12 = [
+  { id: "0", name: "一地" },
+  { id: "1", name: "多地" },
+]
+const editColumns = [
+  {
+    prop: "bargainNo",
+    label: "议价单编号",
+    span: 6
+  },
+  {
+    prop: "bidsNo",
     label: "反馈商品编号",
-    width: "160"
+    span: 6
   },
   {
-    prop: "sale_price",
-    label: "销售单价",
-    "width": "100"
+    prop: "infoNo",
+    label: "咨询单编号",
+    span: 6
   },
   {
-    prop: "good_img",
-    label: "图片",
-    _slot_: "good_img",
-    "width": "50"
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    span: 6
+  },
+  {
+    prop: "creater",
+    label: "创建人",
+    span: 6
+  },
+
+
+  {
+    prop: "brand_name",
+    label: "品牌",
+    span: 6
   },
+
   {
     prop: "good_name",
     label: "商品名称",
-    "min-width": "100"
+    _slot_: "good_name",
+    span: 12
+  },
+  {
+    prop: "can",
+    label: "商品分类",
+    _slot_: "can",
+    span: 12
   },
   {
     prop: "specinfo",
-    label: "型号",
+    label: "商品规格",
     _slot_: "specinfo",
-    "min-width": "100"
+    span: 12
+  },
+  {
+    prop: "origin_addr",
+    label: "产地",
+    span: 12
   },
 
   {
-    prop: "status",
-    label: "状态",
-    _slot_: "status",
-    width: "120px",
+    prop: "expire_day",
+    label: "咨询有效期",
+    append: '天',
+    span: 6
+  },
+  {
+    prop: "delivery_day",
+    label: "物流时间",
+    append: '天',
+    span: 6
+  },
+  {
+    prop: "work_day",
+    label: "生产工期",
+    append: '天',
+    span: 6
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    append: '%',
+    span: 6
+  },
+  {
+    prop: "is_addrs",
+    label: "是否多地",
+    _slot_: "is_addrs",
+    span: 6
+  },
+  {
+    prop: "is_custom",
+    label: "是否定制",
+    _slot_: "is_custom",
+    span: 6
   },
-  // {
-  //   prop: "expire_day",
-  //   label: "信息有效期",
-  //   "width": "85"
-  // },
-  // {
-  //   prop: "delivery_day",
-  //   label: "物流时间",
-  //   "width": "85"
-  // },
-  // {
-  //   prop: "work_day",
-  //   label: "生产工期",
-  //   "width": "85"
-  // },
 
 
   {
-    prop: "addtime",
-    label: "添加时间",
-    width: 142,
+    prop: "weight",
+    label: "商品总重量",
+    append: 'g',
+    span: 6
   },
+
   {
-    prop: "",
-    label: "操作",
-    fixed: "right",
-    _noset_: true,
-    _slot_: "operation",
-    width: 100,
+    prop: "supply_area",
+    label: "供货区域",
+    _slot_: "supply_area",
+    span: 6
+  },
+  {
+    prop: "pay_way",
+    label: "付款方式",
+    _slot_: "pay_way",
+    span: 6
+  },
+  {
+    prop: "send_way",
+    label: "发货方式",
+    _slot_: "send_way",
+    span: 6
+  },
+  {
+    prop: "cert_fee",
+    label: "成本证书费",
+    append: '元',
+    span: 6
+  },
+  {
+    prop: "pakge_fee",
+    label: "成本包装费",
+    append: '元',
+    span: 6
+  },
+  {
+    prop: "cost_fee",
+    label: "成本工艺费",
+    append: '元',
+    span: 6
+  },
+  {
+    prop: "mark_fee",
+    label: "成本加标费",
+    append: '元',
+    span: 6
+  },
+
+  {
+    prop: "demo_fee",
+    label: "成本打样费",
+    append: '元',
+    span: 6
   },
+  {
+    prop: "open_fee",
+    label: "成本开模费",
+    append: '元',
+    span: 6
+  },
+  {
+    prop: "delivery_fee",
+    label: "成本物流费",
+    append: '元',
+    span: 6
+  },
+  {
+    prop: "nake_fee",
+    label: "成本裸价",
+    append: '元',
+    span: 6
+  },
+
+  {
+    prop: "remark",
+    label: "采购备注",
+    span: 12
+  },
+
+  {
+    prop: "cost_desc",
+    label: "工艺说明",
+    span: 12
+  },
+  {
+    prop: "good_num",
+    label: "购买数量",
+    _slot_: "good_num",
+    span: 6
+  },
+  {
+    prop: "metal_id",
+    label: "贵金属信息",
+    _slot_: "metal_id",
+    span: 18
+  },
+
+
+
+
+
+
+  {
+    prop: "sale_price",
+    label: "议价前售价",
+    append: '元',
+    span: 8
+  },
+
+  {
+    prop: "cost_before_price",
+    label: "议价前工艺费",
+    append: '元',
+    span: 8
+  },
+  {
+    prop: "before_rate",
+    label: "议价前税率",
+    append: '%',
+    span: 8
+  },
+  {
+    prop: "after_price",
+    label: "议价后单价",
+    append: '元',
+    span: 8
+  },
+  {
+    prop: "cost_after_price",
+    label: "议价后工艺费",
+    append: '元',
+    span: 8
+  },
+
+  {
+    prop: "after_rate",
+    label: "议价后税率",
+    append: '%',
+    span: 8
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    span: 6
+  },
+
+
 ]
 
 const listCol = [
@@ -498,6 +312,17 @@ const listCol = [
     label: "议价编号",
     width: "160"
   },
+  {
+    prop: "bargainNo",
+    label: "采返商品编号",
+    width: "160"
+  },
+  {
+    prop: "zxNo",
+    label: "咨询单编号",
+    width: "160"
+  },
+
   {
     prop: "status",
     label: "状态",
@@ -562,4 +387,18 @@ const listCol = [
 
 
 
-export { listCol, rules, edutRules, feedbackListCol }
+export {
+  listCol, options1,
+  options2,
+  options3,
+  options4,
+  options5,
+  options6,
+  options7,
+  options8,
+  options9,
+  options10,
+  options11,
+  options12,
+  editColumns
+}

+ 0 - 325
src/views/sellOut/bargainList/components/ShowDataTableColumns.js

@@ -1,325 +0,0 @@
-
-//是否定制
-const options1 = [
-  { id: "0", name: "否" },
-  { id: "1", name: "是" },
-]
-//专属类型
-const options2 = [
-  { id: "0", name: "非泰康" },
-  { id: "1", name: "泰康" },
-]
-//销售权限
-const options3 = [
-  { id: "0", name: "无销售权限" },
-  { id: "1", name: "有销售权限" },
-]
-
-//是否库存品
-const options4 = [
-  { id: "0", name: "非库存品" },
-  { id: "1", name: "库存品" },
-]
-//是否启用实时金价
-const options5 = [
-  { id: "0", name: "否" },
-  { id: "1", name: "是" },
-]
-//供货区域
-const options6 = [
-  { id: "1", name: "全国" },
-  { id: "2", name: "全国除偏远" },
-]
-//是否启用阶梯
-const options7 = [
-  { id: "0", name: "否" },
-  { id: "1", name: "是" },
-]
-//有无工差
-const options8 = [
-  { id: "0", name: "无工差" },
-  { id: "1", name: "有工差" },
-]
-//配置要求
-const options9 = ["证书", "包装盒", "绒布袋", "标签", "其他"]
-//付款方式
-const options10 = [
-  { id: "0", name: "现结" },
-  { id: "1", name: "月清" },
-  { id: "2", name: "双月清" },
-]
-//发货方式
-const options11 = [
-  { id: "0", name: "公司自提" },
-  { id: "1", name: "供应商包邮" },
-]
-
-const options12 = [
-  { id: "0", label: "一地" },
-  { id: "1", label: "多地" },
-]
-const editColumns = [
-  {
-    prop: "bargainNo",
-    label: "议价单编号",
-    span: 6
-  },
-  {
-    prop: "status",
-    label: "状态",
-    _slot_: "status",
-    span: 6
-  },
-  {
-    prop: "creater",
-    label: "创建人",
-    span: 6
-  },
-  {
-    prop: "addtime",
-    label: "创建时间",
-    span: 6
-  },
-  {
-    prop: "bidsNo",
-    label: "反馈商品编号",
-    span: 6
-  },
-
-  {
-    prop: "brand_name",
-    label: "品牌",
-    span: 6
-  },
-
-  {
-    prop: "good_name",
-    label: "商品名称",
-    _slot_: "good_name",
-    span: 12
-  },
-  {
-    prop: "can",
-    label: "商品分类",
-    _slot_: "can",
-    span: 12
-  },
-  {
-    prop: "specinfo",
-    label: "商品规格",
-    _slot_: "specinfo",
-    span: 12
-  },
-  {
-    prop: "origin_place",
-    label: "产地",
-    span: 12
-  },
-
-  {
-    prop: "expire_day",
-    label: "咨询有效期",
-    append: '天',
-    span: 6
-  },
-  {
-    prop: "delivery_day",
-    label: "物流时间",
-    append: '天',
-    span: 6
-  },
-  {
-    prop: "work_day",
-    label: "生产工期",
-    append: '天',
-    span: 6
-  },
-  {
-    prop: "tax",
-    label: "税点",
-    append: '%',
-    span: 6
-  },
-  {
-    prop: "is_addrs",
-    label: "是否多地",
-    _slot_: "is_addrs",
-    span: 6
-  },
-  {
-    prop: "is_custom",
-    label: "是否定制",
-    _slot_: "is_custom",
-    span: 6
-  },
-
-
-  {
-    prop: "weight",
-    label: "商品总重量",
-    append: 'g',
-    span: 6
-  },
-
-  {
-    prop: "supply_area",
-    label: "供货区域",
-    _slot_: "supply_area",
-    span: 6
-  },
-  {
-    prop: "pay_way",
-    label: "付款方式",
-    _slot_: "pay_way",
-    span: 6
-  },
-  {
-    prop: "send_way",
-    label: "发货方式",
-    _slot_: "send_way",
-    span: 6
-  },
-  {
-    prop: "cert_fee",
-    label: "成本证书费",
-    append: '元',
-    span: 6
-  },
-  {
-    prop: "pakge_fee",
-    label: "成本包装费",
-    append: '元',
-    span: 6
-  },
-  {
-    prop: "cost_fee",
-    label: "成本工艺费",
-    append: '元',
-    span: 6
-  },
-  {
-    prop: "mark_fee",
-    label: "成本加标费",
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: "demo_fee",
-    label: "成本打样费",
-    append: '元',
-    span: 6
-  },
-  {
-    prop: "open_fee",
-    label: "成本开模费",
-    append: '元',
-    span: 6
-  },
-  {
-    prop: "delivery_fee",
-    label: "成本物流费",
-    append: '元',
-    span: 6
-  },
-  {
-    prop: "nake_fee",
-    label: "成本裸价",
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: "remark",
-    label: "采购备注",
-    span: 12
-  },
-
-  {
-    prop: "cost_desc",
-    label: "工艺说明",
-    span: 12
-  },
-  {
-    prop: "good_num",
-    label: "购买数量",
-    _slot_: "good_num",
-    span: 6
-  },
-  {
-    prop: "metal_id",
-    label: "贵金属信息",
-    _slot_: "metal_id",
-    span: 18
-  },
-
-
-
-
-
-
-  {
-    prop: "sale_price",
-    label: "议价前售价",
-    append: '元',
-    span: 8
-  },
-
-  {
-    prop: "cost_before_price",
-    label: "议价前工艺费",
-    append: '元',
-    span: 8
-  },
-  {
-    prop: "before_rate",
-    label: "议价前税率",
-    append: '%',
-    span: 8
-  },
-  {
-    prop: "after_price",
-    label: "议价后单价",
-    append: '元',
-    span: 8
-  },
-  {
-    prop: "cost_after_price",
-    label: "议价后工艺费",
-    append: '元',
-    span: 8
-  },
-
-  {
-    prop: "after_rate",
-    label: "议价后税率",
-    append: '%',
-    span: 8
-  },
-
-
-]
-
-
-
-
-
-
-
-export {
-  options1,
-  options2,
-  options3,
-  options4,
-  options5,
-  options6,
-  options7,
-  options8,
-  options9,
-  options10,
-  options11,
-  options12,
-  editColumns
-}
-
-

+ 0 - 231
src/views/sellOut/bargainList/components/addEditBargain.vue

@@ -1,231 +0,0 @@
-<template>
-  <el-dialog
-    v-loading="loading"
-    :title="'申请议价'"
-    :center="true"
-    align="left"
-    top="10vh"
-    width="750px"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-    @close="showModelThis = false"
-  >
-    <el-card style="margin-top: -20px">
-      <el-form
-        ref="ruleForm"
-        :model="ruleForm"
-        status-icon
-        :size="'mini'"
-        :rules="rulesThis"
-        label-width="80px"
-        class="demo-ruleForm"
-      >
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="商品名称:">
-              <el-input v-model="sitem.good_name" disabled />
-            </el-form-item>
-          </el-col>
-          <el-col :span="3">
-            <el-form-item label="图片:" style="margin: 0" label-width="44px">
-              <img
-                class="hover"
-                v-viewer
-                :src="sitem.good_img"
-                alt=""
-                v-if="sitem.good_img"
-                style="width: 35px; height: 35px"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label="单位:" label-width="50px">
-              <el-input v-model="sitem.unit" disabled />
-            </el-form-item>
-          </el-col>
-          <el-col :span="7">
-            <el-form-item label="当前售价:">
-              <el-input v-model="sitem.sale_price" disabled />
-            </el-form-item>
-          </el-col>
-          <el-col :span="10">
-            <el-form-item
-              label="期望售价:"
-              prop="bargain_price"
-              label-width="95px"
-            >
-              <digital-input
-                :values="ruleForm.bargain_price"
-                :name="'ruleForm.bargain_price'"
-                :placeholder="'期望售价'"
-                :min="0"
-                :disabled="false"
-                :max="100000000000"
-                :position="'right'"
-                :precision="2"
-                :size="'mini'"
-                :controls="false"
-                :append="'元'"
-                @reschange="number_change($event, 'bargain_price')"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="16">
-            <el-form-item label="型号:" style="margin: 0">
-              <span v-for="(si, sii) in sitem.specinfo" :key="sii + 'spec'"
-                ><span v-if="sii !== 0">--</span>
-                <span>{{ si.spec_name }}[{{ si.spec_value_name }}]</span>
-              </span>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8" style="text-align: right">
-            <el-button
-              v-if="!isDetail"
-              type="primary"
-              :size="'mini'"
-              @click="submitForm"
-              >保 存
-            </el-button>
-            <el-button @click="showModelThis = false" :size="'mini'">{{
-              isDetail ? "关 闭" : "取 消"
-            }}</el-button>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-card>
-  </el-dialog>
-</template>
-<script>
-import asyncRequest from "@/apis/service/sellOut/bargainList";
-import resToken from "@/mixins/resToken";
-export default {
-  name: "Account",
-  props: ["showModel", "sitem"],
-  mixins: [resToken],
-  data() {
-    const validate_num = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("不能为空!"));
-      } else if (
-        value === "0" ||
-        value === "0." ||
-        value === "0.0" ||
-        value === "0.00"
-      ) {
-        callback(new Error("期望售价不能为零!"));
-      } else {
-        callback();
-      }
-    };
-
-    return {
-      roleList: [],
-      loading: false,
-      title: "添加账号",
-      organizeList: [],
-      showModelThis: this.showModel,
-      ruleForm: {
-        bargain_price: "0",
-      },
-      rulesThis: this.rules,
-      rules: {
-        bargain_price: [
-          {
-            required: true,
-            validator: validate_num,
-            trigger: "blur",
-          },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  mounted() {},
-  methods: {
-    itemidChange(e) {
-      this.ruleForm.itemid = e;
-      this.$refs.ruleForm.validateField("itemid");
-    },
-    async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
-    },
-
-    number_change(e, key) {
-      this.ruleForm[key] = e + "" || "0";
-      this.$refs.ruleForm.validateField(key);
-    },
-
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          this.ruleForm = {
-            bargain_price: "0",
-          };
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          const { bargain_price } = JSON.parse(JSON.stringify(this.ruleForm));
-          const { bidNo, sale_price } = this.sitem;
-          if (sale_price * 100 === bargain_price * 100) {
-            this.$message.warning("期望售价不能等于当前售价!");
-            this.loading = false;
-            return;
-          }
-          const model = {
-            bidNo: bidNo,
-            bargain_price: bargain_price, // 账号
-          };
-          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;
-        }
-      });
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.account {
-}
-</style>

+ 0 - 971
src/views/sellOut/bargainList/components/addEditForm.vue

@@ -1,971 +0,0 @@
-<template>
-  <el-form
-    ref="ruleForm"
-    :loading="loading"
-    :model="ruleForm"
-    status-icon
-    :size="'mini'"
-    :rules="rulesThis"
-    label-width="110px"
-    style="width: 100%"
-  >
-    <el-row>
-      <el-col :span="12">
-        <el-form-item label="销售方" prop="companyNo" class="clear">
-          <search-work-company
-            :value="ruleForm.companyNo"
-            :placeholder="'销售方公司'"
-            :disabled="type === 'view'"
-            :size="'mini'"
-            :isDetail="type === 'view'"
-            @searchChange="company_idsearchChange"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="12">
-        <el-form-item label="购买方公司" prop="khNo" class="clear">
-          <search-customer
-            :value="ruleForm.khNo"
-            :names="ruleForm.customer_name"
-            :placeholder="'购买方公司'"
-            :size="'mini'"
-            @searchChange="customerChange"
-            :disabled="type === 'view'"
-            :is-detail="type === 'view'"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-form-item label="所属平台" prop="platform_code" class="clear">
-          <search-terrace
-            :value="ruleForm.platform_code"
-            :disabled="type === 'view'"
-            :size="'mini'"
-            :isDetail="type === 'view'"
-            :names="platform_code_name"
-            :placeholder="'所属平台'"
-            @searchChange="platform_code_codesearchChange"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-form-item label="咨询截止时间" prop="endtime" class="clear">
-          <el-date-picker
-            v-model="ruleForm.endtime"
-            type="datetime"
-            value-format="yyyy-MM-dd hh:mm:ss"
-            style="width: 100%"
-            :picker-options="pickerOptions"
-            placeholder="咨询截止时间"
-          >
-          </el-date-picker>
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-form-item label="咨询类型" prop="is_project" class="clear">
-          <el-select
-            v-model="ruleForm.is_project"
-            style="width: 100%"
-            placeholder="咨询类型"
-            @change="is_project_change"
-          >
-            <el-option
-              v-for="item in options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="8" v-if="ruleForm.is_project === '1'">
-        <el-form-item label="项目名称" prop="projectNo" class="clear">
-          <el-select
-            v-model="ruleForm.projectNo"
-            multiple
-            filterable
-            remote
-            clearable
-            :multiple-limit="1"
-            reserve-keyword
-            style="width: 100%"
-            :placeholder="'项目名称'"
-            :remote-method="remoteMethod"
-            :loading="selectLoading"
-            @change="selectChange"
-          >
-            <el-option
-              v-for="(item, index) in poptions"
-              :key="item.projectNo + index"
-              :label="item.project_name"
-              :value="item.projectNo + ''"
-              :disabled="item.status !== '1'"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-      <el-col :span="8" v-if="ruleForm.is_project === '1'">
-        <el-form-item
-          label="项目咨询截止时间"
-          class="clear"
-          required
-          label-width="140px"
-        >
-          <el-input
-            placeholder="项目咨询截止时间"
-            v-model="ruleForm.pendtime"
-            disabled
-            maxlength="500"
-          />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="8" v-if="ruleForm.is_project === '1'">
-        <el-form-item label="要求到货时间" class="clear" required>
-          <el-input
-            placeholder="要求到货时间"
-            v-model="ruleForm.arrtime"
-            disabled
-          />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="16" v-if="ruleForm.is_project === '1'">
-        <el-form-item label="项目用途" class="clear" required>
-          <el-input
-            placeholder="项目用途"
-            v-model="ruleForm.use_desc"
-            disabled
-            maxlength="500"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8" v-if="ruleForm.is_project === '1'">
-        <el-form-item label="项目总预算" class="clear" required>
-          <el-input
-            placeholder="项目总预算"
-            v-model="ruleForm.budget_total"
-            disabled
-          >
-            <template slot="append">元</template></el-input
-          >
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="24" v-if="ruleForm.is_project === '1'">
-        <el-form-item label="项目商品要求" class="clear" required>
-          <el-table
-            ref="multipleTable"
-            :data="ptableData"
-            :size="'mini'"
-            border
-            stripe
-            tooltip-effect="dark"
-            style="width: 100%"
-            @selection-change="handleSelectionChange"
-          >
-            <el-table-column type="selection" width="40"> </el-table-column>
-            <el-table-column label="商品阶梯" width="70px">
-              <template slot-scope="scope"> {{ scope.$index + 1 }}</template>
-            </el-table-column>
-            <el-table-column prop="good_type" label="商品类型" width="80px">
-              <template slot-scope="scope">
-                <el-tag
-                  :size="'mini'"
-                  v-text="
-                    (
-                      statusOptions.find(
-                        (item) => item.value == scope.row.good_type
-                      ) || {}
-                    ).label || '--'
-                  "
-                ></el-tag
-              ></template>
-            </el-table-column>
-            <el-table-column prop="good_name" label="商品名称" />
-            <el-table-column prop="good_img" label="商品图片" width="70">
-              <template slot-scope="scope">
-                <div
-                  v-if="scope.row.good_img"
-                  style="width: 20px; height: 20px"
-                  class="hover"
-                  v-viewer
-                >
-                  <img
-                    :src="scope.row.good_img"
-                    style="display: inline-block; width: 100%; height: 100%"
-                    alt=""
-                  />
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="cat_name" label="商品分类" />
-            <el-table-column prop="budget_price" label="预算单价" width="110" />
-            <el-table-column prop="num" label="购买数量" width="110" />
-          </el-table>
-        </el-form-item>
-      </el-col>
-      <el-co :span="24">
-        <el-form-item label="咨询商品要求" class="clear" required>
-          <el-table
-            :data="tableData"
-            stripe
-            border
-            :size="'mini'"
-            style="width: 100%"
-          >
-            <el-table-column type="expand">
-              <template slot-scope="props">
-                <show-data-table
-                  :sitem="props.row"
-                  :columns="addColumns"
-                >
-                  <template slot="noble_type">
-                    <div>
-                      <span>贵金属克重:{{ props.row.specs_weight }}g</span>
-                      <span>--</span>
-                      <span>{{
-                        props.row.is_gold_price === "1"
-                          ? "启用实时金价"
-                          : "不启用实时金价"
-                      }}</span>
-                      <span>--</span>
-                      <span>当前金价:{{ props.row.gold_price }}元/g</span>
-                      <span>--</span>
-                      <span
-                        >配置要求:<span
-                          v-for="ii in props.row.config"
-                          :key="ii"
-                          >{{ ii }},</span
-                        ></span
-                      >
-                      <span>--</span>
-                      <span>其他配置要求:{{ props.row.other_config }}</span>
-                    </div>
-                  </template>
-                </show-data-table>
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="arrival_time"
-              label="到货时间"
-              width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              prop="budget_price"
-              label="预算单价"
-              show-overflow-tooltip
-              width="110"
-            />
-            <el-table-column
-              prop="num"
-              label="购买数量"
-              show-overflow-tooltip
-              width="80"
-            />
-            <el-table-column
-              prop="cat_id_name"
-              label="商品分类"
-              show-overflow-tooltip
-              min-width="170"
-            />
-
-            <el-table-column
-              prop="good_img"
-              label="图片"
-              width="50"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <img
-                  v-viewer
-                  style="width: 26px; height: 26px; margin: 5px 5px 0 0"
-                  class="fl"
-                  v-if="scope.row.good_img"
-                  :src="scope.row.good_img"
-                  alt=""
-                />
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="good_name"
-              label="商品名称"
-              show-overflow-tooltip
-              min-width="170"
-            />
-            <el-table-column
-              prop="specinfo"
-              label="商品规格"
-              show-overflow-tooltip
-              width="170"
-            >
-              <template slot-scope="scope">
-                <span
-                  v-for="(si, sii) in scope.row.specinfo"
-                  :key="si.spec_name + sii"
-                  ><span v-if="sii !== 0">-</span>{{ si.spec_name }}:[{{
-                    si.spec_value_name
-                  }}]</span
-                >
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="is_addrs"
-              label="是否多地"
-              width="70"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.is_addrs === "1" ? "多地" : "一地" }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              prop="is_custom"
-              label="是否定制"
-              width="70"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.is_custom === "1" ? "定制" : "非定制" }}
-              </template>
-            </el-table-column>
-            <el-table-column fixed="right" width="80">
-              <template slot="header" slot-scope="scope">
-                <span>操作</span>
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  v-if="status === ''"
-                  content="添加活动商品"
-                  placement="top"
-                >
-                  <i
-                    class="el-icon-circle-plus-outline fr"
-                    style="font-size: 18px; margin-top: 2px"
-                    @click="openEdit(-1, {})"
-                  />
-                </el-tooltip>
-              </template>
-              <template slot-scope="scope">
-                <el-tooltip effect="dark" content="修改" placement="top">
-                  <i
-                    class="el-icon-edit tb-icon"
-                    @click="openEdit(scope.$index, scope.row)"
-                  ></i>
-                </el-tooltip>
-                <el-tooltip
-                  v-if="status === ''"
-                  effect="dark"
-                  content="删除"
-                  placement="top"
-                >
-                  <i
-                    class="el-icon-delete tb-icon"
-                    @click="openCostEditDelete(scope.$index)"
-                  ></i>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-form-item>
-        <add-edit-good-modal
-          :showModel="showModel"
-          :sitem="editItem"
-          @cancel="showModel = false"
-          @refresh="editGoodRefresh"
-        />
-      </el-co>
-      <el-col :span="24" style="text-align: right" v-if="id === 'add'">
-        <el-button type="primary" @click="submitForm" :size="'mini'"
-          >保 存</el-button
-        >
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-<script>
-import asyncRequest from "@/apis/service/sellOut/bargainList";
-import resToken from "@/mixins/resToken";
-import {addColumns} from "./ShowDataTableColumns";
-import addEditGoodModal from "./addEditGoodModal";
-export default {
-  name: "handover",
-  props: ["id", "sitem", "newTime"],
-  mixins: [resToken],
-  components: {
-    addEditGoodModal,
-  },
-  data() {
-    return {
-      multipleSelection: [],
-      // 表格 - 数据
-      tableData: [],
-      ptableData: [],
-      showModel: false,
-      editItem: {},
-      options: [
-        { value: "0", label: "非项目" },
-        { value: "1", label: "项目" },
-      ],
-      statusOptions: [
-        { value: "1", label: "竞品" },
-        { value: "2", label: "竞聘" },
-      ],
-      addColumns: addColumns,
-      configOptions: ["证书", "包装盒", "绒布袋", "标签", "其他"],
-      poptions: [],
-      loading: false,
-      selectLoading: false,
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() < Date.now() - 60 * 60 * 24 * 1000;
-        },
-      },
-      status: "", //存储详情接口返的状态
-      ruleForm: {
-        is_project: "0", //咨询类型 1非项目2项目,
-        projectNo: [], //项目编号
-        khNo: [], //客户编号
-        customer_name: "", //客户名称
-        companyNo: "",
-        endtime: "", //咨询截止时间
-        pendtime: "", //项目咨询截止时间
-        platform_code: [], //平台id
-        use_desc: "",
-        budget_total: "",
-        arrtime: "",
-      },
-      rulesThis: this.rules,
-      // 验证规则
-      rules: {
-        companyNo: [
-          {
-            required: true,
-            message: "请选择销售方公司",
-            trigger: "change",
-          },
-        ],
-        khNo: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择购买方公司",
-            trigger: "change",
-          },
-        ],
-        platform_code: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择所属平台",
-            trigger: "change",
-          },
-        ],
-        endtime: [
-          {
-            required: true,
-            message: "咨询截止时间不能为空",
-            trigger: "change",
-          },
-        ],
-
-        is_project: [
-          {
-            required: true,
-            message: "请选择咨询类型!",
-            trigger: "change",
-          },
-        ],
-        projectNo: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择项目",
-            trigger: "change",
-          },
-        ],
-      },
-    };
-  },
-  computed: {
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "bargainListDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  watch: {
-    id: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.status = "";
-      this.rulesThis = this.rules;
-      this.disabled = false;
-      await this.resetForm();
-      this.loading = false;
-    },
-    openEdit(index, editItem) {
-      const { is_project } = this.ruleForm;
-      if (index + "" == "-1" && is_project === "1") {
-        if (this.multipleSelection.length === 0) {
-          this.$message.warning("请选择一个项目商品要求!");
-          return;
-        }
-        if (this.multipleSelection.length > 1) {
-          this.$message.warning("每次创建只能选择一个项目商品要求!");
-          return;
-        }
-        const {
-          cat_info,
-          budget_price,
-          pgNo,
-          num,
-          good_type,
-          good_name,
-          good_img,
-        } = this.multipleSelection[0];
-        let cat_id = [];
-        if (cat_info && cat_info.length > 0) {
-          cat_info.forEach((e) => {
-            cat_id.push(e.id);
-          });
-        }
-        console.log(this.multipleSelection[0]);
-        this.editItem = {
-          p_cat_info: cat_info,
-          p_cat_id: cat_id,
-          p_budget_price: budget_price,
-          p_pgNo: pgNo,
-          p_num: num,
-          p_good_type: good_type,
-          p_good_name: good_name,
-          p_good_img: good_img,
-          p_arrtime: this.ruleForm.arrtime,
-        };
-        this.editItem.index = index;
-        this.showModel = true;
-      } else {
-        this.editItem = editItem;
-        this.editItem.index = index;
-        this.showModel = true;
-      }
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    editGoodRefresh(e) {
-      console.log(e);
-      const { index } = e;
-      if (index + "" === "-1") {
-        this.tableData.push(JSON.parse(JSON.stringify(e)));
-      } else {
-        const fsindex = parseInt(index + "");
-        this.tableData[fsindex] = JSON.parse(JSON.stringify(e));
-        this.$set(this.tableData, fsindex, this.tableData[fsindex]);
-      }
-      this.showModel = false;
-    },
-    //咨询类型选择
-    is_project_change() {
-      const { is_project } = this.ruleForm;
-      if (is_project === "0") {
-      } else {
-        this.ptableData = [];
-      }
-    },
-    openCostEditDelete(index) {
-      this.tableData.splice(index, 1);
-    },
-    async resetForm() {
-      this.resign_name = "";
-      this.hand_name = "";
-      this.status = "";
-      // 重置
-      await this.$nextTick(async () => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          let {
-            is_project, //咨询类型 1销售2咨询,
-            projectNo, //项目编号
-            khNo, //客户编号
-            customer_name, //客户名称
-            companyNo,
-            endtime, //咨询截止时间
-            platform_code, //平台id
-            ladder,
-          } = this.sitem;
-
-          this.ruleForm = {
-            is_project: is_project || "0", //咨询类型 1项目 0 非项目
-            projectNo: projectNo ? [projectNo] : [], //项目编号
-            khNo: khNo ? [khNo] : [], //客户编号
-            customer_name: customer_name || "", //客户名称
-            companyNo: companyNo || "",
-            endtime: endtime || "", //咨询截止时间
-            platform_code: platform_code ? [platform_code] : [], //平台id
-            use_desc: "",
-            budget_total: "",
-            arrtime: "",
-          };
-          this.tableData =
-            ladder && ladder.length > 0
-              ? JSON.parse(JSON.stringify(ladder))
-              : [];
-          if (this.ruleForm.projectNo && this.ruleForm.projectNo.length === 1) {
-            await this.selectChange(this.ruleForm.projectNo);
-          }
-        }
-      });
-    },
-    async submitForm() {
-      console.log(this.ruleForm);
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          // this.loading = true;
-          if (this.tableData.length === 0) {
-            this.$message.warning("至少提供一条商品要求!");
-            this.loading = false;
-            return;
-          }
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          const { pendtime, is_project, endtime } = model;
-          if (
-            is_project === "1" &&
-            new Date(endtime).getTime() > new Date(pendtime).getTime()
-          ) {
-            this.$message.warning("咨询截止时间不能晚于项目咨询截止时间!");
-            this.loading = false;
-            return;
-          }
-          model.khNo = model.khNo.toString();
-          model.platform_code = model.platform_code.toString();
-          model.projectNo = model.projectNo.toString();
-          model.ladder = [];
-          let list = JSON.parse(JSON.stringify(this.tableData));
-          list.forEach((e) => {
-            let im = {
-              good_name: e.good_name,
-              good_img: e.good_img,
-              cat_id: e.cat_id[e.cat_id.length - 1],
-              unit: e.unit.toString(),
-              brand_id: e.brand_id.toString(),
-              arrival_time: e.arrival_time,
-              cost_desc: e.cost_desc,
-              is_addrs: e.is_addrs,
-              is_custom: e.is_custom,
-              metal_id: e.metal_id,
-              config: e.config.toString(),
-              other_config: e.other_config,
-              specs_weight: e.specs_weight,
-              gold_price: e.gold_price,
-              budget_price: e.budget_price,
-              num: e.num,
-              use_desc: e.use_desc,
-              remark: e.remark,
-              pgNo: e.pgNo,
-              total_weight: e.total_weight,
-              is_gold_price: e.is_gold_price,
-              specinfo: [],
-            };
-            e.specinfo.forEach((a) => {
-              let am = {
-                specid: a.specid,
-                spec_value_id: a.spec_value_id,
-              };
-              im.specinfo.push(am);
-            });
-            model.ladder.push(im);
-          });
-
-          console.log(model);
-          const res = await asyncRequest.add(model);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "创建成功!",
-              message: "",
-            });
-            this.$emit("refresh", true);
-          } 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;
-        }
-      });
-    },
-    // //获取规格值
-    // setResData() {
-    //   let list = JSON.parse(JSON.stringify(this.spec_tableData));
-    //   let oldlist = JSON.parse(JSON.stringify(this.old_spec_tableData));
-    //   let hasIDlist = [];
-    //   list.forEach((a) => {
-    //     if (a.id !== "") {
-    //       hasIDlist.push(a);
-    //     }
-    //   });
-    //   let newList = [];
-    //   let resList = [];
-    //   oldlist.forEach((a, ai) => {
-    //     let item = null;
-    //     let index = hasIDlist.findIndex((b) => a.id === b.id);
-    //     if (index === -1) {
-    //       item = JSON.parse(JSON.stringify(a));
-    //       item.is_del = "1";
-    //     } else {
-    //       item = JSON.parse(JSON.stringify(hasIDlist[index]));
-    //     }
-    //     newList.push(item);
-    //   });
-    //   list.forEach((b) => {
-    //     if (b.id === "") {
-    //       b.is_del = "0";
-    //       newList.push(b);
-    //     }
-    //   });
-    //   newList.forEach((a) => {
-    //     let m = {
-    //       id: a.id,
-    //       specid: a.specid,
-    //       spec_value_id: a.spec_value_id,
-    //       is_del: a.is_del || "0",
-    //     };
-    //     resList.push(m);
-    //   });
-
-    //   return resList;
-    // },
-    //项目选择
-    async selectChange(e) {
-      const key = e && e.length > 0 ? e[0] : "";
-      if (key) {
-        const { code, data, message } = await asyncRequest.pdetail({
-          projectNo: key,
-        });
-        if (code === 0) {
-          const { use_desc, budget_total, ladder, arrtime, endtime } = data;
-          this.ruleForm.use_desc = use_desc || "";
-          this.ruleForm.budget_total = budget_total || "";
-          this.ruleForm.arrtime = arrtime || "";
-          this.ruleForm.pendtime = endtime || "";
-          this.ptableData = ladder;
-          this.ptableData.forEach((e) => {
-            e.cat_name = "";
-            const { cat_info } = e;
-            if (cat_info && cat_info.length > 0) {
-              cat_info.forEach((b, bi) => {
-                e.cat_name += bi !== 0 ? "/" + b.name : b.name;
-              });
-            }
-          });
-          this.tableData == [];
-        } else if (code >= 100 && code <= 104) {
-          await this.logout();
-        } else {
-          this.$message.warning(message);
-          this.ptableData = [];
-          this.ruleForm.use_desc = "";
-          this.ruleForm.budget_total = "";
-          this.ruleForm.arrtime = "";
-          this.tableData == [];
-        }
-      } else {
-        this.ptableData = [];
-        this.ruleForm.use_desc = "";
-        this.ruleForm.budget_total = "";
-        this.ruleForm.arrtime = "";
-        this.tableData = [];
-      }
-    },
-    async remoteMethod(query) {
-      this.selectLoading = true;
-      this.poptions = [];
-      const { platform_code, companyNo, khNo } = JSON.parse(
-        JSON.stringify(this.ruleForm)
-      );
-      if (!companyNo) {
-        this.$message.warning("请选择销售方公司!");
-        this.selectLoading = false;
-        return;
-      }
-      if (khNo.length === 0) {
-        this.$message.warning("请选择购买方公司!");
-        this.selectLoading = false;
-        return;
-      }
-      if (platform_code.length === 0) {
-        this.$message.warning("请选择所属平台!");
-        this.selectLoading = false;
-        return;
-      }
-      if (!query) {
-        this.selectLoading = false;
-        return;
-      }
-
-      let formValue = {
-        page: 1,
-        size: 100,
-        khNo: khNo.toString(),
-        companyNo: companyNo,
-        platform_code: platform_code.toString(),
-        status: "1",
-        project_name: query,
-      };
-
-      const { code, data, message } = await asyncRequest.plist(formValue);
-      if (code === 0) {
-        const { list } = data;
-        this.poptions = list;
-      } else if (code >= 100 && code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(message);
-        this.poptions = [];
-      }
-
-      this.selectLoading = false;
-    },
-    //平台选择
-    platform_code_codesearchChange(e) {
-      const { id, code, label } = e;
-      this.ruleForm.platform_code = id ? [id] : [];
-      this.$refs.ruleForm.validateField("platform_code");
-      this.ruleForm.projectNo = [];
-      this.ruleForm.budget_total = "0";
-      this.ruleForm.use_desc = "";
-      this.ruleForm.pendtime = "";
-      this.ruleForm.arrtime = "";
-      this.ptableData = [];
-      this.tableData = [];
-    },
-    //销售方公司选择
-    company_idsearchChange(e) {
-      if (e) {
-        const { id, code, label } = e;
-        this.ruleForm.companyNo = code || "";
-      }
-      this.$refs.ruleForm.validateField("companyNo");
-    },
-    //购买方公司选择
-    customerChange(e) {
-      if (e && e.id) {
-        this.ruleForm.khNo = [e.code];
-        this.ruleForm.customer_name = e.label;
-      } else {
-        this.ruleForm.khNo = [];
-        this.ruleForm.customer_name = "";
-      }
-      this.$refs.ruleForm.validateField("khNo");
-      this.ruleForm.projectNo = [];
-      this.ruleForm.budget_total = "0";
-      this.ruleForm.use_desc = "";
-      this.ruleForm.pendtime = "";
-      this.ruleForm.arrtime = "";
-      this.ptableData = [];
-      this.tableData = [];
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.el-form-item-error-img {
-  width: 100%;
-  ul {
-    width: 100%;
-    li {
-      float: left;
-      border: 1px solid rgb(220, 223, 230);
-      // border-left: 0;
-      box-sizing: border-box;
-      width: 254px;
-      height: 164px;
-      line-height: 164px;
-      position: relative;
-      img {
-        display: inline-block;
-        width: 100%;
-        height: 100%;
-      }
-      .el-icon-close {
-        position: absolute;
-        top: 0;
-        right: 0;
-        z-index: 2;
-        width: 25px;
-        height: 25px;
-        text-align: center;
-        line-height: 25px;
-        font-size: 19px;
-        &:hover {
-          color: #63cbe7;
-        }
-      }
-    }
-  }
-}
-.images_li {
-  // width: 254px;
-  // height: 164px;
-  float: left;
-}
-.btnupload {
-  float: left;
-  border: 1px solid rgb(220, 223, 230);
-  // border-left: 0;
-  box-sizing: border-box;
-  width: 254px;
-  height: 164px;
-  line-height: 164px;
-  text-align: center;
-}
-.Upload {
-  width: 254px;
-  height: 164px;
-  line-height: 164px;
-  text-align: center;
-  position: absolute;
-  line-height: 0px;
-  top: 0;
-  left: 0;
-  z-index: 2;
-  line-height: 164px;
-}
-.avatar-uploader-icon {
-  font-size: 33px;
-  color: #8c939d;
-  width: 50px;
-  height: 50px;
-  line-height: 50px;
-  text-align: center;
-}
-</style>

+ 0 - 755
src/views/sellOut/bargainList/components/addEditGoodModal.vue

@@ -1,755 +0,0 @@
-<template>
-  <el-dialog
-    v-loading="loading"
-    :title="title"
-    :center="true"
-    align="left"
-    top="8vh"
-    width="1040px"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-    @close="showModelThis = false"
-    append-to-body
-  >
-    <el-card style="margin: -20px 0 0 0">
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            ref="ruleForm"
-            :model="ruleForm"
-            status-icon
-            :size="'mini'"
-            :rules="rulesThis"
-            label-width="90px"
-            class="demo-ruleForm"
-          >
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="到货日期" prop="arrival_time">
-                  <el-date-picker
-                    v-model="ruleForm.arrival_time"
-                    type="date"
-                    style="width: 100%"
-                    :disabled="ruleForm.p_arrtime"
-                    value-format="yyyy-MM-dd"
-                    :picker-options="pickerOptions"
-                    placeholder="到货日期"
-                  >
-                  </el-date-picker>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="是否多地" prop="is_addrs">
-                  <el-select
-                    v-model="ruleForm.is_addrs"
-                    placeholder="是否多地"
-                    style="width: 100%"
-                  >
-                    <el-option
-                      v-for="item in is_addrs_options"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="预算单价" prop="budget_price">
-                  <digital-input
-                    :values="ruleForm.budget_price"
-                    :placeholder="'预算单价'"
-                    :min="0"
-                    :max="100000000000"
-                    :position="'right'"
-                    :precision="2"
-                    :size="'mini'"
-                    :disabled="ruleForm.p_budget_price"
-                    :controls="false"
-                    :append="'元'"
-                    @reschange="num_change($event, 'budget_price')"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="4">
-                <el-form-item label="数量" prop="num" label-width="60px">
-                  <digital-input
-                    :values="ruleForm.num"
-                    :placeholder="'数量'"
-                    :min="0"
-                    :max="100000000000"
-                    :position="'right'"
-                    :precision="0"
-                    :size="'mini'"
-                    :disabled="ruleForm.p_num"
-                    :controls="false"
-                    :append="''"
-                    @reschange="num_change($event, 'num')"
-                  />
-                </el-form-item>
-              </el-col>
-
-              <el-col :span="8">
-                <el-form-item label="品牌" prop="brand_id">
-                  <search-brand
-                    :value="ruleForm.brand_id"
-                    :size="'mini'"
-                    :isDetail="listindex !== '-1'"
-                    :names="ruleForm.brand_name"
-                    :placeholder="'品牌'"
-                    @searchChange="brand_id_searchChange"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="是否定制" prop="is_custom">
-                  <el-select
-                    v-model="ruleForm.is_custom"
-                    placeholder="是否定制"
-                    style="width: 100%"
-                  >
-                    <el-option
-                      v-for="item in is_custom_options"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-
-              <el-col :span="6">
-                <el-form-item label="重量" prop="total_weight">
-                  <digital-input
-                    :values="ruleForm.total_weight"
-                    :placeholder="'重量'"
-                    :min="0"
-                    :max="100000000000"
-                    :position="'right'"
-                    :precision="3"
-                    :controls="false"
-                    :size="'mini'"
-                    :append="'g'"
-                    @reschange="num_change($event, 'total_weight')"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="4">
-                <el-form-item label="单位" prop="unit" label-width="60px">
-                  <search-unit
-                    :value="ruleForm.unit"
-                    :size="'mini'"
-                    :isDetail="listindex !== '-1'"
-                    :names="ruleForm.unit_name"
-                    :placeholder="'单位'"
-                    @searchChange="unitsearchChange"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="商品分类" prop="cat_id">
-                  <search-sort
-                    :value="ruleForm.cat_id"
-                    :placeholder="'商品分类'"
-                    :disabled="false"
-                    :size="'mini'"
-                    :names="ruleForm.cat_id_name"
-                    :isDetail="listindex !== '-1'"
-                    @searchChange="goods_class_change"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="商品名称" prop="good_name">
-                  <el-input
-                    v-model="ruleForm.good_name"
-                    :disabled="false"
-                    placeholder="商品名称"
-                    maxlength="100"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="工艺说明" prop="cost_desc">
-                  <el-input
-                    v-model="ruleForm.cost_desc"
-                    placeholder="工艺说明"
-                    maxlength="500"
-                  />
-                </el-form-item>
-                <el-form-item label="产品用途" prop="use_desc">
-                  <el-input
-                    v-model="ruleForm.use_desc"
-                    placeholder="产品用途"
-                    maxlength="500"
-                  />
-                </el-form-item>
-                <el-form-item label="商品备注" prop="remark">
-                  <el-input
-                    v-model="ruleForm.remark"
-                    placeholder="商品备注"
-                    maxlength="500"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" style="padding: 0 0 0 15px">
-                <el-table
-                  :data="spec_tableData"
-                  :size="'mini'"
-                  border
-                  style="width: 100%"
-                  height="120px"
-                >
-                  <el-table-column prop="spec_name" label="规格类型" />
-                  <el-table-column prop="spec_value_name" label="规格值" />
-                  <el-table-column fixed="right" width="88px">
-                    <template slot="header" slot-scope="scope">
-                      <span>操作</span>
-                      <el-tooltip
-                        class="item"
-                        effect="dark"
-                        content="添加规格类型"
-                        placement="top"
-                      >
-                        <i
-                          class="el-icon-circle-plus-outline fr"
-                          style="font-size: 18px; margin-top: 2px"
-                          @click="openEdit('-1', {})"
-                        />
-                      </el-tooltip>
-                    </template>
-                    <template slot-scope="scope">
-                      <el-tooltip effect="dark" content="修改" placement="top">
-                        <i
-                          class="el-icon-edit tb-icon"
-                          @click="openEdit(scope.$index, scope.row)"
-                        ></i>
-                      </el-tooltip>
-                      <el-tooltip effect="dark" content="删除" placement="top">
-                        <i
-                          class="el-icon-delete tb-icon"
-                          @click="openDelete(scope.$index)"
-                        ></i>
-                      </el-tooltip>
-                    </template>
-                  </el-table-column>
-                </el-table>
-                <!-- 弹窗 新增/修改 -->
-                <base-form-add-edit
-                  :index="modelIndex"
-                  :show-model="showOtherModel"
-                  :sitem="modelSitem"
-                  @refresh="refreshEdit"
-                  @cancel="showOtherModel = false"
-                />
-              </el-col>
-              <el-col :span="24">
-                <el-row>
-                  <el-col :span="12" v-if="is_noble">
-                    <el-form-item label="配置要求" prop="config">
-                      <el-select
-                        v-model="ruleForm.config"
-                        multiple
-                        style="width: 100%"
-                        placeholder="配置要求"
-                      >
-                        <el-option
-                          v-for="(item, index) in config_options"
-                          :key="item + index"
-                          :label="item"
-                          :value="item"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="6" v-if="is_noble">
-                    <el-form-item label="金属克重" prop="specs_weight">
-                      <digital-input
-                        :values="ruleForm.specs_weight"
-                        :placeholder="'金属克重'"
-                        :min="0"
-                        :max="100000000000"
-                        :position="'right'"
-                        :precision="3"
-                        :controls="false"
-                        :size="'mini'"
-                        :append="'g'"
-                        @reschange="num_change($event, 'specs_weight')"
-                      />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="6" v-if="is_noble">
-                    <el-form-item label="启用金价" prop="is_gold_price">
-                      <el-select
-                        v-model="ruleForm.is_gold_price"
-                        placeholder="启用金价"
-                        style="width: 100%"
-                      >
-                        <el-option
-                          v-for="item in is_gold_price_options"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-col>
-
-              <el-col :span="24" style="text-align: right">
-                <el-row>
-                  <el-col :span="8" class="clear">
-                    <el-form-item
-                      label="商品图片"
-                      prop="good_img"
-                      class="activity-upload"
-                    >
-                      <div class="btnupload" style="position: relative">
-                        <img
-                          v-if="ruleForm.good_img"
-                          :src="ruleForm.good_img"
-                          class="avatar"
-                        />
-                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-                        <file-upload
-                          class="Upload"
-                          :disabled="false"
-                          :accept="'.jpg,.png,.jpeg'"
-                          :multiple="true"
-                          :uploadcondition="beforeAvatarUpload"
-                          @UploadErrorEvent="UploadErrorEvent"
-                          @UploadSuccessEvent="UploadSuccessEvent"
-                        ></file-upload>
-                      </div>
-                      <div class="txt-tips fl">
-                        <p>小于1Mb</p>
-                      </div>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8" v-if="is_noble">
-                    <el-form-item label="金属种类" prop="metal_id">
-                      <search-metal-kind
-                        :value="ruleForm.metal_id"
-                        :size="'mini'"
-                        :isDetail="listindex !== '-1'"
-                        :placeholder="'贵金属种类'"
-                        @searchChange="noble_metalsearchChange"
-                      />
-                    </el-form-item>
-                    <el-form-item
-                      v-if="ruleForm.is_gold_price === '1'"
-                      label="当前金价"
-                      prop="gold_price"
-                      style="margin: 0 0 0 0"
-                    >
-                      <el-input
-                        v-model="ruleForm.gold_price"
-                        disabled
-                        placeholder="当前金价"
-                        maxlength="500"
-                      >
-                        <template slot="append">元</template></el-input
-                      >
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8" class="fr tr">
-                    <el-form-item
-                      label="其他配置要求"
-                      prop="other_config"
-                      label-width="120px"
-                      v-if="is_noble"
-                    >
-                      <el-input
-                        v-model="ruleForm.other_config"
-                        type="textarea"
-                        :rows="3"
-                        placeholder="其他配置要求"
-                        maxlength="200"
-                      />
-                    </el-form-item>
-
-                    <el-button
-                      v-if="id !== '007'"
-                      type="primary"
-                      :size="'mini'"
-                      @click="submitForm"
-                      >保 存
-                    </el-button>
-                    <el-button :size="'mini'" @click="showModelThis = false">{{
-                      id == "007" ? "关 闭" : "取 消"
-                    }}</el-button>
-                  </el-col>
-                </el-row>
-              </el-col>
-            </el-row>
-          </el-form>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-<script>
-import resToken from "@/mixins/resToken";
-import { rules } from "../columns";
-import baseFormAddEdit from "./baseFormAddEdit";
-export default {
-  name: "brand",
-  props: ["showModel", "id", "sitem"],
-  mixins: [resToken],
-  components: {
-    baseFormAddEdit,
-  },
-  data() {
-    return {
-      modelIndex: "",
-      modelSitem: {},
-      showOtherModel: false,
-      spec_tableData: [],
-      loading: false,
-      is_noble: false,
-      is_addrs_options: [
-        { value: "0", label: "一地" },
-        { value: "1", label: "多地" },
-      ],
-      is_custom_options: [
-        { value: "0", label: "非定制" },
-        { value: "1", label: "定制" },
-      ],
-      is_gold_price_options: [
-        { value: "0", label: "不启用" },
-        { value: "1", label: "启用" },
-      ],
-      config_options: ["证书", "包装盒", "绒布袋", "标签", "其他"],
-      title: "添加咨询商品",
-      showModelThis: this.showModel,
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() <= Date.now();
-        },
-      },
-      ruleForm: {
-        p_cat_info: [],
-        p_cat_id: "",
-        p_budget_price: "",
-        p_pgNo: "",
-        p_num: "",
-        p_good_type: "",
-        p_good_name: "",
-        p_good_img: "",
-        pgNo: "",
-        arrival_time: "",
-        budget_price: "0.00",
-        num: "0",
-        brand_id: [],
-        cat_id: [],
-        unit: [],
-        good_img: "",
-        good_name: "",
-        total_weight: "0.000",
-        is_addrs: "",
-        is_custom: "",
-        is_gold_price: "",
-        config: [],
-        specs_weight: "0.000",
-        other_config: "",
-        cost_desc: "",
-        use_desc: "",
-        remark: "",
-        metal_id: "",
-        gold_price: "0",
-      },
-      rulesThis: this.rules,
-      rules: rules,
-      listindex: "-1",
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      const { index } = this.sitem;
-      this.listindex = index + "";
-      if (this.listindex === "-1") {
-        this.title = "添加咨询商品";
-      } else {
-        this.title = "修改咨询商品";
-      }
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
-    },
-    openEdit(index, sitem) {
-      this.modelIndex = index;
-      this.modelSitem = sitem;
-      this.showOtherModel = true;
-    },
-    openDelete(index) {
-      this.spec_tableData.splice(index, 1);
-    },
-    //规格编辑修改结果
-    refreshEdit(e) {
-      let item = JSON.parse(JSON.stringify(e));
-      const { index, id, specid, spec_name, spec_value_id, spec_value_name } =
-        item;
-      if (index + "" === "-1") {
-        this.spec_tableData.push(item);
-      } else {
-        this.spec_tableData.forEach((i, findex) => {
-          if (i.spec_id === spec_id) {
-            this.spec_tableData[findex].id = id;
-            this.spec_tableData[findex].specid = specid;
-            this.spec_tableData[findex].spec_name = spec_name;
-            this.spec_tableData[findex].spec_value_id = spec_value_id;
-            this.spec_tableData[findex].spec_value_name = spec_value_name;
-          }
-        });
-      }
-      this.showOtherModel = false;
-    },
-    async resetForm() {
-      this.spec_tableData = [];
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { index } = this.sitem;
-          let fi = index ? index + "" : "";
-          const {
-            pgNo,
-            arrival_time,
-            budget_price,
-            num,
-            brand_id,
-            cat_id,
-            good_img,
-            good_name,
-
-            total_weight,
-            is_addrs,
-            is_custom,
-            is_gold_price,
-            config,
-            specs_weight,
-            other_config,
-            cost_desc,
-            use_desc,
-            remark,
-            metal_id,
-            gold_price,
-            unit,
-            unit_name,
-            p_cat_info,
-            p_cat_id,
-            p_budget_price,
-            p_pgNo,
-            p_num,
-            p_good_type,
-            p_good_name,
-            p_good_img,
-            p_arrtime,
-            brand_name,
-            specinfo,
-            cat_id_name,
-            cat_arr_id,
-          } = this.sitem;
-          console.log(this.sitem);
-          // console.log(p_cat_info);
-          let asd = [];
-          if (p_cat_info && p_cat_info.length > 0) {
-            p_cat_info.forEach((sd) => {
-              asd.push(sd.id);
-            });
-          }
-          if (specinfo && specinfo.length > 0) {
-            this.spec_tableData = JSON.parse(JSON.stringify(specinfo));
-          } else {
-            this.spec_tableData = [];
-          }
-          this.ruleForm = {
-            p_cat_info: p_cat_info,
-            p_cat_id: p_cat_id,
-            p_cat_arr_id: asd,
-            p_budget_price: p_budget_price,
-            p_pgNo: p_pgNo,
-            p_num: p_num,
-            p_good_type: p_good_type,
-            p_good_name: p_good_name,
-            p_good_img: p_good_img,
-            p_arrtime: p_arrtime,
-
-            pgNo: fi === "-1" && p_pgNo ? p_pgNo : pgNo || "",
-            arrival_time:
-              fi === "-1" && p_pgNo ? p_arrtime : arrival_time || "",
-            budget_price:
-              fi === "-1" && p_pgNo ? p_budget_price : budget_price || "0.00",
-            num: fi === "-1" && p_pgNo ? p_num : num || "0",
-            brand_id: brand_id ? brand_id : [],
-            brand_name: brand_name ? brand_name : "",
-            cat_id: cat_id ? cat_id : [],
-            cat_arr_id: cat_arr_id ? cat_arr_id : [],
-            cat_id_name: cat_id_name ? cat_id_name : "",
-            good_img: fi === "-1" && p_pgNo ? p_good_img : good_img || "",
-            good_name: fi === "-1" && p_pgNo ? p_good_name : good_name || "",
-            total_weight: total_weight || "0",
-            is_addrs: is_addrs || "0",
-            is_custom: is_custom || "0",
-            is_gold_price: is_gold_price || "0",
-            config: config ? config : [],
-            specs_weight: specs_weight || "0.000",
-            other_config: other_config || "",
-            cost_desc: cost_desc || "",
-            use_desc: use_desc || "",
-            remark: remark || "",
-            metal_id: metal_id || "",
-            gold_price: gold_price || "0",
-            unit: unit ? unit : [],
-            unit_name: unit_name ? unit_name : "",
-          };
-          this.is_noble = false;
-          if (cat_arr_id && cat_arr_id.length > 0) {
-            cat_arr_id.forEach((e) => {
-              if (e === "6") {
-                this.is_noble = true;
-              }
-            });
-          }
-        }
-      });
-    },
-    //商品分类选择
-    async goods_class_change(e) {
-      console.log(e);
-      const { code, pid, id, label, item } = e;
-      this.ruleForm.cat_id = id ? [id] : [];
-      this.ruleForm.cat_id_name = label ? label : "";
-      this.ruleForm.cat_arr_id = item;
-      this.$refs.ruleForm.validateField("cat_id");
-      this.is_noble = pid === "6";
-    },
-
-    //单位选择
-    unitsearchChange(e) {
-      const { code, label } = e;
-      this.ruleForm.unit = code ? [code] : [];
-      this.ruleForm.unit_name = label ? label : "";
-      this.$refs.ruleForm.validateField("unit");
-    },
-    //购买数量
-    num_change(e, key) {
-      this.ruleForm[key] = e + "";
-      this.$refs.ruleForm.validateField(key);
-    },
-    //品牌选择
-    brand_id_searchChange(e) {
-      const { id, label } = e;
-      this.ruleForm.brand_id = id ? [id] : [];
-      this.ruleForm.brand_name = label ? label : "";
-      this.$refs.ruleForm.validateField("brand_id");
-    },
-    //贵金属种类选择
-    noble_metalsearchChange(e) {
-      const { id, price } = e;
-      this.ruleForm.metal_id = id ? id : "";
-      this.$refs.ruleForm.validateField("metal_id");
-      this.ruleForm.gold_price = price ? price : "0";
-      this.$refs.ruleForm.validateField("gold_price");
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          if (this.spec_tableData.length === 0) {
-            this.$message.warning("请选择商品规格!");
-            this.loading = false;
-            return;
-          }
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          const { total_weight, specs_weight, p_cat_info } = model;
-          if (total_weight * 1000 < specs_weight * 1000) {
-            this.$message.warning("商品总重量不能小于贵金属重量!");
-            this.loading = false;
-            return;
-          }
-          model.index = this.listindex;
-          model.specinfo = JSON.parse(JSON.stringify(this.spec_tableData));
-          this.loading = false;
-          this.showModelThis = false;
-          // 刷新
-          this.$emit("refresh", model);
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    //判断图片规格
-    beforeAvatarUpload(file) {
-      let isJPG = false,
-        isLt2M = false;
-      if (file) {
-        if (
-          file.type === "image/jpg" ||
-          file.type === "image/png" ||
-          file.type === "image/jpeg"
-        ) {
-          isJPG = true;
-        }
-        isLt2M = file.size / 1024 / 1024 < 1;
-        if (!isJPG) {
-          this.$message.error("图片格式不正确!");
-        }
-        if (!isLt2M) {
-          this.$message.error("图片大小不能超过 1MB!");
-        }
-      }
-
-      return isJPG && isLt2M;
-    },
-    //图片上传失败
-    UploadErrorEvent(res) {
-      if (res !== "break") {
-        this.$message.error("图片上传失败!");
-        this.ruleForm.good_img = "";
-        this.$refs.ruleForm.validateField("good_img");
-      }
-    },
-    //图片上传成功
-    async UploadSuccessEvent(data) {
-      const { url } = data;
-      if (url === "noToken") {
-        await this.logout();
-      } else {
-        this.ruleForm.good_img = url;
-        this.$message.success("图片上传成功!");
-        this.$refs.ruleForm.validateField("good_img");
-      }
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.brand {
-}
-</style>

+ 0 - 264
src/views/sellOut/bargainList/components/baseFormAddEdit.vue

@@ -1,264 +0,0 @@
-<template>
-  <el-dialog
-    v-loading="loading"
-    :title="title"
-    :center="true"
-    align="left"
-    top="18vh"
-    width="570px"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-    @close="showModelThis = false"
-    append-to-body
-  >
-    <el-card style="margin: -20px 0 0 0">
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            ref="ruleForm"
-            :model="ruleForm"
-            status-icon
-            :size="'small'"
-            :rules="rulesThis"
-            label-width="80px"
-            class="demo-ruleForm"
-          >
-            <el-form-item label="规格类型" prop="specid">
-              <search-spec
-                :value="ruleForm.specid"
-                :disabled="false"
-                :size="'mini'"
-                :isDetail="false"
-                :placeholder="'规格类型'"
-                @searchChange="specidsearchChange"
-              />
-            </el-form-item>
-            <el-form-item label="规格值" prop="spec_value_id">
-              <div v-if="specVlist.length > 0">
-                <el-radio-group
-                  v-model="ruleForm.spec_value_id"
-                  @change="spec_value_id_change"
-                >
-                  <el-radio
-                    v-for="item in specVlist"
-                    :key="item.id + item.spec_value"
-                    :label="item.id"
-                    >{{ item.spec_value }}</el-radio
-                  >
-                </el-radio-group>
-              </div>
-              <div class="no-data" v-else>暂无规格值,请添加!</div>
-            </el-form-item>
-          </el-form>
-        </el-col>
-        <el-col :span="24" style="text-align: right">
-          <el-input
-            style="width: 209px"
-            v-model="sinput"
-            class="fl"
-            :disabled="id == 'edit'"
-            :size="'small'"
-            placeholder="规格值名称,如红色"
-            maxlength="20"
-          />
-          <el-button
-            style="margin: 0 0 0 10px"
-            icon="el-icon-plus"
-            :size="'small'"
-            @click="add_spec"
-            class="fl"
-            >新增规格值</el-button
-          >
-          <el-button
-            v-if="id !== 'edit'"
-            :size="'small'"
-            type="primary"
-            @click="submitForm"
-            >保 存
-          </el-button>
-          <el-button @click="showModelThis = false" :size="'small'">{{
-            id == "edit" ? "关 闭" : "取 消"
-          }}</el-button>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-<script>
-import asyncRequest from "@/apis/service/goodStore/goodsCost";
-import resToken from "@/mixins/resToken";
-export default {
-  name: "brand",
-  props: ["showModel", "index", "sitem"],
-  mixins: [resToken],
-  data() {
-    return {
-      loading: false,
-      title: "商品规格",
-      sinput: "",
-      showModelThis: this.showModel,
-      specVlist: [],
-      ruleForm: {},
-      rulesThis: this.rules,
-
-      rules: {
-        specid: [
-          {
-            required: true,
-            message: "规格类型不能为空",
-            trigger: "change",
-          },
-        ],
-        spec_value_id: [
-          { required: true, message: "请选择规格值", trigger: "change" },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.resetFormData();
-      this.rulesThis = this.rules;
-      if (this.index + "" === "-1") {
-        this.title = "添加商品规格值";
-      } else {
-        this.title = "修改商品规格值";
-      }
-      await this.resetForm();
-      this.loading = false;
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(async () => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          if (this.index + "" !== "-1") {
-            this.specVlist = [];
-            const { specid, spec_name, spec_value_id, spec_value_name } =
-              this.sitem;
-            this.ruleForm = {
-              index: this.index,
-              specid: specid || "",
-              spec_name: spec_name || "",
-              spec_value_id: spec_value_id || "",
-              spec_value_name: spec_value_name || "",
-            };
-            await this.getlist();
-            console.log(this.ruleForm);
-          }
-        }
-      });
-    },
-    resetFormData() {
-      this.specVlist = [];
-      this.ruleForm = {
-        index: "-1",
-        specid: "",
-        spec_name: "",
-        spec_value_id: "",
-        spec_value_name: "",
-      };
-    },
-    async add_spec() {
-      const { specid } = this.ruleForm;
-      if (specid) {
-        if (this.sinput) {
-          const { code, data, message } = await asyncRequest.valueadd({
-            spec_id: specid,
-            spec_value: this.sinput,
-          });
-          if (code === 0) {
-            await this.getlist();
-          } else if (code >= 100 && code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(message);
-          }
-        } else {
-          this.$message.warning("请输入规格值!");
-        }
-      } else {
-        this.$message.warning("请选择规格类型!");
-      }
-    },
-    async specidsearchChange(e) {
-      const { id, spec_name } = e;
-      this.ruleForm.specid = id || "";
-      this.ruleForm.spec_name = spec_name || "";
-      this.$refs.ruleForm.validateField("specid");
-      await this.getlist();
-    },
-    spec_value_id_change(e) {
-      if (e) {
-        const { id, spec_value } = this.specVlist.find((i) => i.id === e);
-        this.ruleForm.spec_value_id = id || "";
-        this.ruleForm.spec_value_name = spec_value || "";
-      } else {
-        this.ruleForm.spec_value_id = "";
-        this.ruleForm.spec_value_name = "";
-      }
-      this.$refs.ruleForm.validateField("spec_value_id");
-    },
-    async getlist() {
-      const { specid } = this.ruleForm;
-      if (specid) {
-        const { code, data, message } = await asyncRequest.valueall({
-          spec_id: specid,
-        });
-        if (code === 0) {
-          this.specVlist = data;
-        } else if (code >= 100 && code <= 104) {
-          await this.logout();
-        } else {
-          this.$message.warning(message);
-        }
-      } else {
-        this.specVlist = [];
-      }
-    },
-
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.showModelThis = false;
-          console.log(this.ruleForm);
-          this.$emit("refresh", this.ruleForm);
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.goodsCostAdd {
-  .no-data {
-    text-align: center;
-    line-height: 32px;
-    color: #8492a6;
-    // border: 1px solid #ccc;
-    border-radius: 6px;
-  }
-}
-</style>

+ 0 - 1185
src/views/sellOut/bargainList/components/editForm.vue

@@ -1,1185 +0,0 @@
-<template>
-  <el-form
-    ref="ruleForm"
-    :loading="loading"
-    :model="ruleForm"
-    status-icon
-    :size="'mini'"
-    :rules="rulesThis"
-    label-width="110px"
-    style="width: 100%"
-    class="demo-ruleForm"
-  >
-    <el-row>
-      <el-col :span="12">
-        <el-form-item label="销售方" prop="companyNo">
-          <search-work-company
-            :value="ruleForm.companyNo"
-            :placeholder="'销售方公司'"
-            :disabled="
-              type === 'view' ||
-              (type === 'edit' && ruleForm.is_project === '1')
-            "
-            :size="'mini'"
-            :isDetail="type === 'view' || type === 'edit'"
-            @searchChange="company_idsearchChange"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="12">
-        <el-form-item label="购买方公司" prop="khNo">
-          <search-customer
-            :value="ruleForm.khNo"
-            :names="ruleForm.khname"
-            :placeholder="'购买方公司'"
-            :size="'mini'"
-            @searchChange="customerChange"
-            :disabled="
-              type === 'view' ||
-              (type === 'edit' && ruleForm.is_project === '1')
-            "
-            :is-detail="type === 'view' || type === 'edit'"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-form-item label="所属平台" prop="platform_code">
-          <search-terrace
-            :value="ruleForm.platform_code"
-            :disabled="
-              type === 'view' ||
-              (type === 'edit' && ruleForm.is_project === '1')
-            "
-            :size="'mini'"
-            :isDetail="type === 'view' || type === 'edit'"
-            :names="platform_name"
-            :placeholder="'所属平台'"
-            @searchChange="platform_code_codesearchChange"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-form-item label="咨询截止时间" prop="endtime">
-          <el-date-picker
-            v-model="ruleForm.endtime"
-            type="datetime"
-            value-format="yyyy-MM-dd hh:mm:ss"
-            style="width: 100%"
-            :disabled="type === 'view'"
-            :picker-options="pickerOptions"
-            placeholder="咨询截止时间"
-          >
-          </el-date-picker>
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-form-item label="咨询类型" prop="is_project">
-          <el-select
-            v-model="ruleForm.is_project"
-            style="width: 100%"
-            placeholder="咨询类型"
-            clearable
-            :disabled="
-              type === 'view' ||
-              (type === 'edit' && ruleForm.is_project === '1')
-            "
-            @change="is_project_change"
-          >
-            <el-option
-              v-for="item in options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="8" v-show="ruleForm.is_project === '1'">
-        <el-form-item
-          label="项目名称"
-          :prop="ruleForm.is_project === '1' ? 'projectNo' : ''"
-        >
-          <el-select
-            v-model="ruleForm.projectNo"
-            multiple
-            filterable
-            remote
-            clearable
-            :disabled="
-              type === 'view' ||
-              (type === 'edit' && ruleForm.is_project === '1')
-            "
-            :multiple-limit="1"
-            reserve-keyword
-            style="width: 100%"
-            :placeholder="'项目名称'"
-            :remote-method="remoteMethod"
-            :loading="selectLoading"
-            @change="selectChange"
-          >
-            <el-option
-              v-for="(item, index) in poptions"
-              :key="item.projectNo + index"
-              :label="item.project_name"
-              :value="item.projectNo + ''"
-              :disabled="item.status !== '1'"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-      <el-col :span="8" v-show="ruleForm.is_project === '1'">
-        <el-form-item label="项目咨询截止时间" required label-width="140px">
-          <el-input
-            placeholder="项目咨询截止时间"
-            v-model="ruleForm.pendtime"
-            disabled
-            maxlength="500"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8" v-show="ruleForm.is_project === '1'">
-        <el-form-item label="要求到货时间" required>
-          <el-input
-            placeholder="要求到货时间"
-            v-model="ruleForm.arrtime"
-            disabled
-          />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="16" v-show="ruleForm.is_project === '1'">
-        <el-form-item label="项目用途" required>
-          <el-input
-            placeholder="项目用途"
-            v-model="ruleForm.puse_desc"
-            disabled
-            maxlength="500"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8" v-show="ruleForm.is_project === '1'">
-        <el-form-item label="项目总预算" required>
-          <el-input
-            placeholder="项目总预算"
-            v-model="ruleForm.budget_total"
-            disabled
-          >
-            <template slot="append">元</template></el-input
-          >
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="24" v-show="ruleForm.is_project === '1'">
-        <el-form-item label="项目商品要求" required>
-          <el-table
-            :data="ptableData"
-            :size="'mini'"
-            border
-            stripe
-            tooltip-effect="dark"
-            style="width: 100%"
-          >
-            <!-- ref="multipleTable" -->
-            <!-- @selection-change="handleSelectionChange" -->
-            <!-- <el-table-column type="selection" width="40" v-if="type !== 'view'">
-            </el-table-column> -->
-            <!-- <el-table-column label="商品阶梯" width="70px">
-              <template slot-scope="scope"> {{ scope.$index + 1 }}</template>
-            </el-table-column> -->
-            <el-table-column prop="good_type" label="商品类型" width="80px">
-              <template slot-scope="scope">
-                <el-tag
-                  :size="'mini'"
-                  v-text="
-                    (
-                      statusOptions.find(
-                        (item) => item.value == scope.row.good_type
-                      ) || {}
-                    ).label || '--'
-                  "
-                ></el-tag
-              ></template>
-            </el-table-column>
-            <el-table-column prop="budget_price" label="预算单价" width="110" />
-            <el-table-column prop="num" label="购买数量" width="110" />
-            <el-table-column prop="cat_name" label="商品分类" />
-            <el-table-column prop="good_img" label="图片" width="70">
-              <template slot-scope="scope">
-                <div
-                  v-if="scope.row.good_img"
-                  style="width: 20px; height: 20px"
-                  class="hover"
-                  v-viewer
-                >
-                  <img
-                    :src="scope.row.good_img"
-                    style="display: inline-block; width: 100%; height: 100%"
-                    alt=""
-                  />
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="good_name" label="商品名称" />
-          </el-table>
-        </el-form-item>
-      </el-col>
-      <el-col :span="24">
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="到货日期" prop="arrival_time">
-              <el-date-picker
-                v-model="ruleForm.arrival_time"
-                type="date"
-                style="width: 100%"
-                :disabled="
-                  type === 'view' ||
-                  (type === 'edit' && ruleForm.is_project === '1')
-                "
-                value-format="yyyy-MM-dd"
-                :picker-options="pickerOptions"
-                placeholder="到货日期"
-              >
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="是否多地" prop="is_addrs">
-              <el-select
-                v-model="ruleForm.is_addrs"
-                placeholder="是否多地"
-                :disabled="type === 'view'"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in is_addrs_options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="预算单价" prop="budget_price">
-              <digital-input
-                :values="ruleForm.budget_price"
-                :placeholder="'预算单价'"
-                :min="0"
-                :max="100000000000"
-                :position="'right'"
-                :precision="2"
-                :size="'mini'"
-                :disabled="
-                  type === 'view' ||
-                  (type === 'edit' && ruleForm.is_project === '1')
-                "
-                :controls="false"
-                :append="'元'"
-                @reschange="budget_price_change"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label="数量" prop="num" label-width="60px">
-              <digital-input
-                :values="ruleForm.num"
-                :placeholder="'数量'"
-                :min="0"
-                :max="100000000000"
-                :position="'right'"
-                :precision="0"
-                :size="'mini'"
-                :disabled="
-                  type === 'view' ||
-                  (type === 'edit' && ruleForm.is_project === '1')
-                "
-                :controls="false"
-                :append="''"
-                @reschange="num_change"
-              />
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item label="品牌" prop="brand_id">
-              <search-brand
-                :value="ruleForm.brand_id"
-                :size="'mini'"
-                :isDetail="type === 'view'"
-                :names="brand_name"
-                :disabled="type === 'view' || type === 'edit'"
-                :placeholder="'品牌'"
-                @searchChange="brand_id_searchChange"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="是否定制" prop="is_custom">
-              <el-select
-                v-model="ruleForm.is_custom"
-                placeholder="是否定制"
-                :disabled="type === 'view'"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in is_custom_options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="重量" prop="total_weight">
-              <digital-input
-                :values="ruleForm.total_weight"
-                :placeholder="'重量'"
-                :min="0"
-                :max="100000000000"
-                :position="'right'"
-                :precision="3"
-                :controls="false"
-                :size="'mini'"
-                :append="'g'"
-                :disabled="type === 'view'"
-                @reschange="total_weight_change"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label="单位" prop="unit" label-width="60px">
-              <search-unit
-                :value="ruleForm.unit"
-                :disabled="type === 'view'"
-                :size="'mini'"
-                :isDetail="type === 'view' || type === 'edit'"
-                :names="unit_name"
-                :placeholder="'商品单位'"
-                @searchChange="unitsearchChange"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="商品分类" prop="cat_id">
-              <search-sort
-                :value="ruleForm.cat_id"
-                :placeholder="'商品分类'"
-                :disabled="type === 'view' || type === 'edit'"
-                :size="'mini'"
-                :names="cat_id_name"
-                :isDetail="type === 'view' || type === 'edit'"
-                @searchChange="goods_class_change"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="商品名称" prop="good_name">
-              <el-input
-                v-model="ruleForm.good_name"
-                :disabled="type === 'view'"
-                placeholder="商品名称"
-                maxlength="100"
-              />
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="12">
-            <el-form-item label="工艺说明" prop="cost_desc">
-              <el-input
-                v-model="ruleForm.cost_desc"
-                :disabled="type === 'view'"
-                placeholder="工艺说明"
-                maxlength="500"
-              />
-            </el-form-item>
-            <el-form-item label="产品用途" prop="use_desc">
-              <el-input
-                v-model="ruleForm.use_desc"
-                :disabled="type === 'view'"
-                placeholder="产品用途"
-                maxlength="500"
-              />
-            </el-form-item>
-            <el-form-item label="商品备注" prop="remark">
-              <el-input
-                v-model="ruleForm.remark"
-                :disabled="type === 'view'"
-                placeholder="商品备注"
-                maxlength="500"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12" style="padding: 0 0 0 15px">
-            <el-table
-              :data="spec_tableData"
-              :size="'mini'"
-              border
-              style="width: 100%"
-              height="120px"
-            >
-              <el-table-column prop="spec_name" label="规格类型" />
-              <el-table-column prop="spec_value_name" label="规格值" />
-              <el-table-column
-                fixed="right"
-                width="88px"
-                v-if="type !== 'view'"
-              >
-                <template slot="header" slot-scope="scope">
-                  <span>操作</span>
-                  <el-tooltip
-                    class="item"
-                    effect="dark"
-                    content="添加规格类型"
-                    placement="top"
-                  >
-                    <i
-                      class="el-icon-circle-plus-outline fr"
-                      style="font-size: 18px; margin-top: 2px"
-                      @click="openEdit('-1', {})"
-                    />
-                  </el-tooltip>
-                </template>
-                <template slot-scope="scope">
-                  <el-tooltip effect="dark" content="修改" placement="top">
-                    <i
-                      class="el-icon-edit tb-icon"
-                      @click="openEdit(scope.$index, scope.row)"
-                    ></i>
-                  </el-tooltip>
-                  <el-tooltip effect="dark" content="删除" placement="top">
-                    <i
-                      class="el-icon-delete tb-icon"
-                      @click="openDelete(scope.$index)"
-                    ></i>
-                  </el-tooltip>
-                </template>
-              </el-table-column>
-            </el-table>
-            <!-- 弹窗 新增/修改 -->
-            <base-form-add-edit
-              :index="modelIndex"
-              :show-model="showOtherModel"
-              :sitem="modelSitem"
-              @refresh="refreshEdit"
-              @cancel="showOtherModel = false"
-            />
-          </el-col>
-          <el-col :span="24">
-            <el-row>
-              <el-col :span="12" v-show="is_noble">
-                <el-form-item label="配置要求" :prop="is_noble ? 'config' : ''">
-                  <el-select
-                    v-model="ruleForm.config"
-                    multiple
-                    :disabled="type === 'view'"
-                    style="width: 100%"
-                    placeholder="配置要求"
-                  >
-                    <el-option
-                      v-for="(item, index) in config_options"
-                      :key="item + index"
-                      :label="item"
-                      :value="item"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6" v-show="is_noble">
-                <el-form-item
-                  label="金属克重"
-                  :prop="is_noble ? 'specs_weight' : ''"
-                >
-                  <digital-input
-                    :values="ruleForm.specs_weight"
-                    :placeholder="'金属克重'"
-                    :min="0"
-                    :max="100000000000"
-                    :position="'right'"
-                    :precision="3"
-                    :controls="false"
-                    :size="'mini'"
-                    :disabled="type === 'view'"
-                    :append="'g'"
-                    @reschange="specs_weight_change"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="6" v-show="is_noble">
-                <el-form-item
-                  label="启用金价"
-                  :prop="is_noble ? 'is_gold_price' : ''"
-                >
-                  <el-select
-                    v-model="ruleForm.is_gold_price"
-                    placeholder="启用金价"
-                    :disabled="type === 'view'"
-                    style="width: 100%"
-                  >
-                    <el-option
-                      v-for="item in is_gold_price_options"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24" style="text-align: right">
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item
-                      label="商品图片"
-                      prop="good_img"
-                      :disabled="id == '007'"
-                    >
-                      <div class="activity-upload clear">
-                        <div class="btnupload">
-                          <img
-                            v-if="ruleForm.good_img"
-                            :src="ruleForm.good_img"
-                            class="avatar"
-                          />
-                          <i
-                            v-else
-                            class="el-icon-plus avatar-uploader-icon"
-                          ></i>
-                          <file-upload
-                            class="Upload"
-                            :disabled="
-                              type === 'view' ||
-                              (type !== 'view' && ruleForm.p_good_img)
-                            "
-                            :accept="'.jpg,.png,.jpeg'"
-                            :multiple="true"
-                            :uploadcondition="beforeAvatarUpload"
-                            @UploadErrorEvent="UploadErrorEvent"
-                            @UploadSuccessEvent="UploadSuccessEvent"
-                          ></file-upload>
-                        </div>
-
-                        <div class="txt-tips fl">
-                          <p>小于1Mb</p>
-                        </div>
-                      </div>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8" v-show="is_noble">
-                    <el-form-item
-                      label="金属种类"
-                      :prop="is_noble ? 'metal_id' : ''"
-                    >
-                      <search-metal-kind
-                        :value="ruleForm.metal_id"
-                        :size="'mini'"
-                        :disabled="type === 'view'"
-                        :isDetail="type !== 'add'"
-                        :placeholder="'贵金属种类'"
-                        @searchChange="noble_metalsearchChange"
-                      />
-                    </el-form-item>
-                    <el-form-item
-                      v-show="ruleForm.is_gold_price === '1'"
-                      label="当前金价"
-                      :prop="ruleForm.is_gold_price === '1' ? 'gold_price' : ''"
-                      style="margin: 0 0 0 0"
-                    >
-                      <el-input
-                        v-model="ruleForm.gold_price"
-                        disabled
-                        placeholder="当前金价"
-                        maxlength="500"
-                      >
-                        <template slot="append">元</template></el-input
-                      >
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8" class="fr tr">
-                    <el-form-item
-                      v-show="is_noble"
-                      label="其他配置要求"
-                      prop="other_config"
-                      label-width="120px"
-                    >
-                      <el-input
-                        v-model="ruleForm.other_config"
-                        :disabled="type === 'view'"
-                        type="textarea"
-                        :rows="3"
-                        placeholder="其他配置要求"
-                        maxlength="200"
-                      />
-                    </el-form-item>
-                    <el-button
-                      v-if="type !== 'view'"
-                      type="primary"
-                      :size="'mini'"
-                      @click="submitForm"
-                      >保 存
-                    </el-button>
-                    <!-- <el-button :size="'mini'" @click="showModelThis = false">{{
-            id == "007" ? "关 闭" : "取 消"
-          }}</el-button> -->
-                  </el-col>
-                </el-row>
-              </el-col>
-            </el-row>
-          </el-col>
-        </el-row>
-      </el-col>
-      
-    </el-row>
-  </el-form>
-</template>
-<script>
-import asyncRequest from "@/apis/service/sellOut/bargainList";
-import resToken from "@/mixins/resToken";
-import { edutRules } from "../columns";
-import baseFormAddEdit from "./baseFormAddEdit";
-export default {
-  name: "handover",
-  props: ["id", "sitem", "newTime", "type"],
-  mixins: [resToken],
-  components: {
-    baseFormAddEdit,
-  },
-  data() {
-    return {
-      unit_name: "",
-      modelIndex: "",
-      modelSitem: {},
-      brand_name: "",
-      showOtherModel: false,
-      platform_name: "",
-      cat_id_name: "",
-      is_noble: false,
-      multipleSelection: [],
-      is_addrs_options: [
-        { value: "0", label: "一地" },
-        { value: "1", label: "多地" },
-      ],
-      is_custom_options: [
-        { value: "0", label: "非定制" },
-        { value: "1", label: "定制" },
-      ],
-      is_gold_price_options: [
-        { value: "0", label: "不启用" },
-        { value: "1", label: "启用" },
-      ],
-      config_options: ["证书", "包装盒", "绒布袋", "标签", "其他"],
-      ptableData: [],
-      showModel: false,
-      editItem: {},
-      spec_tableData: [],
-      options: [
-        { value: "0", label: "非项目" },
-        { value: "1", label: "项目" },
-      ],
-      statusOptions: [
-        { value: "1", label: "竞品" },
-        { value: "2", label: "竞聘" },
-      ],
-      configOptions: ["证书", "包装盒", "绒布袋", "标签", "其他"],
-      poptions: [],
-      loading: false,
-      selectLoading: false,
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() < Date.now() - 60 * 60 * 24 * 1000;
-        },
-      },
-      pickerOptions1: {
-        disabledDate(time) {
-          return time.getTime() <= Date.now();
-        },
-      },
-      status: "", //存储详情接口返的状态
-      ruleForm: {
-        is_project: "0", //咨询类型 1非项目2项目,
-        projectNo: [], //项目编号
-        khNo: [], //客户编号
-        khname: "", //客户名称
-        companyNo: "",
-        endtime: "", //咨询截止时间
-        pendtime: "", //项目咨询截止时间
-        platform_code: [], //平台id
-        puse_desc: "",
-        budget_total: "",
-        arrtime: "",
-        p_cat_info: [],
-        p_cat_id: "",
-        p_budget_price: "",
-        p_pgNo: "",
-        p_num: "",
-        p_good_type: "",
-        p_good_name: "",
-        p_good_img: "",
-        pgNo: "",
-        arrival_time: "",
-        budget_price: "0.00",
-        num: "0",
-        brand_id: [],
-        cat_id: [],
-        unit: [],
-        good_img: "",
-        good_name: "",
-        total_weight: "0",
-        is_addrs: "",
-        is_custom: "",
-        is_gold_price: "",
-        config: [],
-        specs_weight: "0.000",
-        other_config: "",
-        cost_desc: "",
-        use_desc: "",
-        remark: "",
-        metal_id: "",
-        gold_price: "",
-      },
-      rulesThis: this.rules,
-      // 验证规则
-      rules: edutRules,
-    };
-  },
-  computed: {
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "bargainListDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  watch: {
-    id: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.status = "";
-      this.spec_tableData = [];
-      this.platform_name = "";
-      this.rulesThis = this.rules;
-      this.disabled = false;
-      await this.resetForm();
-      this.loading = false;
-    },
-
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-
-    //咨询类型选择
-    is_project_change() {
-      const { is_project } = this.ruleForm;
-      if (is_project === "0") {
-      } else {
-        // this.ptableData = [];
-      }
-    },
-    async resetForm() {
-      this.resign_name = "";
-      this.hand_name = "";
-      this.status = "";
-      // 重置
-      await this.$nextTick(async () => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          let {
-            is_project, //咨询类型 1销售2咨询,
-            projectNo, //项目编号
-            khNo, //客户编号
-            khname, //客户名称
-            companyNo,
-            endtime, //咨询截止时间
-            platform_code, //平台id
-            platform_name,
-            ladder,
-            pgNo,
-            can,
-            arrival_time,
-            budget_price,
-            num,
-            brand_id,
-            brand,
-            cat_id,
-            good_img,
-            good_name,
-            total_weight,
-            is_addrs,
-            is_custom,
-            is_gold_price,
-            config,
-            specs_weight,
-            other_config,
-            cost_desc,
-            use_desc,
-            remark,
-            metal_id,
-            gold_price,
-            unit,
-            unit_name,
-            p_cat_info,
-            p_cat_id,
-            p_budget_price,
-            p_pgNo,
-            p_num,
-            p_good_type,
-            p_good_name,
-            p_good_img,
-            p_arrtime,
-            specinfo,
-          } = this.sitem;
-          this.unit_name = unit_name;
-          this.brand_name = brand;
-          this.spec_tableData =
-            specinfo && specinfo.length > 0
-              ? JSON.parse(JSON.stringify(specinfo))
-              : [];
-          this.cat_id_name = "";
-          if (can && can.length > 0) {
-            can.forEach((s, i) => {
-              if (i === 0 && s.id === "6") {
-                this.is_noble = true;
-              }
-              this.cat_id_name += i === 0 ? s.name : `_${s.name}`;
-            });
-          }
-          // console.log(pgNo);
-          let fi = "-1";
-          this.platform_name = platform_name || "";
-          this.ruleForm = {
-            infoNo: this.id,
-            is_project: is_project || "1", //咨询类型 1销售2咨询,
-            projectNo: projectNo ? [projectNo] : [], //项目编号
-            khNo: khNo ? [khNo] : [], //客户编号
-            khname: khname || "", //客户名称
-            companyNo: companyNo || "",
-            endtime: endtime || "", //咨询截止时间
-            platform_code: platform_code ? [platform_code] : [""], //平台id
-            puse_desc: "",
-            budget_total: "",
-            arrtime: "",
-            p_cat_info: p_cat_info,
-            p_cat_id: p_cat_id,
-            p_budget_price: p_budget_price,
-            p_pgNo: p_pgNo,
-            p_num: p_num,
-            p_good_type: p_good_type,
-            p_good_name: p_good_name,
-            p_good_img: p_good_img,
-            p_arrtime: p_arrtime,
-            pgNo: pgNo || "",
-            arrival_time: arrival_time || "",
-            budget_price: budget_price || "0.00",
-            num: num || "0",
-            brand_id: brand_id ? [brand_id] : [],
-            cat_id:
-              cat_id && cat_id.length > 0 ? [cat_id[cat_id.length - 1]] : [],
-            good_img: good_img || "",
-            good_name: good_name || "",
-            total_weight: total_weight || "0",
-            is_addrs: is_addrs || "0",
-            is_custom: is_custom || "0",
-            is_gold_price: is_gold_price || "0",
-            config: config ? config.split(",") : [],
-            specs_weight: specs_weight || "0.000",
-            other_config: other_config || "",
-            cost_desc: cost_desc || "",
-            use_desc: use_desc || "",
-            remark: remark || "",
-            metal_id: metal_id || "",
-            gold_price: gold_price || "",
-            unit: unit ? [unit] : [],
-          };
-          if (this.ruleForm.projectNo && this.ruleForm.projectNo.length === 1) {
-            await this.selectChange(this.ruleForm.projectNo);
-          }
-        }
-      });
-    },
-    openEdit(index, sitem) {
-      this.modelIndex = index;
-      this.modelSitem = sitem;
-      this.showOtherModel = true;
-    },
-    openDelete(index) {
-      this.spec_tableData.splice(index, 1);
-    },
-    //规格编辑修改结果
-    refreshEdit(e) {
-      let item = JSON.parse(JSON.stringify(e));
-      const { index, specid, spec_name, spec_value_id, spec_value_name } = item;
-      if (index + "" === "-1") {
-        this.spec_tableData.push(item);
-      } else {
-        let findex = parseInt(index + "");
-        this.spec_tableData[findex].specid = specid;
-        this.spec_tableData[findex].spec_name = spec_name;
-        this.spec_tableData[findex].spec_value_id = spec_value_id;
-        this.spec_tableData[findex].spec_value_name = spec_value_name;
-      }
-      this.showOtherModel = false;
-    },
-    async submitForm() {
-      console.log(this.ruleForm);
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          const { pendtime, is_project, endtime } = model;
-          if (
-            is_project === "1" &&
-            new Date(endtime).getTime() > new Date(pendtime).getTime()
-          ) {
-            this.$message.warning("咨询截止时间不能晚于项目咨询截止时间!");
-            this.loading = false;
-            return;
-          }
-          model.khNo = model.khNo.toString();
-          model.platform_code = model.platform_code.toString();
-          model.projectNo = model.projectNo.toString();
-          model.brand_id = model.brand_id.toString();
-          model.unit = model.unit.toString();
-          model.cat_id = model.cat_id.toString();
-          model.config = model.config.toString();
-          model.specinfo = [];
-          let list = JSON.parse(JSON.stringify(this.spec_tableData));
-          list.forEach((a) => {
-            let am = {
-              specid: a.specid,
-              spec_value_id: a.spec_value_id,
-            };
-            model.specinfo.push(am);
-          });
-          delete model["pendtime"];
-          delete model["arrtime"];
-          delete model["puse_desc"];
-          delete model["budget_total"];
-          this.loading = false;
-          console.log(model);
-
-          const res = await asyncRequest.update(model);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "创建成功!",
-              message: "",
-            });
-            this.$emit("refresh", true);
-          } 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;
-        }
-      });
-    },
-    //项目选择
-    async selectChange(e) {
-      // this.ptableData = [];
-      const key = e && e.length > 0 ? e[0] : "";
-      if (key) {
-        const { code, data, message } = await asyncRequest.pdetail({
-          projectNo: key,
-        });
-        if (code === 0) {
-          const {
-            use_desc,
-            budget_total,
-            ladder,
-            arrtime,
-            project_name,
-            status,
-            endtime,
-          } = data;
-          const { pgNo } = this.ruleForm;
-          this.ruleForm.puse_desc = use_desc || "";
-          this.ruleForm.budget_total = budget_total || "";
-          this.ruleForm.arrtime = arrtime || "";
-          this.ruleForm.pendtime = endtime || "";
-          this.poptions = [
-            {
-              project_name: project_name,
-              projectNo: key,
-              status: status,
-            },
-          ];
-          let list = ladder;
-          let findex = list.findIndex((a) => a.pgNo === pgNo);
-          if (findex !== -1) {
-            this.ptableData.push(list[findex]);
-            this.ptableData.forEach((e) => {
-              e.cat_name = "";
-              const { cat_info } = e;
-              if (cat_info && cat_info.length > 0) {
-                cat_info.forEach((b, bi) => {
-                  e.cat_name += bi !== 0 ? "/" + b.name : b.name;
-                });
-              }
-            });
-          }
-
-          console.log(this.ptableData);
-        } else if (code >= 100 && code <= 104) {
-          await this.logout();
-        } else {
-          this.$message.warning(message);
-          this.ptableData = [];
-          this.ruleForm.puse_desc = "";
-          this.ruleForm.budget_total = "";
-          this.ruleForm.arrtime = "";
-          this.ruleForm.pendtime = "";
-        }
-      } else {
-        this.ptableData = [];
-        this.ruleForm.puse_desc = "";
-        this.ruleForm.budget_total = "";
-        this.ruleForm.arrtime = "";
-        this.ruleForm.pendtime = "";
-      }
-    },
-    async remoteMethod(query) {
-      this.selectLoading = true;
-      this.poptions = [];
-      const { platform_code, companyNo, khNo } = JSON.parse(
-        JSON.stringify(this.ruleForm)
-      );
-      if (!companyNo) {
-        this.$message.warning("请选择销售方公司!");
-        this.selectLoading = false;
-        return;
-      }
-      if (khNo.length === 0) {
-        this.$message.warning("请选择购买方公司!");
-        this.selectLoading = false;
-        return;
-      }
-      if (platform_code.length === 0) {
-        this.$message.warning("请选择所属平台!");
-        this.selectLoading = false;
-        return;
-      }
-      if (!query) {
-        this.selectLoading = false;
-        return;
-      }
-
-      let formValue = {
-        page: 1,
-        size: 100,
-        khNo: khNo.toString(),
-        companyNo: companyNo,
-        platform_code: platform_code.toString(),
-        status: "1",
-        project_name: query,
-      };
-
-      const { code, data, message } = await asyncRequest.plist(formValue);
-      if (code === 0) {
-        const { list } = data;
-        this.poptions = list;
-      } else if (code >= 100 && code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(message);
-        this.poptions = [];
-      }
-
-      this.selectLoading = false;
-    },
-    //平台选择
-    platform_code_codesearchChange(e) {
-      if (e) {
-        const { id, code, label } = e;
-        this.ruleForm.platform_code = id ? [id] : [];
-        this.$refs.ruleForm.validateField("platform_code");
-        this.ruleForm.projectNo = [];
-        this.ruleForm.budget_total = "0";
-        this.ruleForm.puse_desc = "";
-        this.ruleForm.pendtime = "";
-        this.ruleForm.arrtime = "";
-        this.ptableData = [];
-      }
-    },
-    //品牌选择
-    brand_id_searchChange(e) {
-      const { id } = e;
-      this.ruleForm.brand_id = id ? [id] : [];
-      this.$refs.ruleForm.validateField("brand_id");
-    },
-    //销售方公司选择
-    company_idsearchChange(e) {
-      if (e) {
-        const { id, code, label } = e;
-        this.ruleForm.companyNo = code || "";
-      }
-      this.$refs.ruleForm.validateField("companyNo");
-    },
-    //购买方公司选择
-    customerChange(e) {
-      if (e && e.id) {
-        this.ruleForm.khNo = [e.code];
-        this.ruleForm.khname = e.label;
-      } else {
-        this.ruleForm.khNo = [];
-        this.ruleForm.khname = "";
-      }
-      this.$refs.ruleForm.validateField("khNo");
-      this.ruleForm.projectNo = [];
-      this.ruleForm.budget_total = "0";
-      this.ruleForm.use_desc = "";
-      this.ruleForm.pendtime = "";
-      this.ruleForm.arrtime = "";
-      this.ptableData = [];
-    },
-    //贵金属种类选择
-    noble_metalsearchChange(e) {
-      const { id, price } = e;
-      this.ruleForm.metal_id = id ? id : "";
-      this.$refs.ruleForm.validateField("noble_metal");
-      this.ruleForm.gold_price = price ? price : "0";
-      this.$refs.ruleForm.validateField("gold_price");
-    },
-    //商品分类选择
-    async goods_class_change(e) {
-      console.log(e);
-      const { code, pid, id, label, item } = e;
-      this.ruleForm.cat_id = id ? [id] : [];
-      this.ruleForm.cat_arr_id = item;
-      this.$refs.ruleForm.validateField("cat_id");
-      this.is_noble = pid === "6";
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 361
src/views/sellOut/bargainList/components/feedbackList.vue

@@ -1,361 +0,0 @@
-<template>
-  <div class="bargainList pagePadding">
-    <div
-      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
-    >
-      <ex-table
-        v-loading="loading"
-        :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();
-        "
-      >
-        <template #good_img="{ scope }">
-          <div
-            v-if="scope.row.good_img"
-            style="width: 20px; height: 20px"
-            class="hover"
-            v-viewer
-          >
-            <img
-              :src="scope.row.good_img"
-              style="display: inline-block; width: 100%; height: 100%"
-              alt=""
-            />
-          </div>
-        </template>
-        <template #status="{ scope }">
-          <el-tag
-            :size="tablebtnSize"
-            :type="scope.row.status == '0' ? 'warning' : ''"
-            v-text="
-              (statusOptions.find((item) => item.id == scope.row.status) || {})
-                .label || '--'
-            "
-          ></el-tag>
-        </template>
-        <template #specinfo="{ scope }">
-          <span v-for="(si, sii) in scope.row.specinfo" :key="si.specid + sii">
-            <span v-if="sii !== 0"></span>{{ si.spec_name }}[{{
-              si.spec_value_name
-            }}]</span
-          >
-        </template>
-
-        <template #operation="{ scope }">
-          <el-tooltip
-            v-if="powers.some((item) => item == '007')"
-            effect="dark"
-            content="详情"
-            placement="top"
-          >
-            <i
-              class="el-icon-view tb-icon"
-              @click="
-                routeGoto('bargainListDetail', {
-                  id: scope.row.infoNo,
-                  type: 'view',
-                })
-              "
-            ></i>
-          </el-tooltip>
-          <el-tooltip
-            v-if="powers.some((item) => item == '007')"
-            effect="dark"
-            content="发起议价流程"
-            placement="top"
-          >
-            <i
-              class="el-icon-s-flag tb-icon"
-              @click="wantBargaining(scope.row)"
-            ></i>
-          </el-tooltip>
-        </template>
-      </ex-table>
-      <add-edit-bargain
-        :showModel="wantBmodel"
-        :sitem="wantBsitem"
-        @cancel="wantBmodel = false"
-        @refresh="(wantBmodel = false), searchList()"
-      />
-    </div>
-    <div v-else>
-      <no-auth></no-auth>
-    </div>
-  </div>
-</template>
-   <script>
-import mixinPage from "@/mixins/elPaginationHandle";
-import resToken from "@/mixins/resToken";
-import statusList from "@/assets/js/statusList";
-import asyncRequest from "@/apis/service/sellOut/bargainList";
-import { feedbackListCol } from "../columns";
-import { mapGetters } from "vuex";
-import addEditBargain from "./addEditBargain";
-
-export default {
-  name: "bargainList",
-  mixins: [mixinPage, resToken],
-  props: ["id", "newTime"],
-  components: {
-    addEditBargain,
-  },
-  computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "bargainList"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  data() {
-    return {
-      wantBmodel: false,
-      wantBsitem: "",
-      select: "1",
-      s_input: "",
-      customerCode: [], //客户公司code
-      options: [
-        { id: "0", label: "待发布竞标" },
-        { id: "1", label: "招标进行中" },
-        { id: "2", label: "招标已结束" },
-        { id: "3", label: "等待议价结果" },
-        { id: "4", label: "待选择商品" },
-        { id: "5", label: "已成功转单" },
-        { id: "6", label: "已取消转单" },
-        { id: "7", label: "招标已暂停" },
-      ],
-      post_ownOptions: [
-        { id: "1", label: "客户承担" },
-        { id: "2", label: "公司承担" },
-        { id: "3", label: "供应商承担" },
-      ],
-      sitem: null,
-      // 状态
-      statusOptions: [
-        { id: "0", label: "待审核" },
-        { id: "1", label: "待物流反馈" },
-        { id: "3", label: "待退货" },
-        { id: "4", label: "已退货" },
-        { id: "5", label: "待客户验收" },
-      ],
-      statusList: statusList,
-      loading: true,
-      showModel: false,
-      isDetail: false,
-      modelId: 0,
-      parmValue: {
-        zxNo: "",
-        infoNo: "",
-        bidNo: "",
-        projectNo: "",
-        page: 1, // 页码
-        size: 15, // 每页显示条数
-      },
-      // 表格 - 数据
-      tableData: [],
-      // 表格 - 参数
-      table: {
-        stripe: true,
-        border: true,
-        // _defaultHeader_: ["setcol"],
-      },
-      // 表格 - 分页
-      pageInfo: {
-        size: 15,
-        curr: 1,
-        total: 0,
-      },
-      // 表格 - 列参数
-      columns: feedbackListCol,
-      serviceOptions: [
-        {
-          value: "0",
-          label: "待审核",
-        },
-        {
-          value: "1",
-          label: "待物流反馈",
-        },
-        {
-          value: "2",
-          label: "待退货",
-        },
-        {
-          value: "3",
-          label: "已退货",
-        },
-      ],
-      serviceValue: "", //售后申请处理状态
-      expectOptions: [
-        {
-          value: "1",
-          label: "退货",
-        },
-        {
-          value: "2",
-          label: "换货",
-        },
-        {
-          value: "3",
-          label: "改变售价",
-        },
-      ],
-      expectValue: "", //期望意愿
-      resultOptions: [
-        {
-          value: "ad",
-          label: "处理中",
-        },
-        {
-          value: "选项2",
-          label: "已同意",
-        },
-        {
-          value: "选项2",
-          label: "已驳回",
-        },
-      ],
-      resultValue: "", //处理结果
-    };
-  },
-  mounted() {
-    this.searchList();
-  },
-
-  methods: {
-    restSearch() {
-      this.parmValue = {
-        zxNo: "",
-        infoNo: "",
-        bidNo: "",
-        projectNo: "",
-        page: 1, // 页码
-        size: 15, // 每页显示条数
-      };
-      // 表格 - 分页
-      this.pageInfo = {
-        size: 15,
-        curr: 1,
-        total: 0,
-      };
-      this.searchList();
-    },
-
-    wantBargaining(row) {
-      this.wantBsitem = row;
-      this.wantBmodel = true;
-    },
-    openModal(id, isDetail, sitem) {
-      this.showModel = true;
-      this.modelId = id;
-      this.isDetail = isDetail;
-      this.sitem = sitem;
-    },
-
-    // 列表搜索
-    async searchList() {
-      this.loading = true;
-      this.parmValue.infoNo = this.id;
-
-      const res = await asyncRequest.feedList(this.parmValue);
-      if (res && res.code === 0 && res.data) {
-        this.tableData = res.data.list;
-        this.pageInfo.total = Number(res.data.count);
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.tableData = [];
-        this.pageInfo.total = 0;
-      }
-      this.loading = false;
-    },
-
-    async statusConfirm(id, status) {
-      let str = status === "1" ? "禁用" : "启用";
-      await this.$confirm("确定要改为" + str + "?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          this.loading = true;
-          const model = {
-            id: id,
-            status: status === "1" ? "0" : "1",
-          };
-          const res = await asyncRequest.status(model);
-          if (res && res.code === 0) {
-            this.loading = false;
-            this.$notify.success({
-              title: "状态修改成功!",
-              message: "",
-            });
-            await this.searchList();
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-    // 时间选择事件
-    async handleTime(e) {
-      if (e.startTime !== "") {
-        this.parmValue.start = e.startTime;
-      } else {
-        this.parmValue.start = "";
-      }
-      if (e.endTime !== "") {
-        this.parmValue.end = e.endTime;
-      } else {
-        this.parmValue.end = "";
-      }
-      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
-        this.pageInfo.curr = 1;
-        this.parmValue.page = 1;
-        await this.searchList();
-      }
-    },
-    async customerChange(e) {
-      if (e && e.id) {
-        this.customerCode = [e.code];
-        this.parmValue.customer_code = e.code;
-      } else {
-        this.customerCode = [];
-        this.parmValue.customer_code = "";
-      }
-      this.pageInfo.curr = 1;
-      this.parmValue.page = 1;
-      await this.searchList();
-    },
-  },
-};
-</script>
-   <style lang="scss" scoped>
-.bargainList {
-}
-</style>
-   

+ 0 - 284
src/views/sellOut/bargainList/components/returnExpress.vue

@@ -1,284 +0,0 @@
-<template>
-  <el-form
-    ref="ruleForm"
-    :loading="loading"
-    :model="ruleForm"
-    status-icon
-    :rules="rulesThis"
-    label-width="100px"
-    style="width: 100%"
-    class="demo-ruleForm"
-  >
-    <el-row>
-      <el-col :span="12">
-        <el-form-item label="物流承担方" prop="own">
-          <el-select
-            v-model="ruleForm.own"
-            placeholder="物流承担方"
-            :disabled="!(status == '3' && powers.some((item) => item == '045'))"
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-      <el-col :span="12">
-        <el-form-item label="物流公司" prop="company">
-          <search-express
-            :value="ruleForm.company"
-            :placeholder="'物流公司'"
-            :names="post_company"
-            :disabled="!(status == '3' && powers.some((item) => item == '045'))"
-            :is-detail="
-              !(status == '3' && powers.some((item) => item == '045'))
-            "
-            @searchChange="handleCompany"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="12">
-        <el-form-item label="物流单号" prop="post_code">
-          <el-input
-            placeholder="物流单号"
-             :disabled="
-              !(status == '3' && powers.some((item) => item == '045'))
-            "
-            v-model="ruleForm.post_code"
-          ></el-input>
-        </el-form-item>
-      </el-col>
-      <el-col :span="12" v-if="ruleForm.own === '2' || ruleForm.own === '3'">
-        <el-form-item label="物流费用" prop="post_fee">
-          <el-input
-            :disabled="!(status == '3' && powers.some((item) => item == '045'))"
-            placeholder="物流费用"
-            v-model="ruleForm.post_fee"
-          >
-            <template slot="append">元</template>
-          </el-input>
-        </el-form-item>
-      </el-col>
-      <el-col
-        :span="24"
-        style="text-align: right; padding: 0 0 20px 0"
-        v-if="status == '3' && powers.some((item) => item == '045')"
-      >
-        <el-button type="primary" :size="'mini'" @click="submitForm"
-          >保 存</el-button
-        >
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-<script>
-import asyncRequest from "@/apis/service/sellOut/bargainList";
-import resToken from "@/mixins/resToken";
-import { isAlphanumeric, isnumber } from "@/utils/validate";
-export default {
-  name: "bargainListDetail",
-  props: ["newTime", "sitem"],
-  mixins: [resToken],
-  computed: {
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "bargainListDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  data() {
-    const validateexpress = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("物流单号不能为空!"));
-      } else {
-        if (!isAlphanumeric(value)) {
-          callback(new Error("物流单号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    const validateexpressFee = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("物流费用不能为空!"));
-      } else {
-        if (isnumber(value)) {
-          callback();
-        } else if (isnumber2(value)) {
-          callback();
-        } else {
-          callback(new Error("物流费用只能为数字!"));
-        }
-      }
-    };
-    return {
-      options: [],
-      post_company:"",
-      smodel: {
-        value: "3",
-        label: "供应商承担",
-      },
-      code: "",
-      isShow: false,
-      loading: false,
-      status: "", //存储详情接口返的状态
-      showModelThis: this.showModel,
-      resign_name: "", //离职人
-      hand_name: "", //交接人
-      ruleForm: {
-        company: "", //入参快递公司
-        own: "1", //物流费用承担方
-        company: [], //物流公司
-        post_code: "", //物流单号
-        post_fee: 0, //物流费用
-      },
-      rulesThis: this.rules,
-      // 验证规则
-      rules: {
-        own: [
-          {
-            required: true,
-            trigger: "change",
-            message: "请选择物流费用承担方",
-          },
-        ],
-        company: [
-          {
-            type: "array",
-            required: true,
-            trigger: "change",
-            message: "请选择退回仓库",
-          },
-        ],
-        post_code: [
-          {
-            required: true,
-            trigger: "blur",
-            validator: validateexpress,
-          },
-        ],
-        post_fee: [
-          {
-            required: true,
-            trigger: "blur",
-            validator: validateexpressFee,
-          },
-        ],
-      },
-    };
-  },
-
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    closeAdd() {
-      this.showModelThis = false;
-    },
-    async initForm() {
-      this.loading = true;
-      let list = [
-        {
-          value: "1",
-          label: "个人承担",
-        },
-        {
-          value: "2",
-          label: "公司承担",
-        },
-      ];
-      this.options = [];
-      this.options.push(...list);
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
-    },
-
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const {
-            post_company,
-            post_code,
-            post_fee,
-            returnCode,
-            own,
-            is_th,
-            status,
-          } = this.sitem;
-          this.status = status;
-          this.code = this.returnCode;
-          this.post_company=post_company
-          this.ruleForm = {
-            returnCode: returnCode || "",
-            own: own || "1", //入参快递公司
-            company: post_company ? [post_company] : [], //物流公司
-            post_code: post_code || "", //物流单号
-            post_fee: post_fee || "0", //物流费用
-          };
-          if (is_th === "1") {
-            this.options.push(this.smodel);
-          }
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          model.company = model.company.toString();
-          const res = await asyncRequest.afterPost(model);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "提交成功!",
-              message: "",
-            });
-            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;
-        }
-      });
-    },
-    handleCompany(e) {
-      if (e && e.label) {
-        this.ruleForm.company = [e.label];
-      } else {
-        this.ruleForm.company = [];
-      }
-      this.$refs.ruleForm.validateField("company");
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 314
src/views/sellOut/bargainList/components/supplier_feedback.vue

@@ -1,314 +0,0 @@
-<template>
-  <el-form
-    ref="ruleForm"
-    :loading="loading"
-    :model="ruleForm"
-    status-icon
-    :rules="rulesThis"
-    label-width="100px"
-    style="width: 100%"
-    class="demo-ruleForm"
-  >
-    <el-row>
-      <el-row>
-        <el-col :span="12">
-          <el-form-item label="是否同意" prop="is_th">
-            <el-select
-              style="width: 100%"
-              :disabled="
-                !(status == '1' && powers.some((item) => item == '046'))
-              "
-              v-model="ruleForm.is_th"
-              placeholder="是否同意退回"
-            >
-              <el-option
-                v-for="item in is_th_options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-
-        <el-col :span="12">
-          <el-form-item label="反馈备注" prop="remark">
-            <el-input
-              type="textarea"
-              placeholder="反馈备注"
-              :disabled="
-                !(status == '1' && powers.some((item) => item == '046'))
-              "
-              v-model="ruleForm.remark"
-              maxlength="250"
-              show-word-limit
-            />
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row v-if="ruleForm.is_th === '1'">
-        <el-col :span="12">
-          <el-form-item label="收件人" prop="contactor">
-            <el-input
-              :disabled="
-                !(status == '1' && powers.some((item) => item == '046'))
-              "
-              v-model="ruleForm.contactor"
-              placeholder="收件人"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="收件人电话" prop="mobile">
-            <el-input
-              :disabled="
-                !(status == '1' && powers.some((item) => item == '046'))
-              "
-              v-model="ruleForm.mobile"
-              placeholder="收件人电话"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="地址省市区" prop="addr_code">
-            <select-area
-              :placeholder="'省市区'"
-              :disabled="
-                !(status == '1' && powers.some((item) => item == '046'))
-              "
-              :value="ruleForm.addr_code"
-              :is-detail="id !== 'add'"
-              @selectChange="selectAreaAddr_code"
-            />
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="详细地址" prop="addr">
-            <el-input
-              v-model="ruleForm.addr"
-              :disabled="
-                !(status == '1' && powers.some((item) => item == '046'))
-              "
-              placeholder="详细地址"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-col
-        :span="24"
-        style="text-align: right;padding:0 0 20px 0;"
-        v-if="status == '1' && powers.some((item) => item == '046')"
-      >
-        <el-button type="primary" :size="'mini'" @click="submitForm"
-          >保 存</el-button
-        >
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-<script>
-import { isMobile } from "@/utils/validate";
-import asyncRequest from "@/apis/service/sellOut/bargainList";
-import resToken from "@/mixins/resToken";
-export default {
-  name: "bargainListDetail",
-  props: ["id", "showModelThis", "newTime", "sitem"],
-  mixins: [resToken],
-  data() {
-    const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      loading: false,
-      status: "",
-      showModelThis: this.showModel,
-      ruleForm: {
-        is_th: "1", //是否同意退回
-        remark: "", //反馈备注
-        addr_code: [], //退货地址
-        addr: "", //退货详细地址
-        contactor: "", //收件人
-        mobile: "", //收件人电话
-        wsm_code: "-",
-      },
-      rulesThis: this.rules,
-      // 验证规则
-      rules: {
-        is_th: [
-          {
-            required: true,
-            trigger: "change",
-            message: "请选择是否同意退回",
-          },
-        ],
-        remark: [
-          {
-            required: true,
-            message: "请输入反馈备注",
-            trigger: "blur",
-          },
-        ],
-        addr_code: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择退回地址所在省/市/区",
-            trigger: "change",
-          },
-        ],
-        addr: [
-          {
-            required: true,
-            message: "请输入详细退货地址",
-            trigger: "blur",
-          },
-        ],
-        contactor: [
-          {
-            required: true,
-            message: "请输入收件人",
-            trigger: "blur",
-          },
-        ],
-        mobile: [
-          {
-            required: true,
-            trigger: "blur",
-            validator: validatemobile,
-          },
-        ],
-      },
-      is_th_options: [
-        {
-          value: "1",
-          label: "同意退回",
-        },
-        {
-          value: "0",
-          label: "拒绝退回",
-        },
-      ],
-    };
-  },
-  computed: {
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "bargainListDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  methods: {
-    closeAdd() {
-      this.showModelThis = false;
-    },
-    async initForm() {
-      this.status = "";
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
-    },
-
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const {
-            contactor,
-            is_th,
-            mobile,
-            addr_code,
-            addr,
-            returnCode,
-            gys_remark,
-            status,
-          } = this.sitem;
-          let list = [];
-          this.status = status;
-          if (
-            addr_code &&
-            addr_code.area_code &&
-            addr_code.city_code &&
-            addr_code.provice_code
-          ) {
-            list.push(addr_code.provice_code);
-            list.push(addr_code.city_code);
-            list.push(addr_code.area_code);
-          }
-
-          this.ruleForm = {
-            returnCode: returnCode || "",
-            is_th: is_th || "1", //是否同意退回
-            remark: gys_remark || "", //反馈备注
-            addr_code: list.length === 3 ? list : [], //退货地址
-            addr: addr || "", //退货详细地址
-            contactor: contactor || "", //收件人
-            mobile: mobile || "", //收件人电话
-            wsm_code: "-",
-          };
-          console.log(this.ruleForm);
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          this.loading = true;
-
-          let res = await asyncRequest.aftergys(model);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "提交成功!",
-              message: "",
-            });
-            this.$emit("refresh", false);
-          } 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;
-        }
-      });
-    },
-
-    //退货省市区
-    selectAreaAddr_code(e) {
-      this.ruleForm.addr_code = e;
-      this.$refs.ruleForm.validateField("addr_code");
-    },
-  },
-};
-</script>

+ 23 - 31
src/views/sellOut/bargainList/detail.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="bargainListDetail">
-    {{status}}
     <div
       class="bargainListDetail-main"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
@@ -64,7 +63,7 @@
                       (
                         options12.find((item) => item.id == sitem.is_addrs) ||
                         {}
-                      ).label || '--'
+                      ).name || '--'
                     "
                   ></el-tag>
                 </template>
@@ -73,9 +72,9 @@
                     :size="tablebtnSize"
                     v-text="
                       (
-                        options12.find((item) => item.id == sitem.is_custom) ||
+                        options1.find((item) => item.id == sitem.is_custom) ||
                         {}
-                      ).label || '--'
+                      ).name || '--'
                     "
                   ></el-tag>
                 </template>
@@ -84,9 +83,10 @@
                     :size="tablebtnSize"
                     v-text="
                       (
-                        options6.find((item) => item.id == sitem.supply_area) ||
-                        {}
-                      ).label || '--'
+                        options6.find(
+                          (item) => item.id === sitem.supply_area
+                        ) || {}
+                      ).name || '--'
                     "
                   ></el-tag>
                 </template>
@@ -95,7 +95,7 @@
                     :size="tablebtnSize"
                     v-text="
                       (options10.find((item) => item.id == sitem.pay_way) || {})
-                        .label || '--'
+                        .name || '--'
                     "
                   ></el-tag>
                 </template>
@@ -106,7 +106,7 @@
                       (
                         options11.find((item) => item.id == sitem.send_way) ||
                         {}
-                      ).label || '--'
+                      ).name || '--'
                     "
                   ></el-tag>
                 </template>
@@ -133,11 +133,10 @@
                 </template>
               </show-data-table>
             </el-collapse-item>
-            <!-- && powers.some((item) => item == '056') -->
             <el-collapse-item
               title="业务部门审批"
               name="2"
-              v-if="status == '1' "
+              v-if="status == '1' && powers.some((item) => item == '043')"
             >
               <exam-form
                 :statusList="[]"
@@ -150,7 +149,7 @@
             <el-collapse-item
               title="财务专员审批"
               name="3"
-              v-if="status == '0' && powers.some((item) => item == '056')"
+              v-if="status == '2' && powers.some((item) => item == '058')"
             >
               <exam-form
                 :statusList="[]"
@@ -163,7 +162,7 @@
             <el-collapse-item
               title="财务主管审批"
               name="4"
-              v-if="status == '0' && powers.some((item) => item == '056')"
+              v-if="status == '3' && powers.some((item) => item == '059')"
             >
               <exam-form
                 :statusList="[]"
@@ -187,9 +186,7 @@
 import asyncRequest from "@/apis/service/sellOut/bargainList";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
-import addForm from "./components/addEditForm";
-import editForm from "./components/editForm";
-import feedbackList from "./components/feedbackList";
+
 import {
   editColumns,
   options1,
@@ -204,15 +201,10 @@ import {
   options10,
   options11,
   options12,
-} from "./components/ShowDataTableColumns";
+} from "./columns";
 export default {
   name: "bargainListDetail",
   mixins: [resToken],
-  components: {
-    addForm,
-    editForm,
-    feedbackList,
-  },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
@@ -254,13 +246,13 @@ export default {
       status: "",
       sitem: null,
       options: [
-        { id: "1", label: "待主管审批" },
-        { id: "2", label: "待财务专员审批" },
-        { id: "3", label: "待财务主管审批" },
-        { id: "4", label: "审批通过" },
-        { id: "5", label: "主管驳回" },
-        { id: "6", label: "财务主管驳回" },
-        { id: "7", label: "已取消议价" },
+        { id: "1", label: "待主管审批", type: "" },
+        { id: "2", label: "待财务专员审批", type: "" },
+        { id: "3", label: "待财务主管审批", type: "" },
+        { id: "4", label: "审批通过", type: "" },
+        { id: "5", label: "主管驳回", type: "" },
+        { id: "6", label: "财务主管驳回", type: "" },
+        { id: "7", label: "已取消议价", type: "" },
       ],
     };
   },
@@ -318,7 +310,7 @@ export default {
     // 点击业务审核的保存按钮
 
     async examForm(e, type, title) {
-      console.log(e);
+      console.log(e, type, title);
       if (!this.loading) {
         let model = {
           bargainNo: this.queryId,
@@ -343,7 +335,7 @@ export default {
         type: "warning",
       })
         .then(async () => {
-          let res = await asyncRequest.actstatus(model);
+          let res = await asyncRequest.status(model);
           if (res && res.code === 0) {
             this.$notify.success({
               title: "提交成功!",

+ 7 - 49
src/views/sellOut/bargainList/index.vue

@@ -40,9 +40,9 @@
                 >
                   <el-option
                     v-for="item in options"
-                    :key="item.value"
+                    :key="item.id"
                     :label="item.label"
-                    :value="item.value"
+                    :value="item.id"
                   >
                   </el-option>
                 </el-select>
@@ -76,9 +76,9 @@
                     slot="prepend"
                     placeholder="请选择"
                   >
-                    <el-option label="议价编号" value="1" />
+                    <el-option label="议价编号" value="1" />
                     <el-option label="反馈商品编号" value="2" />
-                    <el-option label="咨询编号" value="3" />
+                    <el-option label="咨询编号" value="3" />
                   </el-select>
                   <el-button
                     slot="append"
@@ -173,7 +173,6 @@
    <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
-import statusList from "@/assets/js/statusList";
 import asyncRequest from "@/apis/service/sellOut/bargainList";
 import { listCol } from "./columns";
 import { mapGetters } from "vuex";
@@ -215,15 +214,7 @@ export default {
         { id: "3", label: "供应商承担" },
       ],
       sitem: null,
-      // 状态
-      statusOptions: [
-        { id: "0", label: "待审核" },
-        { id: "1", label: "待物流反馈" },
-        { id: "3", label: "待退货" },
-        { id: "4", label: "已退货" },
-        { id: "5", label: "待客户验收" },
-      ],
-      statusList: statusList,
+    
       loading: true,
       showModel: false,
       isDetail: false,
@@ -260,41 +251,8 @@ export default {
       },
       // 表格 - 列参数
       columns: listCol,
-      serviceOptions: [
-        {
-          value: "0",
-          label: "待审核",
-        },
-        {
-          value: "1",
-          label: "待物流反馈",
-        },
-        {
-          value: "2",
-          label: "待退货",
-        },
-        {
-          value: "3",
-          label: "已退货",
-        },
-      ],
-      serviceValue: "", //售后申请处理状态
-
-      expectValue: "", //期望意愿
-      resultOptions: [
-        {
-          value: "ad",
-          label: "处理中",
-        },
-        {
-          value: "选项2",
-          label: "已同意",
-        },
-        {
-          value: "选项2",
-          label: "已驳回",
-        },
-      ],
+  
+ 
       resultValue: "", //处理结果
     };
   },

+ 23 - 8
src/views/sellOut/project/columns.js

@@ -6,7 +6,17 @@ export default [
     fixed: "left",
     width: "170px",
   },
-
+  {
+    prop: "project_name",
+    label: "项目名称",
+    'min-width': "120px",
+  },
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "120px",
+  },
   {
     prop: "khNo",
     label: "客户公司编码",
@@ -17,20 +27,25 @@ export default [
     label: "客户公司名称",
     "min-width": "158px",
   },
-  {
-    prop: "platform_code",
-    label: "平台编号",
-    width: "85px",
-  },
+  // {
+  //   prop: "platform_code",
+  //   label: "平台编号",
+  //   width: "85px",
+  // },
   {
     prop: "platform_name",
     label: "平台名称",
-    "width": "123px",
+    "width": "100px",
   },
   {
     prop: "budget_total",
     label: "项目总预算",
-    "width": "160px",
+    "width": "130px",
+  },
+  {
+    prop: "company",
+    label: "业务公司",
+    'min-width': "130px",
   },
   {
     prop: "creater",

+ 11 - 14
src/views/sellOut/project/components/addForm.vue

@@ -145,8 +145,14 @@
                     ></el-tag
                   ></template>
                 </el-table-column>
-                <el-table-column prop="good_name" label="商品名称" />
-                <el-table-column prop="good_img" label="商品图片" width="70">
+                <el-table-column
+                  prop="budget_price"
+                  label="预算单价"
+                  width="110"
+                />
+                <el-table-column prop="num" label="购买数量" width="110" />
+                <el-table-column prop="cat_name" label="商品分类" />
+                <el-table-column prop="good_img" label="图片" width="50">
                   <template slot-scope="scope">
                     <div
                       v-if="scope.row.good_img"
@@ -162,21 +168,14 @@
                     </div>
                   </template>
                 </el-table-column>
-                <el-table-column prop="cat_name" label="商品分类" />
-                <el-table-column
-                  prop="budget_price"
-                  label="预算单价"
-                  width="110"
-                />
-                <el-table-column prop="num" label="购买数量" width="110" />
+                <el-table-column prop="good_name" label="商品名称" />
 
-                <el-table-column fixed="right" width="110">
+                <el-table-column fixed="right" width="110"  v-if="type === 'add'">
                   <template slot="header" slot-scope="scope">
                     <span>操作</span>
                     <el-tooltip
                       effect="dark"
                       content="添加阶梯"
-                      v-if="type === 'add'"
                       placement="top"
                     >
                       <i
@@ -189,7 +188,6 @@
                     <el-tooltip
                       effect="dark"
                       content="修改"
-                      v-if="type === 'add'"
                       placement="top"
                     >
                       <i
@@ -201,7 +199,6 @@
                     <el-tooltip
                       effect="dark"
                       content="删除"
-                      v-if="type === 'add'"
                       placement="top"
                     >
                       <i
@@ -537,7 +534,7 @@ export default {
             const { cat_info } = e;
             if (cat_info && cat_info.length > 0) {
               cat_info.forEach((b, bi) => {
-                e.cat_name += bi !== 0 ? "/" + b.name : b.name;
+                e.cat_name += bi !== 0 ? "_" + b.name : b.name;
               });
             }
           });

+ 54 - 11
src/views/sellOut/project/components/backGoodShow.vue

@@ -86,12 +86,37 @@
               searchList(index);
             "
           >
+            <template #good_img="{ scope }">
+              <div
+                v-if="scope.row.good_img"
+                style="width: 20px; height: 20px"
+                class="hover"
+                v-viewer
+              >
+                <img
+                  :src="scope.row.good_img"
+                  style="display: inline-block; width: 100%; height: 100%"
+                  alt=""
+                />
+              </div>
+            </template>
+
+            <template #source="{ scope }">
+              <el-tag
+                :size="'mini'"
+                :type="scope.row.source === '1' ? 'success' : ''"
+                >{{
+                  scope.row.source === "1" ? "线上商品" : "采反商品"
+                }}</el-tag
+              >
+            </template>
+
             <template #operation="{ scope }">
               <el-tooltip
                 effect="dark"
                 content="删除"
                 placement="top"
-                v-if="scope.row.data_source === '1' && status==='1'"
+                v-if="scope.row.data_source === '1' && status === '1'"
               >
                 <i
                   class="el-icon-delete tb-icon"
@@ -166,7 +191,7 @@ export default {
       this.loading = true;
       await this.initListData();
       this.loading = false;
-      console.log(this.allList);
+      // console.log(this.allList);
       await this.allSearchList();
     },
     async resetFormData(index) {
@@ -201,6 +226,16 @@ export default {
             loading: false,
             tableData: [],
           };
+          if (model.ladder && model.ladder.length > 0) {
+            model.ladder.forEach((a) => {
+              if (a.cat_info && a.cat_info.length > 0) {
+                a.cat_name = "";
+                a.cat_info.forEach((b, bi) => {
+                  a.cat_name += `${bi !== 0 ? "_" : ""}${b.name}`;
+                });
+              }
+            });
+          }
           this.allList.push(model);
         });
       }
@@ -240,15 +275,23 @@ export default {
       if (code === 0) {
         const { list, count } = data;
         this.allList[index].tableData = list;
-        //  this.allList[index].tableData.map((v) => {
-        //     v.class_cat = "";
-        //     if (v.can && v.can.length > 0) {
-        //       v.can.forEach((x, i) => {
-        //         v.class_cat += i === 0 ? x.name : "/" + x.name;
-        //       });
-        //     }
-        //     return v;
-        //   });
+        this.allList[index].tableData.map((v) => {
+          v.class_cat = "";
+          if (v.can && v.can.length > 0) {
+            v.can.forEach((x, i) => {
+              v.class_cat += i === 0 ? x.name : "_" + x.name;
+            });
+          }
+          v.model = "";
+          if (v.specinfo && v.specinfo.length > 0) {
+            v.specinfo.forEach((y, yi) => {
+              v.model += `${yi !== 0 ? "--" : ""}${y.spec_name}[${
+                y.spec_value_name
+              }]`;
+            });
+          }
+          return v;
+        });
         this.allList[index].pageInfo.total = Number(count);
       } else if (code >= 100 && code <= 104) {
         await this.logout();

+ 25 - 7
src/views/sellOut/project/components/columnsForm.js

@@ -1,34 +1,52 @@
 export default [
-    
+
     {
         prop: "pgNo",
         label: "要求编号",
         width: '180px'
     },
-    
+
     {
         prop: "sale_price",
         label: "销售单价",
         width: '110px'
     },
+    {
+        prop: "num",
+        label: "购买数量",
+        width: '90px'
+    },
+
     {
         prop: "good_img",
         label: "图片",
-        width: '50px'
+        _slot_: "good_img",
+        "width": "50"
     },
     {
         prop: "good_name",
         label: "商品名称",
+        "min-width": '110px'
     },
     {
         prop: "class_cat",
         label: "商品分类",
+        "min-width": '110px'
     },
     {
         prop: "model",
         label: "规格",
-        width: '170px'
+        "min-width": '110px'
     },
+ 
+    {
+        prop: "source",
+        label: "商品来源",
+        _slot_: "source",
+        "width": '90px'
+    },
+
+
     {
         prop: "expiry_day",
         label: "信息有效期",
@@ -50,8 +68,8 @@ export default [
     //     label: "商品重量",
     // },
     {
-        prop: "salesman",
-        label: "申请人",
+        prop: "creater",
+        label: "负责人",
         width: '60px'
     },
     {
@@ -61,5 +79,5 @@ export default [
         width: "70px",
         _noset_: true,
         _slot_: "operation",
-      },
+    },
 ]

+ 3 - 3
src/views/sellOut/project/components/costFormAddEdit.vue

@@ -48,7 +48,7 @@
                 :precision="0"
                 :size="'mini'"
                 :controls="false"
-                :append="''"
+                :append="''"
                 @reschange="num_change"
               />
             </el-form-item>
@@ -230,9 +230,9 @@ export default {
       this.rulesThis = this.rules;
       console.log(this.index);
       if (this.index + "" === "-1") {
-        this.title = "添加商品阶梯";
+        this.title = "添加商品要求";
       } else {
-        this.title = "修改商品阶梯";
+        this.title = "修改商品要求";
       }
       await this.resetForm();
       this.loading = false;

+ 6 - 0
src/views/sellOut/project/components/search-good-online-table-modal/columns.js

@@ -10,6 +10,12 @@ export default [
     label: "商品名称",
     "min-width": "120",
   },
+  {
+    prop: " cat_name",
+    label: "商品分类",
+    "min-width": "120",
+  },
+
   {
     prop: "stock_total",
     label: "可用库存",

+ 34 - 12
src/views/sellOut/project/components/search-good-online-table-modal/index.vue

@@ -106,9 +106,9 @@
                   <good-class
                     :value="parmValue.cat_id"
                     @handleChange="goods_class_change"
-                    :disabled="false"
+                    :disabled="sitem.good_type === '1'"
                     :size="'mini'"
-                    :isDetail="sitem.can_id !== ''"
+                    :isDetail="sitem.good_type === '1'"
                     :placeholder="'分类'"
                   />
                 </el-col>
@@ -170,7 +170,7 @@ export default {
       parmValue: {
         buy_num: "", // 商品购买数量
         price: "", // 单价
-        cat_id: "", // 分类id
+        cat_id: [], // 分类id
         companyNo: "", // 业务公司id
         platform_code: "", //平台编号id
         page: 1, // 页码
@@ -223,14 +223,21 @@ export default {
         budget_price,
         company,
         platform_name,
+        cat_info,
       } = this.sitem;
       console.log(this.sitem);
       this.company = company;
       this.platform_name = platform_name;
+      let list = [];
+      if (cat_info && cat_info.length > 0) {
+        cat_info.forEach((s) => {
+          list.push(s.id);
+        });
+      }
       this.parmValue = {
         buy_num: num, // 商品购买数量
         price: budget_price, // 单价
-        cat_id: "", // 分类id
+        cat_id: list, // 分类id
         companyNo: companyNo, // 业务公司id
         platform_code: platform_id, //平台编号id
         page: 1, // 页码
@@ -246,16 +253,25 @@ export default {
     },
     async searchList() {
       this.loading = true;
-      const res = await asyncRequest.get_good_online_list(this.parmValue);
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      const { cat_id } = model;
+      model.cat_id =
+        cat_id && cat_id.length > 0 ? cat_id[cat_id.length - 1] : "";
+      const res = await asyncRequest.get_good_online_list(model);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
-        // this.tableData.map((v) => {
-        //   // v.sale_price = this.setNum(v.sale_price);
-        //   // v.sale_fee = this.setNum(v.sale_fee);
-        //   // // v.num =
-        //   // //pa (v.sale_price);
-        //   return v;
-        // });
+        this.tableData.map((v) => {
+          v.cat_name = "";
+          if (v.cat_info && v.cat_info.length > 0) {
+            v.cat_info.forEach((x, xi) => {
+              v.cat_name += `${xi !== 0 ? "_" : ""}${x.name}`;
+            });
+            return v
+          }
+          this.setNum(v.sale_price);
+
+          return v;
+        });
         //
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
@@ -266,6 +282,12 @@ export default {
       }
       this.loading = false;
     },
+    async goods_class_change(e) {
+      this.parmValue.cat_id = e;
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
     async remoteMethod(query) {
       this.selectLoading = true;
       if (query !== "") {

+ 30 - 0
src/views/sellOut/project/detail.vue

@@ -18,6 +18,22 @@
         <el-tab-pane label="项目详情" name="1" v-if="queryType !== 'add'">
           <el-collapse v-model="projectNames" style="margin: -18px 0 0 0">
             <el-collapse-item title="项目详情" name="0">
+              <div>
+                <el-button
+                  @click="copyToClip('good-share')"
+                  type="danger"
+                  :size="'mini'"
+                  icon="el-icon-position"
+                  circle
+                ></el-button>
+                <el-button
+                  @click="copyToClip('purchaseIn/workbenchDetail')"
+                  type="danger"
+                  :size="'mini'"
+                  icon="el-icon-position"
+                  circle
+                ></el-button>
+              </div>
               <add-form
                 v-if="newTime !== ''"
                 :newTime="newTime"
@@ -78,6 +94,7 @@ import addForm from "./components/addForm";
 import grossForm from "./components/grossForm";
 import backGoodShow from "./components/backGoodShow";
 import setPlan from "./components/setPlan";
+import urlConfig from "@/apis/url-config";
 // import financeExamOneForm from "./components/finance-exam-one-form";
 // import financeExamTwoForm from "./components/finance-exam-two-form";
 // import financeExamThreeForm from "./components/finance-exam-three-form";
@@ -111,6 +128,7 @@ export default {
   data() {
     return {
       statusList: [],
+
       size: "small",
       projectTabs: "4",
       projectNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
@@ -181,6 +199,18 @@ export default {
     handleClick(row) {
       console.log(row);
     },
+    copyToClip(title) {
+      const { host } = window.location;
+      //
+      let url = `${host}/#/${title}?id=${this.queryId}`;
+      let aux = document.createElement("input");
+      aux.setAttribute("value", url);
+      document.body.appendChild(aux);
+      aux.select();
+      document.execCommand("copy");
+      document.body.removeChild(aux);
+      this.$message.warning("分享链接已成功复制至粘贴板!");
+    },
     async refresh(e) {
       const { projectNo } = e;
       let model = {

+ 6 - 6
src/views/sellOut/project/index.vue

@@ -208,13 +208,13 @@ export default {
       sitem: null,
       // 状态
       statusOptions: [
-        { id: "0", label: "禁用" },
-        { id: "1", label: "启用" },
-      ],
-      statusList: [
-        { id: "0", label: "禁用" },
-        { id: "1", label: "启用" },
+        { id: "1", label: "待商品反馈" },
+        { id: "2", label: "待客户选择商品" },
+        { id: "3", label: "待项目方案制定" },
+        { id: "4", label: "待方案选择" },
+        { id: "5", label: "项目结束" },
       ],
+
       loading: true,
       showModel: false,
       isDetail: false,

+ 0 - 45
src/views/sellOut/zixunOrder/components/ShowDataTableColumns.js

@@ -1,48 +1,4 @@
-const addColumns = [
-  {
-    prop: "total_weight",
-    label: "总重量(g)",
-    span: 6
-  },
-  {
-    prop: "unit_name",
-    label: "单位",
-    span: 6
-  },
 
-  {
-    prop: "brand_name",
-    label: "品牌",
-    span: 12
-  },
-
-  {
-    prop: "cost_desc",
-    label: "工艺说明",
-    span: 12
-  },
-  {
-    prop: "use_desc",
-    label: "产品用途",
-    span: 12
-  },
-  {
-    prop: "remark",
-    label: "商品备注",
-    span: 12
-  },
-  {
-    prop: "cost_desc",
-    label: "工艺说明",
-    span: 12
-  },
-  {
-    prop: "noble_type",
-    label: "贵金属信息",
-    _slot_: "noble_type",
-    span: 24
-  },
-]
 
 const editColumns = [
   {
@@ -77,7 +33,6 @@ const editColumns = [
 
 
 export {
-  addColumns,
   editColumns
 }
 

+ 1 - 2
src/views/sellOut/zixunOrder/components/addEditBargain.vue

@@ -99,7 +99,7 @@
   </el-dialog>
 </template>
 <script>
-import asyncRequest from "@/apis/service/sellOut/zixunOrder";
+import asyncRequest from "@/apis/service/sellOut/bargainList";
 import resToken from "@/mixins/resToken";
 export default {
   name: "Account",
@@ -149,7 +149,6 @@ export default {
         this.initForm();
       }
     },
-    
     showModelThis(val) {
       if (!val) {
         this.$emit("cancel");

+ 13 - 40
src/views/sellOut/zixunOrder/components/addEditForm.vue

@@ -185,8 +185,11 @@
                 ></el-tag
               ></template>
             </el-table-column>
-            <el-table-column prop="good_name" label="商品名称" />
-            <el-table-column prop="good_img" label="商品图片" width="70">
+
+            <el-table-column prop="budget_price" label="预算单价" width="110" />
+            <el-table-column prop="num" label="购买数量" width="110" />
+            <el-table-column prop="cat_name" label="商品分类" />
+            <el-table-column prop="good_img" label="图片" width="50">
               <template slot-scope="scope">
                 <div
                   v-if="scope.row.good_img"
@@ -202,9 +205,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="cat_name" label="商品分类" />
-            <el-table-column prop="budget_price" label="预算单价" width="110" />
-            <el-table-column prop="num" label="购买数量" width="110" />
+            <el-table-column prop="good_name" label="商品名称" />
           </el-table>
         </el-form-item>
       </el-col>
@@ -217,38 +218,7 @@
             :size="'mini'"
             style="width: 100%"
           >
-            <el-table-column type="expand">
-              <template slot-scope="props">
-                <show-data-table
-                  :sitem="props.row"
-                  :columns="addColumns"
-                >
-                  <template slot="noble_type">
-                    <div>
-                      <span>贵金属克重:{{ props.row.specs_weight }}g</span>
-                      <span>--</span>
-                      <span>{{
-                        props.row.is_gold_price === "1"
-                          ? "启用实时金价"
-                          : "不启用实时金价"
-                      }}</span>
-                      <span>--</span>
-                      <span>当前金价:{{ props.row.gold_price }}元/g</span>
-                      <span>--</span>
-                      <span
-                        >配置要求:<span
-                          v-for="ii in props.row.config"
-                          :key="ii"
-                          >{{ ii }},</span
-                        ></span
-                      >
-                      <span>--</span>
-                      <span>其他配置要求:{{ props.row.other_config }}</span>
-                    </div>
-                  </template>
-                </show-data-table>
-              </template>
-            </el-table-column>
+      
             <el-table-column
               prop="arrival_time"
               label="到货时间"
@@ -266,7 +236,12 @@
               label="购买数量"
               show-overflow-tooltip
               width="80"
-            />
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.num }}</span
+                ><span>{{ scope.row.unit_name }}</span>
+              </template>
+            </el-table-column>
             <el-table-column
               prop="cat_id_name"
               label="商品分类"
@@ -390,7 +365,6 @@
 <script>
 import asyncRequest from "@/apis/service/sellOut/zixunOrder";
 import resToken from "@/mixins/resToken";
-import {addColumns} from "./ShowDataTableColumns";
 import addEditGoodModal from "./addEditGoodModal";
 export default {
   name: "handover",
@@ -415,7 +389,6 @@ export default {
         { value: "1", label: "竞品" },
         { value: "2", label: "竞聘" },
       ],
-      addColumns: addColumns,
       configOptions: ["证书", "包装盒", "绒布袋", "标签", "其他"],
       poptions: [],
       loading: false,

+ 24 - 2
src/views/sellOut/zixunOrder/components/addEditGoodModal.vue

@@ -639,7 +639,6 @@ export default {
     },
     //商品分类选择
     async goods_class_change(e) {
-      console.log(e);
       const { code, pid, id, label, item } = e;
       this.ruleForm.cat_id = id ? [id] : [];
       this.ruleForm.cat_id_name = label ? label : "";
@@ -685,8 +684,31 @@ export default {
             return;
           }
           let model = JSON.parse(JSON.stringify(this.ruleForm));
+          console.log(model.cat_arr_id);
+          const { cat_arr_id } = model;
           const { total_weight, specs_weight, p_cat_info } = model;
-          if (total_weight * 1000 < specs_weight * 1000) {
+          if (p_cat_info && p_cat_info.length > 0) {
+            let length = p_cat_info.length;
+            let car_name = "";
+            p_cat_info.forEach((e, ei) => {
+              car_name += `${ei !== 0 ? "_" : ""}${e.name}`;
+            });
+            let isok = true;
+            for (let i = 0; i < length; i++) {
+              if (p_cat_info[i].id !== cat_arr_id[i]) {
+                isok = false;
+              }
+            }
+            if (!isok) {
+              this.$message.warning(
+                `商品分类不符合项目商品要求,商品要求中的分类为:${car_name}!`
+              );
+              this.loading = false;
+              return;
+            }
+          }
+          console.log(p_cat_info);
+          if (total_weight * 1000 < specs_weight * 1000 && this.is_noble) {
             this.$message.warning("商品总重量不能小于贵金属重量!");
             this.loading = false;
             return;

+ 75 - 62
src/views/serviceParam/supplier/components/baseForm.vue

@@ -320,7 +320,14 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="8" v-if="!(ruleForm.supplier_img && type === 'add')">
+      <el-col
+        :span="8"
+        v-if="
+          (ruleForm.supplier_img === '' &&
+            (type === 'add' || type == 'edit')) ||
+          type == 'view'
+        "
+      >
         <el-form-item
           label="统一社会信用代码"
           prop="registercode"
@@ -328,37 +335,24 @@
         >
           <el-input
             v-model="ruleForm.registercode"
-            :disabled="
-              (ruleForm.supplier_img && (type == 'add' || type == 'edit')) ||
-              (type !== 'add' && type !== 'edit')
-            "
+            :disabled="type == 'view'"
             placeholder="统一社会信用代码"
             maxlength="18"
           />
         </el-form-item>
       </el-col>
-
-      <el-col :span="16" v-if="!(ruleForm.supplier_img && type === 'add')">
-        <el-form-item label="详细地址" prop="addr">
-          <el-input
-            v-model="ruleForm.addr"
-            :disabled="
-              (ruleForm.supplier_img && (type == 'add' || type == 'edit')) ||
-              (type !== 'add' && type !== 'edit')
-            "
-            placeholder="详细地址"
-            maxlength="200"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8" v-if="!(ruleForm.supplier_img && type === 'add')">
+      <el-col
+        :span="8"
+        v-if="
+          (ruleForm.supplier_img === '' &&
+            (type === 'add' || type == 'edit')) ||
+          type == 'view'
+        "
+      >
         <el-form-item label="公司类型" prop="nature">
           <search-company-type
             :value="ruleForm.nature"
-            :disabled="
-              (ruleForm.supplier_img && (type == 'add' || type == 'edit')) ||
-              (type !== 'add' && type !== 'edit')
-            "
+            :disabled="type == 'view'"
             :size="'small'"
             :isDetail="false"
             :placeholder="'公司类型'"
@@ -366,59 +360,78 @@
           />
         </el-form-item>
       </el-col>
-
-      <el-col :span="16" v-if="!(ruleForm.supplier_img && type === 'add')">
-        <el-form-item label="运营范围" prop="scope">
-          <el-input
-            v-model="ruleForm.scope"
-            :autosize="{ minRows: 4, maxRows: 4 }"
-            type="textarea"
-            :disabled="
-              (ruleForm.supplier_img && (type == 'add' || type == 'edit')) ||
-              (type !== 'add' && type !== 'edit')
-            "
-            placeholder="运营范围"
-            maxlength="5000"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="8" v-if="!(ruleForm.supplier_img && type === 'add')">
+      <el-col
+        :span="8"
+        v-if="
+          (ruleForm.supplier_img === '' &&
+            (type === 'add' || type == 'edit')) ||
+          type == 'view'
+        "
+      >
         <el-form-item label="法人代表" prop="legaler">
           <el-input
             v-model="ruleForm.legaler"
-            :disabled="
-              (ruleForm.supplier_img && (type == 'add' || type == 'edit')) ||
-              (type !== 'add' && type !== 'edit')
-            "
+            :disabled="type == 'view'"
             placeholder="法人代表"
             maxlength="20"
           />
         </el-form-item>
+      </el-col>
+      <el-col
+        :span="8"
+        v-if="
+          (ruleForm.supplier_img === '' &&
+            (type === 'add' || type == 'edit')) ||
+          type == 'view'
+        "
+      >
         <el-form-item label="成立日期" prop="registertime">
           <el-input
             v-model="ruleForm.registertime"
-            :disabled="
-              (ruleForm.supplier_img && (type == 'add' || type == 'edit')) ||
-              (type !== 'add' && type !== 'edit')
-            "
+            :disabled="type == 'view'"
             placeholder="成立日期"
             maxlength="50"
           />
-          <!-- <el-date-picker
-            v-model="ruleForm.registertime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            :disabled="
-              (ruleForm.supplier_img && (type == 'add' || type == 'edit')) ||
-              (type !== 'add' && type !== 'edit')
-            "
-            style="width: 100%"
-            :picker-options="pickerOptions"
-            placeholder="成立日期"
-          >
-          </el-date-picker> -->
         </el-form-item>
       </el-col>
+      <el-col
+        :span="24"
+        v-if="
+          (ruleForm.supplier_img === '' &&
+            (type === 'add' || type == 'edit')) ||
+          type == 'view'
+        "
+      >
+        <el-form-item label="详细地址" prop="addr">
+          <el-input
+            v-model="ruleForm.addr"
+            :disabled="type == 'view'"
+            placeholder="详细地址"
+            maxlength="200"
+          />
+        </el-form-item>
+      </el-col>
+
+      <el-col
+        :span="24"
+        v-if="
+          (ruleForm.supplier_img === '' &&
+            (type === 'add' || type == 'edit')) ||
+          type == 'view'
+        "
+      >
+        <el-form-item label="运营范围" prop="scope">
+          <el-input
+            v-model="ruleForm.scope"
+            :autosize="{ minRows: 6, maxRows: 6 }"
+            type="textarea"
+            :disabled="type == 'view'"
+            placeholder="运营范围"
+            maxlength="5000"
+          />
+        </el-form-item>
+      </el-col>
+
       <el-col
         :span="24"
         style="text-align: right"