snow 2 rokov pred
rodič
commit
3c11a99419

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/0.js


+ 35 - 0
dist/static/js/1.js

@@ -1,5 +1,29 @@
 (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{
 
+/***/ "./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js":
+/*!*****************************************************************************!*\
+  !*** ./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js ***!
+  \*****************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectDestructuringEmpty; });\nfunction _objectDestructuringEmpty(obj) {\n  if (obj == null) throw new TypeError(\"Cannot destructure \" + obj);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js?");
+
+/***/ }),
+
+/***/ "./node_modules/core-js/internals/array-fill.js":
+/*!******************************************************!*\
+  !*** ./node_modules/core-js/internals/array-fill.js ***!
+  \******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+eval("\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js/internals/to-absolute-index.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\n\n// `Array.prototype.fill` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n  var O = toObject(this);\n  var length = toLength(O.length);\n  var argumentsLength = arguments.length;\n  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n  var end = argumentsLength > 2 ? arguments[2] : undefined;\n  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n  while (endPos > index) O[index++] = value;\n  return O;\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/internals/array-fill.js?");
+
+/***/ }),
+
 /***/ "./node_modules/core-js/internals/get-iterator.js":
 /*!********************************************************!*\
   !*** ./node_modules/core-js/internals/get-iterator.js ***!
@@ -34,6 +58,17 @@ eval("\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode
 
 /***/ }),
 
+/***/ "./node_modules/core-js/modules/es.array.fill.js":
+/*!*******************************************************!*\
+  !*** ./node_modules/core-js/modules/es.array.fill.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar fill = __webpack_require__(/*! ../internals/array-fill */ \"./node_modules/core-js/internals/array-fill.js\");\nvar addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ \"./node_modules/core-js/internals/add-to-unscopables.js\");\n\n// `Array.prototype.fill` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.fill\n$({ target: 'Array', proto: true }, {\n  fill: fill\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('fill');\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/es.array.fill.js?");
+
+/***/ }),
+
 /***/ "./node_modules/core-js/modules/web.url-search-params.js":
 /*!***************************************************************!*\
   !*** ./node_modules/core-js/modules/web.url-search-params.js ***!

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/chunk-elementUI.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 2
dist/static/js/chunk-libs.js


+ 1 - 1
package.json

@@ -60,7 +60,7 @@
     "vue-splitpane": "1.0.4",
     "vuedraggable": "2.20.0",
     "vuex": "^3.1.0",
-    "xlsx": "0.14.1"
+    "xlsx": "^0.14.1"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "4.4.4",

+ 15 - 1
src/apis/report/index.js

@@ -9,7 +9,7 @@ export default {
   // 删除
   delete: (data, params) => http(api + "delete", data, "post", params),
   // 详情
-  detail: (data, params) => http(api + "getOrderInfo", data, "post", params),
+  detail: (data, params) => http(api + "filingDetail", data, "post", params),
   // 批量供应商确认
   status: (data, params) =>
     http(api + "changeOrderStatus", data, "post", params),
@@ -17,6 +17,9 @@ export default {
   addOrderIn: (data, params) => http(api + "addOrderIn", data, "post", params),
   // 异常原因列表
   resultlist: (data, params) => http(api + "resultlist", data, "post", params),
+  // 获取实时金价
+  golpricelast: (data, params) =>
+    http(api + "goldPriceLastList", data, "post", params),
   // 入库单验货
   orderincheck: (data, params) =>
     http(api + "orderincheck", data, "post", params),
@@ -37,4 +40,15 @@ export default {
   //导出
   exportCgdList: (data, params) =>
     http(api + "exportCgdList", data, "post", params),
+  // ...获取分类详情
+  catinfo: (data, params) => http(api + "catInfo", data, "post", params),
+
+  addrall:(data) => http("/admin/addrall", data, "post"),
+  //转单
+  transfer:(data) => http(api + "filingTransfer", data, "post"),
+  //取消转单
+  cancel:(data) => http(api + "filingCancel", data, "post"),
+  //发货列表
+  saleOutList:(data) => http(api + "saleOutList", data, "post")
+
 };

+ 3 - 0
src/apis/workbench/index.js

@@ -21,4 +21,7 @@ export default {
   // 反馈商品编辑
   good_update: (data, params) =>
     http(api + "consultFeadEdit", data, "post", params),
+      // ...获取分类详情
+  catinfo: (data, params) => http(api + "catInfo", data, "post", params),
+
 };

+ 4 - 0
src/assets/js/statusList.js

@@ -6,11 +6,13 @@ const cg_order_type_options = [
   { id: "1", label: "备库单" },
   { id: "2", label: "系统商品" },
   { id: "3", label: "招标反馈" },
+  { id: '4', label: '报备商品'}
 ]
 const xs_order_type_options = [
   { id: "1", label: "库存品" },
   { id: "2", label: "系统商品" },
   { id: "3", label: "招标反馈" },
+  { id: '4', label: '报备商品'}
 ]
 const cg_order_source_options = [
   { id: "0", label: "备库单" },
@@ -20,6 +22,7 @@ const cg_order_source_options = [
   { id: "4", label: "平台导入" },
   { id: "5", label: "有赞平台" },
   { id: "6", label: "售后补换货" },
+  { id: "7", label: "报备转单" },
 ]
 const xs_order_source_options = [
   // { id: "0", label: "备库单" },
@@ -29,5 +32,6 @@ const xs_order_source_options = [
   { id: "4", label: "平台导入" },
   { id: "5", label: "有赞平台" },
   { id: "6", label: "售后补换货" },
+  { id: "7", label: "报备转单" }
 ]
 export { statusList, cg_order_type_options, xs_order_type_options, cg_order_source_options, xs_order_source_options };

+ 29 - 0
src/router/data.js

@@ -149,5 +149,34 @@ const config = [
       },
     ],
   },
+  {
+    is_display: "1",
+    menu_img: "el-icon-s-order",
+    menu_name: "报备单管理",
+    menu_route: "report",
+    status: "1",
+    child: [
+      {
+        is_display: "1",
+        is_private: "0",
+        menu_img: "el-icon-s-order",
+        menu_name: "报备单管理",
+        menu_route: "index",
+        menu_url: "report/index",
+        status: "1",
+        alwaysShow: false,
+      },
+      {
+        is_display: "0",
+        is_private: "0",
+        menu_img: "el-icon-s-order",
+        menu_name: "报备单详情",
+        menu_route: "detail",
+        menu_url: "report/detail",
+        status: "1",
+        alwaysShow: false,
+      },
+    ],
+  },
 ];
 export default config;

+ 1 - 1
src/styles/index.scss

@@ -856,4 +856,4 @@ aside {
   // // font-weight: 400;
   // padding: 7px 15px;
   // border-radius: 4px;
-}
+}

+ 65 - 37
src/utils/validate.js

@@ -6,6 +6,25 @@
  * @param {string} path
  * @returns {Boolean}
  */
+function accMulIn(arg1, arg2) {
+  let m = 0,
+    s1 = arg1.toString(),
+    s2 = arg2.toString();
+
+  try {
+    m += s1.split(".")[1].length;
+  } catch (e) {}
+
+  try {
+    m += s2.split(".")[1].length;
+  } catch (e) {}
+
+  return (
+    (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
+    Math.pow(10, m)
+  );
+}
+
 export function isExternal(path) {
   return /^(https?:|mailto:|tel:)/.test(path);
 }
@@ -356,43 +375,6 @@ export function isCreditCode(s) {
   return reg.test(s);
 }
 
-export function add_sum(arg1, arg2) {
-  var r1, r2, m;
-  try {
-    r1 = arg1.toString().split(".")[1].length;
-  } catch (e) {
-    r1 = 0;
-  }
-
-  try {
-    r2 = arg2.toString().split(".")[1].length;
-  } catch (e) {
-    r2 = 0;
-  }
-
-  m = Math.pow(10, Math.max(r1, r2));
-
-  return (accMul(arg1, m) + accMul(arg2, m)) / m;
-}
-export function accMul(arg1, arg2) {
-  var m = 0,
-    s1 = arg1.toString(),
-    s2 = arg2.toString();
-
-  try {
-    m += s1.split(".")[1].length;
-  } catch (e) {}
-
-  try {
-    m += s2.split(".")[1].length;
-  } catch (e) {}
-
-  return (
-    (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
-    Math.pow(10, m)
-  );
-}
-
 export function isSpecialSymbol(s) {
   // console.log(s);
   const str = (s ?? "").replace(
@@ -471,3 +453,49 @@ export function hasSpace(s) {
   const str2 = s.replace(/[\r\n]/g, "");
   return !(str2 === s);
 }
+
+
+//乘法精算
+export function accMul(arg1, arg2) {
+  return accMulIn(arg1, arg2)
+}
+
+ //除法精度问题
+ export function accDiv(arg1, arg2) {
+  let t1 = 0,
+    t2 = 0,
+    c1,
+    c2;
+  try {
+    t1 = arg1.toString().split(".")[1].length;
+  } catch (e) {}
+  try {
+    t2 = arg2.toString().split(".")[1].length;
+  } catch (e) {}
+  // with (Math) {
+  c1 = Number(arg1.toString().replace(".", ""));
+  c2 = Number(arg2.toString().replace(".", ""));
+  return (c1 / c2) * Math.pow(10, t2 - t1);
+  // }
+};
+
+
+//加法精算
+export function add_sum(arg1, arg2) {
+  let r1, r2, m;
+  try {
+    r1 = arg1.toString().split(".")[1].length;
+  } catch (e) {
+    r1 = 0;
+  }
+
+  try {
+    r2 = arg2.toString().split(".")[1].length;
+  } catch (e) {
+    r2 = 0;
+  }
+
+  m = Math.pow(10, Math.max(r1, r2));
+
+  return (accMulIn(arg1, m) + accMulIn(arg2, m)) / m;
+}

+ 909 - 37
src/views/report/config/columns.js

@@ -5,53 +5,48 @@ const columns = [
     _noset_: true
   },
   {
-    prop: "cgdNo",
+    prop: "filingCode",
     label: "报备单编号",
     width: "155px",
   },
   {
-    prop: "spuCode",
+    prop: "catinfo",
     label: "商品分类",
     width: "158px",
   },
   {
     prop: "good_name",
     label: "商品名称",
-    _slot_: "good_name",
     'min-width': "145px",
   },
+
+  // {
+  //   prop: "good_price",
+  //   label: "销售数量",
+  //   width: "110px",
+  // },
   {
-    prop: "good_price",
-    label: "销售数量",
-    width: "110px",
-  },
-  {
-    prop: "good_num",
-    label: "商品主图",
-    width: "110px",
-  },
-  {
-    prop: "total_fee",
+    prop: "cgd_charge",
     label: "采购价",
     width: "110px",
   },
   {
-    prop: "status",
+    prop: "price",
     label: "销售价",
     width: "120px",
   },
   {
-    prop: "order_id",
-    label: "服务费",
+    prop: "expect_service",
+    label: "期望服务费",
     width: "110px"
   },
   {
-    prop: "lasttime",
+    prop: "companyName",
     label: "企业客户名称",
     width: "145px",
   },
   {
-    prop: "addtime",
+    prop: "companyCode",
     label: "企业客户编号",
     width: "145px",
   },
@@ -59,23 +54,329 @@ const columns = [
     prop: "addtime",
     label: "状态",
     width: "145px",
+    _slot_: "status",
   },
   {
     prop: "",
     label: "操作",
     fixed: "right",
     _noset_: true,
-    width: "50px",
+    width: "80px",
     _slot_: "operation",
   },
 ]
+
+export const is_determine_price_options = [
+  { id: "0", label: "否" },
+  { id: "1", label: "是" },
+];
+
+export const options13 = [
+  { id: "0", name: "现结" },
+  { id: "1", name: "月清" },
+  { id: "2", name: "双月清" },
+];
+
 const statusOptions = [
-  { value: "0", label: "待确认" },
-  { value: "1", label: "待入库" },
-  { value: "2", label: "部分入库" },
-  { value: "3", label: "入库完成" },
-  { value: "4", label: "已取消订单" },
+  { value: "0", label: "待审核" },
+  { value: "1", label: "审核失败" },
+  { value: "2", label: "审核中可转单" },
+  { value: "3", label: "转单成功" },
+  { value: "4", label: "转单失败" },
+  { value: "5", label: "取消转单" }
+];
+
+
+export const editColumns = [
+  {
+    prop: "filingCode",
+    label: "报备单编号",
+    span: 6,
+  },
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    span: 6,
+  },
+  {
+    prop: "apply_name",
+    label: "申请人",
+    span: 6,
+  },
+  {
+    prop: "addtime",
+    label: "申请时间",
+    span: 6,
+  },
+  {
+    prop: "supplierName",
+    label: "供应商名称",
+    _slot_: "supplierName",
+    span: 12,
+  },
+  {
+    prop: "customerName",
+    label: "业务公司名称",
+    _slot_: "customerName",
+    span: 12,
+  },
+  {
+    prop: "companyName",
+    label: "客户名称",
+    _slot_: "companyName",
+    span: 12,
+  },
+  {
+    prop: "num",
+    label: "销售数量",
+    span: 6,
+  },
+
+  {
+    prop: "is_determine_price",
+    label: "是否确认售价",
+    _slot_: "is_determine_price",
+    span: 6,
+  },
+ 
+
+  {
+    prop: "cgd_charge",
+    label: "采购单价",
+    span: 6,
+  },
+  {
+    prop: "price",
+    label: "销售单价",
+    span: 6,
+  },
+  {
+    prop: "expect_service",
+    label: "期望服务费",
+    span: 6,
+  },
+  {
+    prop: "expect_service_proportion",
+    label: "期望服务费比例",
+    span: 6,
+  },
+
+  {
+    prop: "orderCode",
+    label: "订单编号",
+    span: 6,
+  },
+  {
+    prop: "plat_code",
+    label: "平台商品编号",
+    span: 6,
+  },
+  {
+    prop: "service_charge",
+    label: "最终服务费",
+    span: 6,
+  },
+  {
+    prop: "service_proportion",
+    label: "最终服务费比例",
+    span: 6,
+  },
+  {
+    prop:'platform_name',
+    label:'所属平台',
+    span: 24
+  }
+];
+//采返 采购商品字段
+export const coveColumns = [
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    span: 24,
+  },
+
+  {
+    prop: "cat",
+    label: "分类",
+    span: 8,
+  },
+
+  {
+    prop: "brand_name",
+    label: "品牌",
+    span: 8,
+  },
+  {
+    prop: "send_way",
+    label: "发货方式",
+    _slot_: "send_way",
+    span: 8,
+  },
+  {
+    prop: "unit_name",
+    label: "单位",
+    span: 6,
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    append: '%',
+    span: 6,
+  },
+  {
+    prop: "pay_way",
+    label: "付款方式",
+    _slot_: "pay_way",
+    span: 6,
+  },
+
+
+  {
+    prop: "weight",
+    label: "商品总克重",
+    append: 'g',
+    span: 6,
+  },
+
+
+  // {
+  //   prop: "addtime",
+  //   label: "反馈时间",
+  //   span: 6,
+  // },
+
+  {
+    prop: "preservation_day",
+    label: "有效期",
+    append: '天',
+    span: 6
+  },
+
+  {
+    prop: "delivery_day",
+    label: "物流时间",
+    append: '天',
+    span: 6
+  },
+  {
+    prop: "make_day",
+    label: "生产工期",
+    append: '天',
+    span: 6
+  },
+
+
+
+  {
+    prop: "supply_area",
+    label: "供货区域",
+    _slot_: "supply_area",
+    span: 6,
+  },
+
+
+  {
+    prop: "good_img",
+    label: "商品图片",
+    _slot_: "good_img",
+    span: 24,
+
+  },
+  // {
+  //   prop: "noble",
+  //   _slot_: "noble",
+  //   label: "贵金属信息",
+  //   span: 24,
+  // },
+  {
+    prop: "cost_desc",
+    label: "工艺说明",
+    span: 24,
+  },
+  {
+    prop: "remark",
+    label: "采返备注",
+    span: 24,
+  },
+]
+
+export const costArr = [
+  {
+    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: "total_fee",
+    label: "采购成本合计",
+    append: "元",
+    span: 24,
+  },
+];
+
+export const bargainingArr = [
+  {
+    prop: "before_rate",
+    label: "议价前毛利率",
+    append: "%",
+    span: 12,
+  },
+
+  {
+    prop: "after_rate",
+    label: "议价后毛利率",
+    append: "%",
+    span: 12,
+  },
 ];
+
+
 const showColumns= [
   {
     prop: "cgdNo",
@@ -149,18 +450,6 @@ const showColumns= [
     label: "创建时间",
     span: 8
   },
-  // {
-  //   prop: "gold_price",
-  //   label: "当前实时金价",
-  //   _slot_: "gold_price",
-  //   span: 12
-  // },
-  // {
-  //   prop: "customer",
-  //   label: "订单客户名称",
-  //   _slot_: "customer",
-  //   span: 12
-  // },
   {
     prop: "addr_info",
     label: "收货信息",
@@ -169,5 +458,588 @@ const showColumns= [
   },
 ]
 
+import { isSpecialSymbol, hasSpace } from "@/utils/validate";
+
+//是否定制
+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 statusList= [
+  {
+    code: "0",
+    name: "新建待审核",
+    type: "",
+  },
+  {
+    code: "1",
+    name: "审核通过",
+    type: "success",
+  },
+  {
+    code: "2",
+    name: "基础修改待审核",
+    type: "",
+  },
+  {
+    code: "3",
+    name: "成本修改待审核",
+    type: "",
+  },
+  {
+    code: "4",
+    name: "基础修改驳回",
+    type: "danger",
+  },
+  {
+    code: "5",
+    name: "成本修改驳回",
+    type: "danger",
+  },
+  {
+    code: "6",
+    name: "新建审核驳回",
+    type: "danger",
+  },
+  {
+    code: "7",
+    name: "复制商品待编辑",
+    type: "info",
+  },
+  {
+    code: "8",
+    name: "竞价商品待编辑",
+    type: "info",
+  },
+];
+const listCol = [
+  { type: "selection", fixed: "left", _noset_: true },
+  {
+    prop: "spuCode",
+    label: "编号",
+    width: "160px",
+  },
+  {
+    prop: "good_thumb_img",
+    label: "图片",
+    _slot_: "good_thumb_img",
+    width: "45px",
+  },
+  {
+    prop: "good_name",
+    label: "名称",
+    "min-width": "160px",
+  },
+  {
+    prop: "cat_name",
+    label: "分类",
+  },
+  {
+    prop: "brand_name",
+    label: "品牌",
+  },
+  {
+    prop: "isonline",
+    label: "是否上线",
+    _slot_: "isonline",
+    width: "70px",
+  },
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "118px",
+  },
+  {
+    prop: "supplierNo",
+    label: "供应商编号",
+    width: "110px",
+  },
+  {
+    prop: "supplier_name",
+    label: "供应商名称",
+    width: "110px",
+  },
+  {
+    prop: "companyNo",
+    label: "业务公司编号",
+    width: "110px",
+  },
+  {
+    prop: "company",
+    label: "业务公司名称",
+    width: "110px",
+  },
+  // {
+  //   prop: "company_name",
+  //   label: "创建人部门",
+  //   minWidth: "150px",
+  // },
+  {
+    prop: "creater",
+    label: "创建人",
+    width: "70px",
+  },
+
+  {
+    prop: "addtime",
+    label: "创建时间",
+    width: "140px",
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "200px",
+    _slot_: "operation",
+  },
+];
+const validate_num = (rule, value, callback) => {
+  const { required } = rule;
+  if (required && value === "") {
+    callback(new Error("不能为空!"));
+  } else {
+    callback();
+  }
+};
+const validate_num_0 = (rule, value, callback) => {
+  const { required } = rule;
+  if (required && value === "") {
+    callback(new Error("不能为空!"));
+  } else if (
+    required &&
+    (value === "0" ||
+      value === "0." ||
+      value === "0.0" ||
+      value === "0.00" ||
+      value === "0.000")
+  ) {
+    callback(new Error("不能为零!"));
+  } else {
+    callback();
+  }
+};
+const validate_good_img = (rule, value, callback) => {
+  const { required } = rule;
+  if (required && value.length == 0) {
+    callback(new Error("请上传商品主图!"));
+  } else if (required && (value.length < 3 || value.length > 10)) {
+    callback(new Error("商品主图应为3~10张!"));
+  } else {
+    callback();
+  }
+};
+const validate_desc = (rule, value, callback) => {
+  const { required } = rule;
+  if (required && value.length == 0) {
+    callback(new Error("不能为空!"));
+  } else if (isSpecialSymbol(value)) {
+    callback(new Error("不能使用英文特殊字符!"));
+  } else {
+    callback();
+  }
+};
+const validate_good_name = (rule, value, callback) => {
+  const { required } = rule;
+  if (required && value.length == 0) {
+    callback(new Error("不能为空!"));
+  } else if (hasSpace(value)) {
+    callback(new Error("不能出现回车/换行符!"));
+  } else if (isSpecialSymbol(value)) {
+    callback(new Error("不能使用英文特殊字符!"));
+  } else {
+    callback();
+  }
+};
+const rules = {
+  companyName: [
+    {
+      required: true,
+      message: "客户名称不能为空",
+      trigger: "blur",
+    },
+  ],
+  customerCode:  [
+    {
+      required: true,
+      message: "业务公司不能为空",
+      trigger: "blur",
+    },
+  ],
+  is_determine_price:  [
+    {
+      required: true,
+      message: "请选择是否确定售价",
+      trigger: "blur",
+    },
+  ],
+  expect_service_proportion: [
+    {
+      required: true,
+      message: "期望服务费比例不能为空",
+      trigger: "blur",
+    },
+  ],
+  expect_service: [
+    {
+      required: true,
+      message: "预期服务费不能为空",
+      trigger: "blur",
+    },
+  ],
+  num: [
+    {
+      required: true,
+      message: "销售数量不能为空",
+      trigger: "blur",
+    },
+  ],
+  cat_id: [
+    {
+      type: "array",
+      required: true,
+      message: "商品分类",
+      trigger: "change",
+    },
+  ],
+  preservation_day: [
+    {
+      required: true,
+      validator: validate_num_0,
+      trigger: "blur",
+    },
+  ],
+
+  // supplierNo: [
+  //   {
+  //     type: "array",
+  //     required: true,
+  //     message: "请选择供应商",
+  //     trigger: "change",
+  //   },
+  // ],
+  delivery_day: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+
+  pname: [
+    {
+      required: true,
+      validator: validate_good_name,
+      trigger: "blur",
+    },
+  ],
+  make_day: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+  model: [
+    {
+      required: true,
+      message: "型号不能为空",
+      trigger: "blur",
+    },
+  ],
+
+  color: [
+    {
+      required: true,
+      message: "颜色不能为空",
+      trigger: "blur",
+    },
+  ],
+  material: [
+    {
+      required: true,
+      message: "材质不能为空",
+      trigger: "blur",
+    },
+  ],
+
+  brand_id: [
+    {
+      type: "array",
+      required: true,
+      message: "商品品牌",
+      trigger: "change",
+    },
+  ],
+  unit_id: [
+    {
+      type: "array",
+      required: true,
+      message: "请输入商品单位",
+      trigger: "blur",
+    },
+  ],
+  weight: [
+    {
+      required: true,
+      validator: validate_num_0,
+      trigger: "blur",
+    },
+  ],
+  tax: [
+    {
+      required: true,
+      message: "请选择税率",
+      trigger: "change",
+    },
+  ],
+  supply_area: [
+    {
+      required: true,
+      message: "请选择供货区域",
+      trigger: "change",
+    },
+  ],
+  origin_place: [
+    {
+      type: "array",
+      required: true,
+      message: "请选择产地",
+      trigger: "change",
+    },
+  ],
+
+  delivery_place: [
+    {
+      type: "array",
+      required: true,
+      message: "请选择发货地",
+      trigger: "change",
+    },
+  ],
+  //固定成本
+  cert_fee: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+  pakge_fee: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+  cost_fee: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+
+  mark_fee: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+  demo_fee: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+
+  open_fee: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+  delivery_fee: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+  price: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+  cgd_charge: [
+    {
+      required: true,
+      validator: validate_num,
+      trigger: "blur",
+    },
+  ],
+  gold_weight: [
+    {
+      required: true,
+      validator: validate_num_0,
+      trigger: "blur",
+    },
+  ],
+  noble_metal: [
+    {
+      required: true,
+      message: "请选择贵金属种类",
+      trigger: "change",
+    },
+  ],
+  is_gold_price: [
+    {
+      required: true,
+      message: "请选择是否启用实时金价",
+      trigger: "change",
+    },
+  ],
+  is_diff: [
+    {
+      required: true,
+      message: "请选择有无工差",
+      trigger: "change",
+    },
+  ],
+  config: [
+    {
+      required: true,
+      type: "array",
+      message: "请选择配置要求",
+      trigger: "change",
+    },
+  ],
+  other_config: [
+    {
+      required: true,
+      message: "其他要求不能为空",
+      trigger: "blur",
+    },
+  ],
+  pay_way: [
+    {
+      required: true,
+      message: "请选择付款方式",
+      trigger: "change",
+    },
+  ],
+  send_way: [
+    {
+      required: true,
+      message: "请选择发货方式",
+      trigger: "change",
+    },
+  ],
+
+  cost_desc: [
+    {
+      required: false,
+      validator: validate_desc,
+      trigger: "blur",
+    },
+  ],
+  remark: [
+    {
+      required: true,
+      validator: validate_desc,
+      trigger: "blur",
+    },
+  ],
+  good_img: [
+    {
+      required: true,
+      message: "商品图片不能为空",
+      trigger: "change",
+    },
+  ],
+  good_name: [
+    {
+      required: true,
+      message: "商品名称不能为空",
+      trigger: "change",
+    },
+  ]
+};
+
+export {
+  options1,
+  options2,
+  options3,
+  options4,
+  options5,
+  options6,
+  options7,
+  options8,
+  options9,
+  options10,
+  options11,
+  listCol,
+  rules,
+  statusList
+};
+
 
 export { columns, statusOptions,showColumns }

+ 139 - 0
src/views/report/config/rules.js

@@ -92,3 +92,142 @@ export const addressRules = {
     },
   ],
 };
+
+
+export const createRules = {
+  customerCode:{
+    required:true,
+    message:'业务公司不能为空',
+    trigger:'blur'
+  },
+  companyName:{
+    required:true,
+    message:'客户名称不能为空',
+    trigger:'blur'
+  },
+  num:{
+    required:true,
+    message:'销售数量不能为空',
+    trigger:'blur'
+  },
+  is_determine_price:{
+    required:true,
+    message:'销售价不能为空',
+    trigger:'blur'
+  },
+  price:{
+    required:true,
+    message:'采购价不能为空',
+    trigger:'blur'
+  },
+  service_proportion:{
+    required:true,
+    message:'服务费比例不能为空',
+    trigger:'blur'
+  },
+  expect_service:{
+    required:true,
+    message:'期望服务费不能为空',
+    trigger:'blur'
+  },
+  brand_id:{
+    required:true,
+    message:'请选择品牌',
+    trigger:'blur'
+  },
+  preservation_day:{
+    required:true,
+    message:'有效期不能为空',
+    trigger:'blur'
+  },
+  delivery_day:{
+    required:true,
+    message:'物流时间不能为空',
+    trigger:'blur'
+  },
+  make_day:{
+    required:true,
+    message:'生产工期不能为空',
+    trigger:'blur'
+  },
+  tax:{
+    required:true,
+    message:'税点不能为空',
+    trigger:'blur'
+  },
+  unit_id:{
+    required:true,
+    message:'请选择单位',
+    trigger:'blur'
+  },
+  cat_id:{
+    required:true,
+    message:'请选择分类',
+    trigger:'blur'
+  },
+  spec_list:{
+    required:true,
+    message:'请选择规格',
+    trigger:'blur'
+  },
+  good_name:{
+    required:true,
+    message:'商品名称不能为空',
+    trigger:'blur'
+  },
+  delivery_place:{
+    required:true,
+    message:'发货地不能为空',
+    trigger:'blur'
+  },
+  origin_place:{
+    required:true,
+    message:'产地不能为空',
+    trigger:'blur'
+  },
+  weight:{
+    required:true,
+    message:'总重量不能为空',
+    trigger:'blur'
+  },
+  supply_area:{
+    required:true,
+    message:'请选择供货区域',
+    trigger:'blur'
+  },
+  pay_way:{
+    required:true,
+    message:'请选择付款方式',
+    trigger:'blur'
+  },
+  config:{
+    required:true,
+    message:'配置要求不能为空',
+    trigger:'blur'
+  },
+  other_config:{
+    required:true,
+    message:'其他配置要求不能为空',
+    trigger:'blur'
+  },
+  remark:{
+    required:true,
+    message:'采购备注不能为空',
+    trigger:'blur'
+  },
+  cost_desc:{
+    required:true,
+    message:'工艺说明不能为空',
+    trigger:'blur'
+  },
+  good_img:{
+    required:true,
+    message:'请上传商品图片',
+    trigger:'blur'
+  },
+  supplierNo:{
+    required:true,
+    message:'供应商不能为空',
+    trigger:'blur'
+  }
+}

+ 346 - 0
src/views/report/cpns/baseDetail.vue

@@ -0,0 +1,346 @@
+<template>
+  <div class="filingDetail">
+    <div class="filingDetail-main">
+          <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
+            <el-collapse-item :title="'报备单详情'" name="1">
+              <show-data-table
+                style="padding: -5px 0 10px 0"
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :sitem="sitem"
+                :columns="editColumns"
+              >
+                <template slot="status">
+                  <el-tag
+                    :size="tablebtnSize"
+                    :type="
+                      (statusOptions.find((item) => item.value == sitem.status) || {}).type ||
+                      ''
+                    "
+                    v-text="
+                      (statusOptions.find((item) => item.value == sitem.status) || {}).label ||
+                      '--'
+                    "
+                  ></el-tag>
+                </template>
+
+                <template slot="supplierName">
+                  <span>{{ sitem.supplierName }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>供应商编号:</span><span>{{ sitem.supplierNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="customerName">
+                  <span>{{ sitem.customerName }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>业务公司编号:</span><span>{{ sitem.customerNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="companyName">
+                  <span>{{ sitem.companyName }}</span>
+                  <el-popover
+                    placement="top"
+                    width="300"
+                    trigger="hover"
+                    v-if="sitem.companyCode"
+                  >
+                    <ul>
+                      <li>
+                        <span>企业客户编号:</span><span>{{ sitem.companyCode }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+
+                <template slot="is_determine_price">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        is_determine_price_options.find(
+                          (item) => item.id == sitem.is_determine_price + ''
+                        ) || {}
+                      ).label || '--'
+                    "
+                  ></el-tag>
+                </template>
+              </show-data-table>
+            </el-collapse-item>
+            <el-collapse-item title="商品信息" name="20">
+              <show-data-table
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :columns="coveColumns"
+                :sitem="sitem"
+              >
+                <template slot="good_name">
+                  <span>{{ sitem.good_name }}</span>
+                  <span v-for="(si, i) in sitem.specinfo" :key="si.spec_id + i">
+                    <span v-if="i !== 0">-</span>
+                    <span v-else>_</span>
+                    <span>{{ si.spec_name }}[{{ si.spec_value_name }}]</span>
+                  </span>
+                  <el-popover
+                    v-if="sitem.spuCode"
+                    placement="top"
+                    width="300"
+                    trigger="hover"
+                  >
+                    <ul>
+                      <li>
+                        <span>商品编号:</span><span>{{ sitem.spuCode }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+
+                <template slot="send_way">
+                  <span>{{ sitem.send_way === "1" ? "供应商包邮" : "公司自提" }}</span>
+                </template>
+
+                <template slot="good_type">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options1.find((item) => item.id == sitem.good_type) || {}).name ||
+                      '--'
+                    "
+                  />
+                  <span v-if="sitem.good_type === '1'" style="padding: 0 0 0 5px"
+                    >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span
+                  >
+                </template>
+                <template slot="supply_area">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options6.find((item) => item.id === sitem.supply_area) || {})
+                        .name || '--'
+                    "
+                  ></el-tag>
+                </template>
+
+                <template slot="pay_way">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options13.find((item) => item.id == sitem.pay_way) || {}).name ||
+                      '--'
+                    "
+                  />
+                </template>
+                <template slot="noble">
+                  <span v-if="sitem.noble_name"
+                    >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
+                      sitem.noble_name
+                    }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
+                      sitem.is_gold_price === "0" ? "不" : ""
+                    }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
+                      sitem.config
+                    }}-{{ sitem.other_config }}</span
+                  >
+                  <span v-else>--</span>
+                </template>
+                <template slot="good_img">
+                  <img
+                    v-viewer
+                    style="width: 23px; height: 23px; margin: 0 5px 0 0"
+                    class="fl"
+                    v-for="(si, sii) in sitem.good_img"
+                    :key="si + sii"
+                    :src="si"
+                    alt=""
+                  /> </template
+              ></show-data-table>
+            </el-collapse-item>
+          </el-collapse>
+    </div>
+  </div>
+</template>
+<script>
+import asyncRequest from "@/apis/report";
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
+
+
+import {
+  editColumns,
+  costArr,
+  bargainingArr,
+  options1,
+  options2,
+  options3,
+  options4,
+  options5,
+  options6,
+  options7,
+  options8,
+  options9,
+  options10,
+  options11,
+  options12,
+  options13,
+  statusOptions,
+  rate_status_options,
+  coveColumns,
+  is_determine_price_options,
+} from "../config/columns";
+
+export default {
+  name: "filingDetail",
+  mixins: [resToken],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field"]),
+  },
+
+  data() {
+    return {
+      size: "small",
+      eaxmList: [],
+      costArr,
+      bargainingArr,
+      editColumns,
+      options1,
+      options2,
+      options3,
+      options4,
+      options5,
+      options6,
+      options7,
+      options8,
+      options9,
+      options10,
+      options11,
+      options12,
+      options13,
+      statusOptions,
+      rate_status_options,
+      is_determine_price_options,
+      coveColumns,
+      projectTabs: "1",
+      activeNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "20"],
+      newTime: "",
+      loading: false,
+      queryType: "",
+      queryId: "",
+      status: "",
+      sitem: null,
+
+      orderItem: {},
+      moneyDirItem: {},
+      moneyItem: {},
+      BossItem: {},
+    };
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    async initForm() {
+      const { id, type } = this.$route.query;
+      this.queryId = id;
+      this.queryType = type;
+      this.projectTabs = "1";
+      this.loading = true;
+      await this.initData();
+      this.loading = false;
+    },
+
+    handleClick(row) {
+      console.log(row);
+    },
+    async refresh() {
+      this.routeReGoto("filing", {});
+    },
+    async initData() {
+      this.loading = true;
+      const { code, message, data } = await asyncRequest.detail({
+        id: this.queryId,
+      });
+
+      this.eaxmList = [];
+      this.loading = false;
+      if (code === 0) {
+        this.sitem = JSON.parse(JSON.stringify(data));
+        const { cat_info } = this.sitem;
+        let cat = "";
+        if (cat_info && cat_info.length > 0) {
+          cat_info.forEach((e, i) => {
+            cat += i === 0 ? e.name : "_" + e.name;
+          });
+        }
+        this.sitem.cat = cat;
+        const { status,num ,orderCode} = this.sitem;
+        this.status = status;
+
+        this.$emit('change-status',status);
+        this.$emit('change-num', num);
+        this.$emit('change-order-code', orderCode);
+        this.getNewTime();
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(message);
+      }
+    },
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.filingDetail {
+  position: relative;
+  height: 100%;
+  width: 100%;
+  box-sizing: border-box;
+  .filingDetail-main {
+    position: relative;
+    padding: 10px;
+    height: 100%;
+    width: 100%;
+  }
+  .filingDetail-title {
+    border-top: 1px solid #ebeef5;
+    span {
+      height: 50px;
+      line-height: 50px;
+      font-family: "微软雅黑", sans-serif;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 16fpx;
+      text-align: left;
+    }
+  }
+  /deep/ .ddiv {
+    border-top: 1px solid #dcdfe6;
+  }
+  /deep/ .dtitle {
+    width: 40px;
+    text-align: center;
+    height: 100%;
+    min-height: 100%;
+    ul {
+      padding: 12px 0 0 0;
+    }
+  }
+  /deep/ .dmain {
+    padding: 20px 0 0 0;
+    width: calc(100% - 40px);
+    border-left: 1px solid #dcdfe6;
+  }
+}
+</style>

+ 1527 - 0
src/views/report/cpns/baseForm.vue

@@ -0,0 +1,1527 @@
+<template>
+  <el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" :size="'mini'" v-loading="loading"
+    label-width="85px" class="demo-ruleForm">
+    <el-row>
+      <el-row>
+        <!-- <el-col :span="12">
+          <el-form-item label="供应商" prop="supplierNo">
+            <el-select disabled style="width: 100%" :value="business_companyNo" v-if="ype !== 'view'">
+              <el-option v-for="(item, index) in companyList" :key="item.supplierNo + item.id + index"
+                :label="item.supplierName" :value="item.supplierNo" :disabled="item.status !== '1'">
+              </el-option>
+            </el-select>
+
+            <el-input v-else :value="supplierName" disabled />
+          </el-form-item> -->
+        <!-- </el-col> -->
+
+        <el-col :span="12">
+          <el-form-item label="业务公司" prop="customerCode">
+            <search-work-company :disabled="type === 'view'" :value="ruleForm.customerCode" :placeholder="'业务公司'"
+              :size="'mini'" @searchChange="company_idsearchChange" />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+          <el-form-item label="是否确定售价" prop="is_determine_price" label-width="110px">
+            <el-select v-model="ruleForm.is_determine_price" style="width:100%" :disabled="type === 'view'">
+              <el-option value="1" label="是" />
+              <el-option value="0" label="否" />
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+        <el-form-item label="裸价" prop="cgd_charge" class="clear" v-if="ruleForm.is_determine_price === '0'">
+          <digital-input :values="ruleForm.cgd_charge" :placeholder="'裸价'" :min="0"
+            :disabled="type === 'view' || is_noble" :max="100000000000" :position="'right'" :precision="2"
+            :size="'mini'" :controls="false" :append="'元'" @reschange="number_change($event, 'cgd_charge')" />
+        </el-form-item>
+
+        <el-form-item label="销售价" prop="price" v-if="ruleForm.is_determine_price === '1'">
+          <digital-input :values="ruleForm.price" :placeholder="'销售价'" :min="0" :disabled="type === 'view' || is_noble"
+            :max="100000000000" :position="'right'" :precision="2" :size="'mini'" :controls="false" :append="'元'"
+            @reschange="number_change($event, 'price')" />
+        </el-form-item>
+      </el-col>
+
+      </el-row>
+
+
+      <el-row :gutter="10">
+        <el-col :span="8">
+          <el-form-item label="客户名称" prop="companyName">
+            <el-input placeholder="客户名称" maxlength="100" :disabled="type === 'view'"
+              v-model="ruleForm.companyName"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="4">
+          <el-form-item label="销售数量" prop="num">
+            <el-input placeholder="销售数量" :disabled="type === 'view'" v-model="ruleForm.num" />
+          </el-form-item>
+        </el-col>
+
+
+        <el-col :span="6">
+          <el-form-item label="期望服务费比例" prop="expect_service_proportion" label-width="125px">
+            <!-- <el-input :disabled="type === 'view'" v-model="ruleForm.expect_service_proportion" placeholder="服务费比例"
+              @input="handleProportionrChange">
+              <template #append>%</template>
+            </el-input> -->
+
+            <digital-input :values="ruleForm.expect_service_proportion" :placeholder="'销售价'" :min="0" :disabled="type === 'view' || is_noble"
+            :max="100000000000" :position="'right'" :precision="2" :size="'mini'" :controls="false" :append="'%'"
+            @reschange="handleProportionrChange" />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+          <el-form-item label="期望服务费" prop="expect_service" label-width="95px">
+            <!-- <el-input :disabled="type === 'view'" v-model="ruleForm.expect_service" placeholder="期望服务费"
+              @input="handleExpectChange" /> -->
+
+           <digital-input :values="ruleForm.expect_service" :placeholder="'销售价'" :min="0" :disabled="type === 'view' || is_noble"
+            :max="100000000000" :position="'right'" :precision="2" :size="'mini'" :controls="false" :append="'元'"
+            @reschange="handleExpectChange" />
+          </el-form-item>
+        </el-col>
+
+      </el-row>
+
+      <el-row>
+        <el-col :span="17">
+          <el-form-item label="商品名称" prop="good_name">
+            <el-input :disabled="type === 'view'" v-model="ruleForm.good_name" placeholder="商品名称" />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="7">
+          <el-form-item label="税点" prop="tax" label-width="60px">
+            <search-tax :value="ruleForm.tax" :size="'mini'" :disabled="type === 'view'" :isDetail="type !== 'add'"
+              :placeholder="'税点'" @searchChange="taxsearchChange" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+
+
+      <el-col :span="24">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="分类" prop="cat_id">
+              <search-sort :value="ruleForm.cat_id" :placeholder="'分类'" :size="'mini'" :names="cat_id_name"
+                :disabled="type === 'view'" :isDetail="true" @searchChange="cat_id_change" />
+            </el-form-item>
+            <el-form-item label="品牌" prop="brand_id">
+              <search-brand :value="ruleForm.brand_id" :size="'mini'" :disabled="type === 'view'" :isDetail="true"
+                :names="brand_name" :placeholder="'品牌'" @searchChange="brand_idsearchChange" />
+            </el-form-item>
+            <el-form-item label="产地" prop="origin_place">
+              <select-area :placeholder="'产地'" :value="ruleForm.origin_place" :size="'mini'" :disabled="type === 'view'"
+                :is-detail="id !== 'add'" @selectChange="selectAreaorigin_place" />
+            </el-form-item>
+
+            <el-form-item label="发货地" prop="delivery_place">
+              <select-area :placeholder="'发货地'" :value="ruleForm.delivery_place" :size="'mini'"
+                :disabled="type === 'view'" :is-detail="id !== 'add'" @selectChange="selectAreadelivery_place" />
+            </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%" max-height="175px">
+              <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" v-if="!scope.row.isMust" 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-row>
+      </el-col>
+      <el-col :span="24">
+        <el-row>
+          <el-col :span="24">
+            <el-row>
+              <el-col :span="6">
+                <el-form-item label="有效期" prop="preservation_day">
+                  <digital-input :values="ruleForm.preservation_day" :placeholder="'有效期'" :min="1" :max="100000000000"
+                    :position="'right'" :precision="0" :size="'mini'" :disabled="type === 'view'" :controls="false"
+                    :append="'天'" @reschange="number_change($event, 'preservation_day')" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="物流时间" prop="delivery_day">
+                  <digital-input :values="ruleForm.delivery_day" :placeholder="'物流时间'" :min="0" :max="100000000000"
+                    :position="'right'" :precision="0" :size="'mini'" :disabled="type === 'view'" :controls="false"
+                    :append="'天'" @reschange="number_change($event, 'delivery_day')" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="生产工期" prop="make_day">
+                  <digital-input :values="ruleForm.make_day" :placeholder="'生产工期'" :min="0" :max="100000000000"
+                    :disabled="type === 'view'" :position="'right'" :precision="0" :size="'mini'" :controls="false"
+                    :append="'天'" @reschange="number_change($event, 'make_day')" />
+                </el-form-item>
+              </el-col>
+
+              <el-col :span="6">
+                <el-form-item label="单位" prop="unit_id" label-width="60px">
+                  <search-unit :value="ruleForm.unit_id" :size="'mini'" :isDetail="true" :names="unit_name"
+                    :disabled="type === 'view'" :placeholder="'单位'" @searchChange="unitsearchChange" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="总重量" prop="weight">
+              <digital-input :values="ruleForm.weight" :placeholder="'总重量'" :min="0" :max="100000000000"
+                :position="'right'" :precision="3" :disabled="type === 'view'" :size="'mini'" :controls="false"
+                :append="'g'" @reschange="number_change($event, 'weight')" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="供货区域" prop="supply_area">
+              <el-select v-model="ruleForm.supply_area" filterable :disabled="type === 'view'" clearable
+                style="width: 100%" placeholder="供货区域">
+                <el-option v-for="group in options6" :key="group.id" :label="group.name" :value="group.id" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="付款方式" prop="pay_way" class="clear">
+              <el-select v-model="ruleForm.pay_way" filterable :disabled="type === 'view'" clearable style="width: 100%"
+                placeholder="付款方式">
+                <el-option v-for="group in options10" :key="group.id" :label="group.name" :value="group.id" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-col>
+      <!-- <el-col :span="6">
+        <el-form-item label="发货方式" prop="send_way" class="clear">
+          <el-select
+            v-model="ruleForm.send_way"
+            filterable
+            clearable
+            :disabled="type === 'view'"
+            style="width: 100%"
+            placeholder="发货方式"
+          >
+            <el-option
+              v-for="group in options11"
+              :key="group.id"
+              :label="group.name"
+              :value="group.id"
+            />
+          </el-select>
+        </el-form-item>
+      </el-col> -->
+      <!-- <el-col :span="24">
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="证书费" prop="cert_fee">
+              <digital-input
+                :values="ruleForm.cert_fee"
+                :placeholder="'证书费'"
+                :min="0"
+                :disabled="type === 'view'"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :size="'mini'"
+                :controls="false"
+                :append="'元'"
+                @reschange="number_change($event, 'cert_fee')"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="包装费" prop="pakge_fee">
+              <digital-input
+                :values="ruleForm.pakge_fee"
+                :placeholder="'包装费'"
+                :min="0"
+                :disabled="type === 'view'"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :size="'mini'"
+                :controls="false"
+                :append="'元'"
+                @reschange="number_change($event, 'pakge_fee')"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="工艺费" prop="cost_fee">
+              <digital-input
+                :values="ruleForm.cost_fee"
+                :placeholder="'工艺费'"
+                :min="0"
+                :disabled="type === 'view'"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :size="'mini'"
+                :controls="false"
+                :append="'元'"
+                @reschange="number_change($event, 'cost_fee')"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="加标费" prop="mark_fee">
+              <digital-input
+                :values="ruleForm.mark_fee"
+                :placeholder="'加标费'"
+                :min="0"
+                :disabled="type === 'view'"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :size="'mini'"
+                :controls="false"
+                :append="'元'"
+                @reschange="number_change($event, 'mark_fee')"
+              />
+            </el-form-item> </el-col
+        ></el-row>
+      </el-col> -->
+
+      <!-- <el-col :span="24">
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="打样费" prop="demo_fee">
+              <digital-input
+                :values="ruleForm.demo_fee"
+                :placeholder="'打样费'"
+                :min="0"
+                :disabled="type === 'view'"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :size="'mini'"
+                :controls="false"
+                :append="'元'"
+                @reschange="number_change($event, 'demo_fee')"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="开模费" prop="open_fee">
+              <digital-input
+                :values="ruleForm.open_fee"
+                :placeholder="'开模费'"
+                :min="0"
+                :disabled="type === 'view'"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :size="'mini'"
+                :controls="false"
+                :append="'元'"
+                @reschange="number_change($event, 'open_fee')"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="物流费" prop="delivery_fee">
+              <digital-input
+                :values="ruleForm.delivery_fee"
+                :placeholder="'物流费'"
+                :min="0"
+                :disabled="type === 'view'"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :size="'mini'"
+                :controls="false"
+                :append="'元'"
+                @reschange="number_change($event, 'delivery_fee')"
+              />
+            </el-form-item>
+          </el-col>
+      </el-row>
+      </el-col> -->
+
+      <el-col :span="24" v-show="pid === '6'">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="金属重量" prop="gold_weight">
+              <digital-input :values="ruleForm.gold_weight" :placeholder="'金属重量'" :min="0" :disabled="type === 'view'"
+                :max="100000000000" :position="'right'" :precision="3" :size="'mini'" :controls="false" :append="'g'"
+                @reschange="number_change($event, 'gold_weight')" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="金属种类" prop="noble_metal">
+              <search-metal-kind :value="ruleForm.noble_metal" :size="'mini'" :disabled="type === 'view'"
+                :isDetail="true" :placeholder="'金属种类'" @searchChange="noble_metalsearchChange" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- <el-col :span="6">
+          <el-form-item label="启用金价" prop="is_gold_price">
+            <el-select
+              v-model="ruleForm.is_gold_price"
+              filterable
+              clearable
+              :disabled="type === 'view'"
+              style="width: 100%"
+              placeholder="启用金价"
+              @change="is_gold_price_change"
+            >
+              <el-option
+                v-for="group in options5"
+                :key="group.id"
+                :label="group.name"
+                :value="group.id"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col> -->
+        <!-- 
+        <el-col :span="6">
+          <el-form-item label="有无工差" prop="is_diff">
+            <el-select
+              v-model="ruleForm.is_diff"
+              filterable
+              clearable
+              :disabled="type === 'view'"
+              style="width: 100%"
+              placeholder="有无工差"
+            >
+              <el-option
+                v-for="group in options8"
+                :key="group.id"
+                :label="group.name"
+                :value="group.id"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col> -->
+        <el-col :span="24">
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="配置要求" prop="config">
+                <el-select v-model="ruleForm.config" multiple :disabled="type === 'view'" style="width: 100%"
+                  placeholder="配置要求">
+                  <el-option v-for="(item, index) in options9" :key="item + index" :label="item" :value="item">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="其他配置要求" prop="other_config" label-width="120px">
+                <el-input placeholder="其他要求" maxlength="100" :disabled="type === 'view'"
+                  v-model="ruleForm.other_config">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-col>
+
+      <el-col :span="24">
+        <el-form-item label="采购备注" prop="remark">
+          <el-input placeholder="采购备注" maxlength="500" :disabled="type === 'view'" v-model="ruleForm.remark">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="工艺说明" prop="cost_desc">
+          <el-input placeholder="工艺说明" maxlength="500" :disabled="type === 'view'" v-model="ruleForm.cost_desc">
+          </el-input>
+        </el-form-item>
+      </el-col>
+      <!-- <el-col :span="24">
+        <el-form-item
+          label="商品图片(<1mb)"
+          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"
+              :accept="'.jpg,.png,.jpeg'"
+              :multiple="true"
+              :disabled="type === 'view'"
+              :uploadcondition="beforeAvatarUpload"
+              @UploadErrorEvent="UploadErrorEventgood_img"
+              @UploadSuccessEvent="UploadSuccessEventgood_img"
+            ></file-upload>
+          </div>
+        </el-form-item>
+      </el-col> -->
+
+      <el-col :span="24">
+        <el-form-item label="商品图片(<1mb)" prop="good_img" v-if="ruleForm.good_img" class="activity-upload">
+          <div class="btnupload" style="position: relative; margin-left: 10px"
+            v-for="(item, index) in ruleForm.good_img" :key="index">
+            <img :src="ruleForm.good_img[index]" class="avatar" />
+            <i v-if="type == 'add' || type === 'editBase' || type === 'edit'" class="el-icon-close"
+              @click="closeImg(index, 'good_img')"></i>
+          </div>
+          <div v-if="type == 'view' ? false : true">
+            <i class="el-icon-plus avatar-uploader-icon" style="position: relative; width: 50px; height: 50px">
+              <file-upload class="Upload" :accept="'.jpg,.png,.jpeg'" :multiple="true" :disabled="type === 'view'"
+                :uploadcondition="beforeAvatarUpload" @UploadErrorEvent="UploadErrorEventgood_img"
+                @UploadSuccessEvent="UploadSuccessEventgood_img"></file-upload>
+            </i>
+          </div>
+        </el-form-item>
+        <!-- <i class="el-icon-plus avatar-uploader-icon">
+          
+        </i>
+            <file-upload
+              class="Upload"
+              :accept="'.jpg,.png,.jpeg'"
+              :multiple="true"
+              :disabled="false"
+              :uploadcondition="beforeAvatarUpload"
+              @UploadErrorEvent="UploadErrorEventgood_img"
+              @UploadSuccessEvent="UploadSuccessEventgood_img"
+            ></file-upload> -->
+      </el-col>
+    </el-row>
+
+    <el-form-item v-if="type !== 'view'">
+      <div style="width:100%;display:flex;justify-content:flex-end">
+        <el-button type="primary" @click="submitForm">保存</el-button>
+      </div>
+    </el-form-item>
+  </el-form>
+</template>
+<script>
+import asyncRequest from "@/apis/report";
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
+import baseFormAddEdit from "./baseFormAddEdit";
+import {
+  options1,
+  options2,
+  options3,
+  options4,
+  options5,
+  options6,
+  options7,
+  options8,
+  options9,
+  options10,
+  options11,
+  rules,
+} from "../config/columns";
+import { get_company_list } from "@/utils/auth";
+
+import { add_sum, accDiv, accMul } from "@/utils/validate"
+export default {
+  name: "goodsCostAdd",
+  mixins: [resToken],
+  props: ["showModel", "id", "type", "sitem", "askItem", "newTime", "editId"],
+  components: {
+    baseFormAddEdit,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size", "business_companyNo"]),
+    powers() {
+      const tran =
+        this.$store.getters.btnList.find((item) => item.menu_route == "goodsCostAdd") ||
+        {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+  },
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    }
+  },
+
+  data() {
+    return {
+      pid: "",
+      cat_id_name: "",
+      // supplierNo: "",
+      brand_name: "",
+      unit_name: "",
+      title: "",
+      modelIndex: "",
+      modelSitem: {},
+      spec_tableData: [],
+      companyList: [],
+      showOtherModel: false,
+      is_noble: false,
+      status: "",
+      rulesThis: this.rules,
+      activeName: "1",
+      loading: true,
+      supplierName: "",
+
+      //新实时金价
+      newGoldPrice: 0,
+
+      options1: options1,
+      options2: options2,
+      options3: options3,
+      options4: options4,
+      options5: options5,
+      options6: options6,
+      options7: options7,
+      options8: options8,
+      options9: options9,
+      options10: options10,
+      options11: options11,
+      ruleForm: {},
+      rules,
+      //乘法处理
+      r1: "",
+      r2: "",
+      //除法处理
+      r3: "",
+      r4: "",
+
+      //成本合算
+      newPrice: 0,
+    };
+  },
+  mounted() {
+    this.companyList = get_company_list() ? JSON.parse(get_company_list()) : [];
+    this.initForm();
+  },
+  methods: {
+    //图片悬浮删除
+    closeImg(index, key) {
+      this.ruleForm[key].splice(index, 1);
+      this.$refs.ruleForm.validateField(key);
+    },
+    //加法精度问题
+    accAdd(arg1, arg2) {
+      var r1, r2, m;
+      try {
+        r1 = arg1.toString().split(".")[1].length;
+      } catch (e) {
+        r1 = 0;
+      }
+      try {
+        r2 = arg2.toString().split(".")[1].length;
+      } catch (e) {
+        r2 = 0;
+      }
+      m = Math.pow(10, Math.max(r1, r2));
+      return (arg1 * m + arg2 * m) / m;
+    },
+
+    //乘法精度问题
+    accMul(arg1, arg2) {
+      var m = 0,
+        s1 = arg1.toString(),
+        s2 = arg2.toString();
+      try {
+        m += s1.split(".")[1].length;
+      } catch (e) { }
+      try {
+        m += s2.split(".")[1].length;
+      } catch (e) { }
+      let numStr =
+        (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) / Math.pow(10, m);
+      return numStr.toString();
+    },
+    //除法精度问题
+    accDiv(arg1, arg2) {
+      var t1 = 0,
+        t2 = 0,
+        c1,
+        c2;
+      try {
+        t1 = arg1.toString().split(".")[1].length;
+      } catch (e) { }
+      try {
+        t2 = arg2.toString().split(".")[1].length;
+      } catch (e) { }
+      // with (Math) {
+      c1 = Number(arg1.toString().replace(".", ""));
+      c2 = Number(arg2.toString().replace(".", ""));
+      return (c1 / c2) * Math.pow(10, t2 - t1);
+      // }
+    },
+    async initForm() {
+      this.loading = true;
+      if (this.type === "add") {
+        this.title = "新建采返商品";
+      } else if (this.type === "edit") {
+        this.title = "编辑采返商品";
+      } else {
+        this.title = "采返商品详情";
+      }
+
+      this.resetFormData();
+      await this.resetForm();
+      if (this.type === "edit" || this.type === "view") {
+        await this.initData();
+      }
+
+      //调用实时金价获取接口
+      this.golpricelast();
+      //调用成本合算计算函数
+      this.rulesThis = this.rules;
+      this.setrules();
+
+      this.loading = false;
+
+
+      this.$refs.ruleForm.clearValidate(['tax', 'cat_id', 'brand_id', 'supply_area', 'pay_way']);
+    },
+    //计算价格
+    computedCost() {
+      const { num } = this.askItem;
+      const {
+        demo_fee,
+        open_fee,
+        gold_weight,
+        cost_fee,
+        pakge_fee,
+        mark_fee,
+        cert_fee,
+        cgd_charge,
+        delivery_fee,
+      } = this.ruleForm;
+      let a = this.accDiv(demo_fee, num); // 打样费/购买数量
+      let b = this.accDiv(open_fee, num); //开模费/购买数量
+      let c = this.accMul(gold_weight, this.newGoldPrice); //金属重量* 最新金价
+      let d = this.accMul(cost_fee, gold_weight); //工艺费* 金属重量
+      let e = this.accAdd(pakge_fee, mark_fee); //包装费+加标费
+      let f = this.accAdd(cert_fee, cgd_charge); //证书费+产品裸价
+      if (this.is_noble) {
+        this.newPrice = this.accAdd(
+          this.accAdd(this.accAdd(a, b), this.accAdd(c, d)),
+          this.accAdd(this.accAdd(e, f), delivery_fee)
+        ).toFixed(2);
+      } else {
+        this.newPrice = this.accAdd(
+          this.accAdd(this.accAdd(a, b), this.accAdd(e, f)),
+          delivery_fee
+        ).toFixed(2);
+      }
+      console.log(new Date().valueOf() + this.newPrice);
+    },
+
+    number_change(e, key) {
+      this.ruleForm[key] = e + "" || "0";
+      this.$refs.ruleForm.validateField(key);
+
+      // if(key === 'price' || key === 'cgd_charge'){
+      //   const { expect_service, expect_service_proportion  } = this.ruleForm;
+
+      //   if(expect_service && expect_service_proportion){
+      //     this.handleProportionrChange()
+      //   }else if(!expect_service && expect_service_proportion){
+      //     this.handleExpectChange()
+      //   }else{
+
+      //   }
+      // }
+
+      // this.computedCost();
+    },
+    async initData() {
+      this.loading = true;
+
+      const res = await asyncRequest.detail({
+        id: this.id,
+      });
+
+      const { code, data, message } = await this.useResHandle(res);
+
+      if (code === 0) {
+        let {
+          bidNo,
+          good_name, //string	名称
+          cat_id, //array 分类
+          cat_info,
+          brand_id, //string	品牌id
+          unit, //	string	单位
+          unit_id, //单位ID
+          tax, //string	税率
+          // supplierNo, //	string	供应商
+          cost_desc, //	string	工艺说明
+          remark, //	string	采购备注
+          weight, //	string	重量
+          supply_area, //	string	供货区域 1 全国2 除偏远地区
+          origin_place, //	string	产地
+          delivery_place, // string 发货地
+          delivery_day, //	string	物流天数
+          preservation_day, //	string	信息有效期
+          good_img, //
+          price,
+          cert_fee, //	string	证书费
+          pakge_fee, //	string	打包费
+          cost_fee, //	string	工艺费
+          mark_fee, //	string	加标费
+          demo_fee, //	string	打样费
+          open_fee, //	string	开模费
+          noble_metal, //	string	金属类别
+          gold_weight, //	string	金属重量
+          is_gold_price, //	string	是否使用实时金价
+          delivery_fee, //	string	物流费
+          status, //		string	状态
+          make_day,
+          pay_way,
+          send_way,
+          is_diff,
+          config,
+          cgd_charge,
+          other_config,
+          is_determine_price,
+          specinfo,
+          expect_service_proportion,
+          expect_service,
+          customerCode,
+          companyName,
+          num,
+          supplierName,
+          brand_name,
+          cat_name,
+          unit_name
+        } = JSON.parse(JSON.stringify(data));
+
+        this.$emit('change-status', status);
+        this.$emit('change-num', num);
+
+        // origin_place = await this.getAddr(origin_place[origin_place.length - 1]);
+
+        // console.log(origin_place);
+
+        if (specinfo && specinfo.length > 0) {
+          this.spec_tableData = JSON.parse(JSON.stringify(specinfo));
+        }
+
+        this.supplierName = supplierName;
+        this.cat_id_name = "";
+        if (cat_info && cat_info.length) {
+          cat_info.forEach((e, ei) => {
+            if (ei === 0) {
+              this.pid = e.id;
+            }
+            this.cat_id_name += `${ei !== 0 ? "_" : ""}${e.name}`;
+          });
+        }
+
+        // this.supplierNo_name = supplierName || "";
+        this.is_noble = is_gold_price === "1" && this.pid === "6";
+        // this.is_noble = this.askItem.is_metal;
+
+        this.brand_name = brand_name || "";
+        this.unit_name = unit || "";
+
+        this.ruleForm = {
+          cat_id: cat_name ? [cat_name] : [],
+          // supplierNo: supplierNo ? [supplierNo] : [],
+          pname: good_name || "",
+          preservation_day: preservation_day || "1", //有效期
+          delivery_day: delivery_day || "0", //物流时间
+          make_day: make_day || "0", //生产工期
+          brand_id: brand_name ? [brand_name] : [],
+          unit_id: unit_name ? [unit_name] : [],
+          weight: weight || "0.000",
+          tax: tax ? tax + "%" : "",
+          supply_area: supply_area || "",
+          origin_place,
+          delivery_place,
+          is_determine_price,
+          expect_service_proportion,
+          expect_service,
+          cert_fee: cert_fee || "0.00",
+          pakge_fee: pakge_fee || "0.00",
+          cost_fee: cost_fee || "0.00",
+          mark_fee: mark_fee || "0.00",
+          demo_fee: demo_fee || "0.00",
+          open_fee: open_fee || "0.00",
+          delivery_fee: delivery_fee || "0.00",
+          cgd_charge: cgd_charge || "0.00",
+          pay_way: pay_way || "",
+          send_way: send_way || "1",
+          gold_weight: gold_weight || "0.000",
+          customerCode,
+          good_name,
+          companyName,
+          num,
+          price,
+
+          noble_metal: noble_metal || "",
+          is_gold_price: is_gold_price || "0",
+          is_diff: is_diff || "0",
+          config: config ? config.split(",") : [],
+          other_config: other_config || "",
+          remark: remark || "",
+          cost_desc: cost_desc || "",
+          good_img: [good_img] || [],
+        };
+
+        this.status = status;
+        if (this.is_noble) {
+          this.ruleForm.cgd_charge = "0";
+        }
+      }
+    },
+    async set_must_spec() {
+      const { cat_id } = this.ruleForm;
+      let id = cat_id.length == 1 ? cat_id[0] : "";
+      if (id) {
+        const { code, message, data } = await asyncRequest.catinfo({ id: id });
+        if (code === 0) {
+          const { spec } = data;
+          if (spec && spec.length > 0) {
+            if (this.spec_tableData && this.spec_tableData.length > 0) {
+              this.spec_tableData.forEach((c) => {
+                c.isMust = false;
+              });
+              spec.forEach((a, ai) => {
+                let findex = this.spec_tableData.findIndex((b) => b.specid === a.id);
+                if (findex !== -1) {
+                  this.spec_tableData[findex].isMust = true;
+                } else {
+                  this.spec_tableData.push({
+                    id: "",
+                    index: "1",
+                    specid: a.id,
+                    spec_name: a.spec_name,
+                    isMust: true,
+                    spec_value_name: "",
+                    spec_value_id: "",
+                  });
+                }
+              });
+            } else {
+              spec.forEach((a, ai) => {
+                let model = {
+                  id: "",
+                  index: "1",
+                  specid: a.id,
+                  spec_name: a.spec_name,
+                  isMust: true,
+                  spec_value_name: "",
+                  spec_value_id: "",
+                };
+                this.spec_tableData.push(model);
+              });
+            }
+          }
+          this.spec_tableData.map((e, ei) => {
+            e.index = ei + "";
+            return e;
+          });
+
+          this.spec_tableData.forEach((si, sii) => {
+            this.$set(this.spec_tableData, sii, si);
+          });
+
+        } else if (code >= 100 && code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(message);
+        }
+      } else {
+        this.spec_tableData.forEach((si, sii) => {
+          si.isMust = false;
+          this.$set(this.spec_tableData, sii, si);
+        });
+      }
+    },
+    company_idsearchChange(e) {
+      const { id, code, label } = e;
+      this.ruleForm.customerCode = code || '';
+      this.$refs.ruleForm.validateField('customerCode');
+    },
+    async submitForm() {
+      if (this.loading) {
+        return;
+      }
+
+      if (this.is_noble) {
+        this.ruleForm.cgd_charge = "0";
+      }
+
+      if (this.ruleForm.good_img.length > 10) {
+        this.$message.warning("上传图片不能超过10张");
+        return;
+      }
+
+      const { is_determine_price , expect_service , expect_service_proportion} = this.ruleForm;
+      const prop = is_determine_price === '1' ? 'price' : 'cgd_charge';
+      const label = is_determine_price === '1' ? '销售价' : '裸价'
+
+      if(!Number(this.ruleForm[prop])){
+        this.$message.warning(label + '不能为空');
+        return;
+      }
+
+      if(!Number(expect_service) && !Number(expect_service_proportion)){
+        this.$message.warning('期望服务费比例和期望服务费不能同时为空');
+        return
+      }
+
+      //没有期望服务费存在服务费比例 重新计算期望服务费
+      if(!Number(expect_service) && Number(expect_service_proportion)){
+        this.handleProportionrChange(expect_service_proportion);
+      }
+      
+      //没有期望服务费存在服务费比例或者两个都存在 以期望服务费计算服务费比例
+      if(!Number(expect_service_proportion) && Number(expect_service) || Number(expect_service_proportion) && Number(expect_service)){
+        this.handleExpectChange(expect_service);
+      }
+
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          if (!this.loading) {
+            this.loading = true;
+            if (this.spec_tableData.length === 0) {
+              this.$message.warning("请填写规格!");
+              this.loading = false;
+              return;
+            }
+            let model = JSON.parse(JSON.stringify(this.ruleForm));
+            
+            model.cat_id = model.cat_id[model.cat_id.length - 1];
+            model.brand_id = model.brand_id.toString();
+            // model.origin_place = model.origin_place.toString();
+            // model.delivery_place = model.delivery_place.toString();
+            model.send_way = "1"; //发货方式 默认供应商包邮
+            model.is_gold_price = "0"; //是否启用实时金价 默认否
+            model.is_diff = "0"; //有无工差 默认无工差
+            model.unit_id = model.unit_id.toString();
+            model.config = model.config.toString();
+            model.tax = parseInt(model.tax + "") + "";
+            model.spec_list = [];
+            model.supplierNo = this.business_companyNo;
+
+            let list = JSON.parse(JSON.stringify(this.spec_tableData));
+            list.forEach((a) => {
+              let am = {
+                spec_id: a.specid,
+                spec_value_id: a.spec_value_id,
+              };
+              model.spec_list.push(am);
+            });
+
+            let res = {};
+            if (this.type === "add") {
+              res = await asyncRequest.add(model);
+            } else {
+              res = await asyncRequest.good_update(model);
+            }
+
+            const { code, data, message } = await this.useResHandle(res);
+            this.loading = false;
+            if (code === 0) {
+              const title = this.type === "add" ? "新建成功!" : "修改成功!";
+              this.$notify.success({
+                title: title,
+                message: "",
+              });
+              this.showModelThis = false;
+              this.$router.push("/report/index");
+            }
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+
+    handleProportionrChange(e) {
+      this.ruleForm.expect_service_proportion = e;
+      this.$refs.ruleForm.validateField("expect_service_proportion");
+
+      const { price, cgd_charge, is_determine_price, expect_service_proportion } = this.ruleForm;
+      const prop = is_determine_price === '1' ? 'price' : 'cgd_charge';
+
+      if (!expect_service_proportion) return;
+
+      if (Number(this.ruleForm.expect_service_proportion) > 100) {
+        this.$message.warning('期望服务费比例不能大于100%');
+        this.ruleForm.expect_service = ''
+        this.ruleForm.expect_service_proportion = ''
+        return
+      }
+
+      this.ruleForm.expect_service = Number(this.ruleForm[prop]) === 0 || !this.ruleForm[prop] ? '0' : accMul(accDiv(expect_service_proportion,100), this.ruleForm[prop])
+      this.$refs.ruleForm.validate('expect_service');
+      this.$forceUpdate()
+    },
+
+    handleExpectChange(e) {
+      this.ruleForm.expect_service = e;
+      this.$refs.ruleForm.validateField("expect_service");
+
+      const { price, cgd_charge, is_determine_price, expect_service } = this.ruleForm;
+      if (!expect_service) return
+
+      const prop = is_determine_price === '1' ? 'price' : 'cgd_charge';
+      const label = is_determine_price === '1' ? '销售价' : '裸价'
+
+      if (Number(expect_service) > Number(this.ruleForm[prop])) {
+        this.$message.warning('期望服务费不能大于' + label);
+        this.ruleForm.expect_service = ''
+        this.ruleForm.expect_service_proportion = ''
+        return
+      }
+
+      this.ruleForm.expect_service_proportion = Number(this.ruleForm[prop]) === 0 || !this.ruleForm[prop] ? '0' : accMul(accDiv(expect_service, this.ruleForm[prop]),100)
+      this.$refs.ruleForm.validate('expect_service_proportion');
+      this.$forceUpdate()
+    },
+
+    async resetForm() {
+      // 重置
+      await this.$nextTick(async () => {
+        if (this.$refs.ruleForm && this.askItem) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          this.spec_tableData = [];
+
+          this.is_noble = false;
+          const { can_id_arr, is_gold_price } = this.askItem;
+          can_id_arr.forEach((e, index) => {
+            if (index == 0) {
+              this.pid = e;
+            }
+          });
+
+          if (this.pid === "6" && is_gold_price === "1") {
+            this.is_noble = true;
+          }
+
+          this.cat_id_name = this.type === "add" ? this.askItem.can_name : "";
+          this.brand_name = "";
+          this.unit_name = "";
+          let good_img = this.askItem.good_img ? this.askItem.good_img.split(",") : [];
+
+
+          this.ruleForm = {
+            companyName: "",
+            customerCode: '',
+            is_determine_price: '1',
+            expect_service_proportion: '',
+            expect_service: '',
+            num: '',
+            price: '0.00',
+            good_name: "",
+
+            infoNo: this.id || "",
+            cat_id: this.type === "add" ? [this.askItem.cat_id] : [],
+            // supplierNo: [],
+            pname: this.type === "add" ? this.askItem.good_name : "",
+            preservation_day: "1", //有效期
+            delivery_day: "0", //物流时间
+            make_day: "0", //生产工期
+            brand_id: [],
+            // this.type === "add" && this.askItem.brand_id
+            //   ? [this.askItem.brand_id]
+            //   : [],
+            unit_id: [],
+            //this.type === "add" ? [this.askItem.unit] : [],
+            weight: this.type === "add" ? this.askItem.total_weight : "0.000",
+            tax: "",
+            supply_area: "",
+            origin_place: [],
+            delivery_place: [],
+            cert_fee: "0.00",
+            pakge_fee: "0.00",
+            cost_fee: "0.00",
+            mark_fee: "0.00",
+            demo_fee: "0.00",
+            open_fee: "0.00",
+            delivery_fee: "0.00",
+            cgd_charge: "0.00",
+            pay_way: "",
+            send_way: "1",
+            gold_weight: this.type === "add" ? this.askItem.specs_weight : "0.000",
+            noble_metal: this.type === "add" ? this.askItem.noble_metal : "",
+            is_gold_price: this.type === "add" ? this.askItem.is_gold_price : "0",
+            is_diff: "0",
+            config:
+              this.type === "add"
+                ? this.askItem.config
+                  ? this.askItem.config.split(",")
+                  : []
+                : [],
+            other_config: this.type === "add" ? this.askItem.other_config : "",
+            remark: "",
+            cost_desc: this.type === "add" ? this.askItem.cost_desc : "",
+            good_img: this.type === "add" ? good_img : [],
+          };
+
+          if (this.type === "add") {
+            this.spec_tableData = JSON.parse(JSON.stringify(this.askItem.spec_list));
+          }
+
+          await this.set_must_spec();
+        }
+      });
+    },
+
+    openEdit(index, sitem) {
+      this.modelIndex = index;
+      this.modelSitem = sitem;
+      this.showOtherModel = true;
+    },
+    openDelete(index) {
+      this.spec_tableData.splice(index, 1);
+    },
+    async getAddr(_code){
+      const { data, code } = await asyncRequest.addrall({ code:_code })
+      return data.province.name + '/' + data.city.name + '/' + data.area.name
+    },
+    //规格编辑修改结果
+    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 cat_id_change(e) {
+      const { pid, id, label } = e;
+      this.pid = pid || "";
+      this.ruleForm.cat_id = id ? [id] : [];
+
+      this.$refs.ruleForm.validateField("cat_id");
+
+      const { is_gold_price } = this.ruleForm;
+      this.is_noble = this.pid === "6" && is_gold_price === "1";
+      this.setrules();
+
+      if (this.is_noble) {
+        this.ruleForm.cgd_charge = "0";
+      }
+
+      // this.computedCost();
+      await this.set_must_spec();
+    },
+    setrules() {
+      let list1 = ["gold_weight", "is_gold_price", "is_diff"];
+      for (let i = 0; i < list1.length; i++) {
+        this.rulesThis[list1[i]][0].required = this.is_noble;
+      }
+      let list2 = ["noble_metal", "config", "other_config"];
+      for (let i = 0; i < list2.length; i++) {
+        this.rulesThis[list2[i]][0].required = this.pid === "6";
+      }
+    },
+    is_gold_price_change() {
+      const { is_gold_price } = this.ruleForm;
+      this.$refs.ruleForm.validateField("is_gold_price");
+      this.is_noble = this.pid === "6" && is_gold_price === "1";
+      this.setrules();
+      if (this.is_noble) {
+        this.ruleForm.cgd_charge = "0";
+      }
+      // this.computedCost();
+    },
+    //品牌选择
+    brand_idsearchChange(e) {
+      const { id, code, label } = e;
+      if (id) {
+        this.ruleForm.brand_id = [id];
+      } else {
+        this.ruleForm.brand_id = [];
+      }
+      this.$refs.ruleForm.validateField("brand_id");
+    },
+    //税点选择
+    taxsearchChange(e) {
+      this.ruleForm.tax = e;
+      this.$refs.ruleForm.validateField("tax");
+    },
+    //单位选择
+    unitsearchChange(e) {
+      const { id, code, label } = e;
+      if (id) {
+        this.ruleForm.unit_id = [code];
+      } else {
+        this.ruleForm.unit_id = [];
+      }
+      this.$refs.ruleForm.validateField("unit_id");
+    },
+    //金属种类选择
+    //需修改,未改完
+    async noble_metalsearchChange(e) {
+      this.loading = true;
+      const { id, code, label } = e;
+      if (id) {
+        this.ruleForm.noble_metal = id;
+      } else {
+        this.ruleForm.noble_metal = "";
+      }
+      this.$refs.ruleForm.validateField("noble_metal");
+
+      //获取实时金价
+      this.golpricelast();
+
+      this.loading = false;
+    },
+    //获取实时金价
+    async golpricelast() {
+      const { noble_metal } = this.ruleForm;
+      if (noble_metal === "" && noble_metal === "0") {
+        this.newGoldPrice = 0;
+        // this.computedCost();
+        return;
+      }
+      const res = await asyncRequest.golpricelast({
+        type: noble_metal,
+      });
+      const { code, data, message } = await this.useResHandle(res, true);
+      if (code === 0) {
+        if (data.length !== 1) {
+          this.newGoldPrice = 0;
+        } else {
+          this.newGoldPrice = data[0].price;
+        }
+      } else {
+        this.newGoldPrice = 0;
+      }
+      // this.computedCost();
+    },
+
+    //仓库省市区
+    selectAreaorigin_place(e) {
+      this.ruleForm.origin_place = e;
+      this.$refs.ruleForm.validateField("origin_place");
+    },
+    //发货地省市区
+    selectAreadelivery_place(e) {
+      this.ruleForm.delivery_place = e;
+      this.$refs.ruleForm.validateField("delivery_place");
+    },
+
+    //图片上传成功
+    async UploadSuccessEventgood_img(data) {
+      await this.UploadSuccessEvent(1, data);
+    },
+
+    //图片上传成功
+    async UploadSuccessEvent(type, data) {
+      if (this.ruleForm.good_img.length > 10) {
+        this.$message.warning("上传图片最多不能超过10张");
+        return;
+      }
+      const { url } = data;
+      if (url === "noToken") {
+        await this.logout();
+      } else if (url === "noSupplierNo") {
+        this.$notify({
+          title: "当前供应商参数错误",
+          dangerouslyUseHTMLString: true,
+          message: "5秒后,请您重新登录!",
+        });
+        await setTimeout(async () => {
+          await this.logout();
+        }, 5000);
+      } else {
+        if (type === 1) {
+          this.ruleForm.good_img.push(url);
+          this.$refs.ruleForm.validateField("good_img");
+        } else if (type === 2) {
+          this.ruleForm.good_img.push(url);
+          this.$refs.ruleForm.validateField("good_img");
+        }
+        console.log(this.ruleForm.good_img.length);
+        this.$message.success("图片上传成功!");
+      }
+    },
+    //图片上传失败
+    UploadErrorEventgood_img(res) {
+      this.imgUploadError(1, res);
+    },
+
+    imgUploadError(type, res) {
+      if (res !== "break") {
+        this.$message.error("图片上传失败!");
+        this.$refs.ruleForm.validateField(
+          type === 1 ? "good_img" : type === 2 ? "good_img" : ""
+        );
+      }
+    },
+    //判断图片规格
+    beforeAvatarUpload(file) {
+      let isJPG = false;
+      if (
+        file.type === "image/jpg" ||
+        file.type === "image/png" ||
+        file.type === "image/jpeg"
+      ) {
+        isJPG = true;
+      }
+      const isLt2M = file.size / 1024 / 1024 < 1;
+      if (!isJPG) {
+        this.$message.error("图片格式不正确!");
+      }
+      if (!isLt2M) {
+        this.$message.error("图片大小不能超过 1MB!");
+      }
+      return isJPG && isLt2M;
+    },
+    resetFormData() {
+      this.status = "";
+      this.is_noble = false;
+      this.cat_id_name = "";
+      this.brand_name = "";
+      this.unit_name = "";
+      this.ruleForm = {
+        infoNo: "",
+        cat_id: [],
+        // supplierNo: [],
+        pname: "",
+        preservation_day: "1", //有效期
+        delivery_day: "0", //物流时间
+        make_day: "0", //生产工期
+        color: "",
+        model: "",
+        material: "",
+        brand_id: [],
+        unit_id: [],
+        weight: "0.000",
+        tax: "",
+        supply_area: "",
+        origin_place: [],
+        delivery_place: [],
+        cert_fee: "0.00",
+        pakge_fee: "0.00",
+        cost_fee: "0.00",
+        mark_fee: "0.00",
+        demo_fee: "0.00",
+        open_fee: "0.00",
+        delivery_fee: "0.00",
+        cgd_charge: "0.00",
+        pay_way: "",
+        send_way: "1",
+        gold_weight: "0.000",
+        noble_metal: "",
+        is_gold_price: "0",
+        is_diff: "0",
+        config: [],
+        other_config: "",
+        remark: "",
+        cost_desc: "",
+        good_img: [],
+        is_determine_price:'0'
+      };
+    },
+    addFormData() {
+      this.status = "";
+      this.is_noble = false;
+      this.cat_id_name = "";
+      this.brand_name = "";
+      this.unit_name = "";
+      this.ruleForm = {
+        infoNo: "",
+        cat_id: [],
+        // supplierNo: [],
+        pname: "",
+        preservation_day: "1", //有效期
+        delivery_day: "0", //物流时间
+        make_day: "0", //生产工期
+        color: "",
+        model: "",
+        material: "",
+        brand_id: [],
+        unit_id: [],
+        weight: "0.000",
+        tax: "",
+        supply_area: "",
+        origin_place: [],
+        delivery_place: [],
+        cert_fee: "0.00",
+        pakge_fee: "0.00",
+        cost_fee: "0.00",
+        mark_fee: "0.00",
+        demo_fee: "0.00",
+        open_fee: "0.00",
+        delivery_fee: "0.00",
+        cgd_charge: "0.00",
+        pay_way: "",
+        send_way: "1",
+        gold_weight: "0.000",
+        noble_metal: "",
+        is_gold_price: "0",
+        is_diff: "0",
+        config: [],
+        other_config: "",
+        remark: "",
+        cost_desc: "",
+        good_img: [],
+      };
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.goodsCostDetail {
+  .goodsCostAdd-title {
+    border-top: 1px solid #ebeef5;
+
+    span {
+      height: 50px;
+      line-height: 50px;
+      font-family: "微软雅黑", sans-serif;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 16px;
+      text-align: left;
+    }
+  }
+}
+
+i.el-icon-close {
+  position: absolute;
+  z-index: 2;
+  top: 0;
+  right: 0;
+  color: #63cbe7;
+  font-weight: bold;
+  cursor: pointer;
+}
+
+// /deep/ .fileUp {
+//       opacity: 10 !important;
+//     width: 228px !important;
+//     height: 200px !important;
+//     outline: none;
+//     position: static !important;
+// }
+</style>

+ 82 - 87
src/views/report/cpns/spec-modal.vue → src/views/report/cpns/baseFormAddEdit.vue

@@ -12,6 +12,7 @@
     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">
@@ -22,14 +23,21 @@
             status-icon
             :size="'small'"
             :rules="rulesThis"
-            label-width="30px"
+            label-width="80px"
             class="demo-ruleForm"
           >
+            <el-form-item label="规格类型" prop="specid">
+              <search-spec
+                :value="ruleForm.specid"
+                :disabled="sitem.isMust"
+                :size="'mini'"
+                :isDetail="false"
+                :placeholder="'规格类型'"
+                @searchChange="specidsearchChange"
+              />
+            </el-form-item>
             <el-form-item label="规格值" prop="spec_value_id">
-              <div
-                v-if="specVlist.length > 0"
-                style="max-height: 600px; overflow-y: scroll"
-              >
+              <div v-if="specVlist.length > 0">
                 <el-radio-group
                   v-model="ruleForm.spec_value_id"
                   @change="spec_value_id_change"
@@ -42,53 +50,39 @@
                   >
                 </el-radio-group>
               </div>
-              <div class="no-data tc" style="" v-else>暂无规格值,请添加!</div>
+              <div class="no-data" v-else>暂无规格值,请添加!</div>
             </el-form-item>
-            <el-row>
-              <el-col :span="6">
-                <el-form-item label="类型" prop="spec_id" label-width="58px">
-                  <search-spec
-                    :value="ruleForm.spec_id"
-                    :disabled="sitem.isMust"
-                    :size="'small'"
-                    :isDetail="false"
-                    :placeholder="'规格类型'"
-                    @searchChange="spec_idsearchChange"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="18" style="text-align: right; padding: 0px 0 0 10px">
-                <el-input
-                  style="width: 209px"
-                  v-model="sinput"
-                  class="fl"
-                  :disabled="id == 'edit'"
-                  :size="'small'"
-                  placeholder="规格值名称,如红色"
-                  maxlength="100"
-                />
-                <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-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="50"
+          />
+          <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>
@@ -111,7 +105,7 @@ export default {
       rulesThis: this.rules,
 
       rules: {
-        spec_id: [
+        specid: [
           {
             required: true,
             message: "规格类型不能为空",
@@ -132,14 +126,12 @@ export default {
     showModelThis(val) {
       if (!val) {
         this.$emit("cancel");
-        this.$emit("update:showModel",val);
       }
     },
   },
   methods: {
     async initForm() {
       this.loading = true;
-      this.sinput = "";
       this.resetFormData();
       this.rulesThis = this.rules;
       if (this.index + "" === "-1") {
@@ -152,45 +144,45 @@ export default {
     },
     async resetForm() {
       // 重置
-      await this.$nextTick(() => {
+      await this.$nextTick(async () => {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
-          this.resetFormData();
+          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);
+          }
         }
       });
     },
-    async resetFormData() {
-      const {
-        id,
-        spec_id,
-        spec_value,
-        spec_value_id,
-        spec_value_value,
-        isMust,
-      } = this.sitem;
+    resetFormData() {
+      this.specVlist = [];
       this.ruleForm = {
-        index: this.index,
-        id: id || "",
-        spec_id: spec_id || "",
-        spec_value: spec_value || "",
-        isMust: isMust || false,
-        spec_value_id: spec_value_id || "",
-        spec_value_value: spec_value_value || "",
+        index: "-1",
+        specid: "",
+        spec_name: "",
+        spec_value_id: "",
+        spec_value_name: "",
       };
-      if (spec_id) {
-        await this.getlist();
-      }
     },
     async add_spec() {
-      const { spec_id } = this.ruleForm;
-      if (spec_id) {
+      const { specid } = this.ruleForm;
+      if (specid) {
         if (this.sinput) {
           const res = await asyncRequest.valueadd({
-            spec_id: spec_id,
+            spec_id: specid,
             spec_value: this.sinput,
           });
-          const { code, data } = await this.useResHandle(res);
+          const { code, data, message } = await this.useResHandle(res, true);
           if (code === 0) {
             await this.getlist();
           }
@@ -201,33 +193,35 @@ export default {
         this.$message.warning("请选择规格类型!");
       }
     },
-    async spec_idsearchChange(e) {
+    async specidsearchChange(e) {
       const { id, spec_name } = e;
-      this.ruleForm.spec_id = id || "";
-      this.ruleForm.spec_value = spec_name || "";
-      this.$refs.ruleForm.validateField("spec_id");
+      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_value = spec_value || "";
+        this.ruleForm.spec_value_name = spec_value || "";
       } else {
         this.ruleForm.spec_value_id = "";
-        this.ruleForm.spec_value_value = "";
+        this.ruleForm.spec_value_name = "";
       }
       this.$refs.ruleForm.validateField("spec_value_id");
     },
     async getlist() {
-      const { spec_id } = this.ruleForm;
-      if (spec_id) {
+      const { specid } = this.ruleForm;
+      if (specid) {
         const res = await asyncRequest.valueall({
-          spec_id: spec_id,
+          spec_id: specid,
         });
-        const { code, data } = await this.useResHandle(res);
+        const { code, data, message } = await this.useResHandle(res);
         if (code === 0) {
           this.specVlist = data;
+        } else {
+          this.specVlist = [];
         }
       } else {
         this.specVlist = [];
@@ -238,6 +232,7 @@ export default {
       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!!");

+ 0 - 467
src/views/report/cpns/report-form.vue

@@ -1,467 +0,0 @@
-<template>
-  <el-form label-position="left" label-width="100px" size="mini" ref="formRef" :model="formData">
-    <el-row :gutter="10">
-      <el-col :span="12">
-        <el-form-item label="供应商名称">
-          <el-select disabled style="width:100%" :value="business_companyNo">
-            <el-option v-for="(item, index) in companyList" :key="item.supplierNo + item.id + index"
-              :label="item.supplierName" :disabled="item.status !== '1'" :value="item.supplierNo">
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="12">
-        <el-form-item label="客户名称" prop="companyName">
-          <el-input placeholder="客户名称" v-model="formData.companyName" />
-        </el-form-item>
-      </el-col>
-    </el-row>
-
-    <el-row :gutter="10">
-      <el-col :span="12">
-        <el-form-item label="业务员公司" prop="">
-          <search-work-company :placeholder="'业务公司'" :size="'mini'"  @searchChange="company_idsearchChange" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="12">
-        <el-form-item label="销售数量" prop="num">
-          <el-input placeholder="销售数量" v-model="formData.num" />
-        </el-form-item>
-      </el-col>
-    </el-row>
-
-    <el-row :gutter="10">
-      <el-col :span="6">
-        <el-form-item label="是否确定售价" prop="is_determine_price">
-          <el-select placeholder="是否确定售价" v-model="formData.is_determine_price">
-            <el-option value="0" label="否" />
-            <el-option value="1" label="是" />
-          </el-select>
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="6">
-        <el-form-item label="服务费比例" prop="service_proportion">
-          <el-input placeholder="服务费比例" v-model="formData.service_proportion" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="6">
-        <el-form-item label="期望服务费" prop="expect_service">
-          <el-input placeholder="期望服务费" v-model="formData.expect_service" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="6">
-        <el-form-item label="服务费比例">
-          <el-input placeholder="服务费比例" />
-        </el-form-item>
-      </el-col>
-    </el-row>
-
-
-    <el-row :gutter="10">
-      <el-col :span="5">
-        <el-form-item label="有效期" prop="preservation_day">
-          <digital-input :placeholder="'有效期'" :min="0" :max="100000000000" :position="'right'" :precision="0"
-            :size="'mini'" :controls="false" :append="'天'" @reschange="number_change($event, 'preservation_day')" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="5">
-        <el-form-item label="物流时间" prop="delivery_day">
-          <digital-input :placeholder="'物流时间'" :min="0" :max="100000000000" :position="'right'" :precision="0"
-            :size="'mini'" :controls="false" :append="'天'" @reschange="number_change($event, 'delivery_day')" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="5">
-        <el-form-item label="生产工期" prop="make_day">
-          <digital-input :placeholder="'生产工期'" :min="0" :max="100000000000" :position="'right'" :precision="0"
-            :size="'mini'" :controls="false" :append="'天'" @reschange="number_change($event, 'make_day')" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="4">
-        <el-form-item label="税点" label-width="60px" prop="tax">
-          <digital-input :placeholder="'税点'" :min="0" :max="100000000000" :position="'right'" :precision="0"
-            :size="'mini'" :controls="false" :append="'%'" @reschange="number_change($event, 'tax')" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="5">
-        <el-form-item label="单位" label-width="60px" prop="unit_id">
-          <search-unit :value="formData.unit_id" :size="'mini'" placeholder="单位" @searchChange="unitsearchChange" />
-        </el-form-item>
-
-      </el-col>
-    </el-row>
-
-    <el-row :gutter="10">
-      <el-col :span="12">
-        <el-form-item label="品牌" prop="brand_id">
-          <search-brand size="mini" :value="brandid" placeholder="请选择品牌" @searchChange="brandidsearchChange" />
-        </el-form-item>
-
-        <el-form-item label="分类" prop="cat_id">
-          <search-sort :placeholder="'分类'" size="mini" @searchChange="cat_id_change" />
-        </el-form-item>
-
-        <el-form-item label="商品名称" prop="good_name">
-          <el-input placeholder="商品名称" v-model="formData.good_name" />
-        </el-form-item>
-
-        <el-form-item label="产地" prop="origin_place">
-          <select-area :placeholder="'产地'" size="mini" @selectChange="selectAreaorigin_place($event, 'origin_place')" />
-        </el-form-item>
-
-        <el-form-item label="发货地" prop="delivery_place">
-          <select-area :placeholder="'发货地'" size="mini"
-            @selectChange="selectAreaorigin_place($event, 'delivery_place')" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="12">
-        <el-table :data="speclist" :size="'mini'" border style="width: 100%" height="164px">
-          <el-table-column prop="spec_value" label="规格类型" />
-          <el-table-column prop="spec_value_value" label="规格值" />
-          <el-table-column fixed="right">
-            <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="() => handleSpecModal(-1)" />
-              </el-tooltip>
-            </template>
-            <template slot-scope="scope">
-              <el-tooltip effect="dark" content="修改" placement="top">
-                <i class="el-icon-edit tb-icon" @click="() => handleSpecModal(scope.$index)"></i>
-              </el-tooltip>
-
-              <el-tooltip effect="dark" content="删除" placement="top">
-                <i class="el-icon-delete tb-icon"></i>
-              </el-tooltip>
-            </template>
-          </el-table-column>
-        </el-table>
-
-        <SpecModal :index="modalIndex" :showModel.sync="showModal" :sitem="spec" @refresh="handleEditSpec" />
-      </el-col>
-    </el-row>
-
-    <el-row :gutter="10">
-      <el-col :span="6">
-        <el-form-item label="总重量" prop="weight">
-          <digital-input :placeholder="'总重量'" :min="0" :max="100000000000" :position="'right'" :precision="0"
-            :size="'mini'" :controls="false" :append="'g'" @reschange="number_change($event, 'weight')" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="6">
-        <el-form-item label="供应区域" prop="supply_area">
-          <el-select v-model="formData.supply_area" placeholder="供应区域">
-            <el-option label="全国" value="1" />
-            <el-option label="全国除偏移" value="2" />
-          </el-select>
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="6">
-        <el-form-item label="付款方式" prop="pay_way">
-          <el-select v-model="formData.pay_way" placeholder="付款方式" style="wdith:100%" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="6">
-        <el-form-item label="裸价" label-width="60px" prop="cgd_charge">
-          <digital-input :placeholder="'裸价'" :min="0" :max="100000000000" :position="'right'" :precision="3"
-            :size="'mini'" :controls="false" :append="'元'" @reschange="number_change($event, 'cgd_charge')" />
-        </el-form-item>
-      </el-col>
-    </el-row>
-
-    <el-row :gutter="10">
-      <el-col :span="6">
-        <el-form-item label="贵金属重量" prop="gold_weight">
-          <digital-input :placeholder="'金属重量'" :min="0" :max="100000000000" :position="'right'" :precision="3"
-            :size="'mini'" :controls="false" :append="'g'" @reschange="number_change($event, 'gold_weight')" />
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="6">
-        <el-form-item label="贵金属种类" prop="noble_metal">
-          <search-metal-kind :value="formData.noble_metal" :size="'mini'" :placeholder="'贵金属种类'"
-            @searchChange="noble_metalsearchChange" />
-        </el-form-item>
-      </el-col>
-    </el-row>
-
-    <el-row :gutter="10">
-      <el-col :span="12">
-        <el-form-item label="配置要求" prop="config">
-          <el-select placeholder="配置要求" v-model="formData.config">
-            <el-option v-for="(item, index) in configOptions" :key="index" :label="item" :value="item" />
-          </el-select>
-        </el-form-item>
-      </el-col>
-
-      <el-col :span="12">
-        <el-form-item label="其他配置要求" prop="otherConfig">
-          <el-input v-model="formData.otherConfig" placeholder="其他配置要求" />
-        </el-form-item>
-      </el-col>
-    </el-row>
-
-    <el-row>
-      <el-form-item label="备注" prop="remark">
-        <el-input type="textarea" placeholder="备注" v-model="formData.remark" />
-      </el-form-item>
-    </el-row>
-
-    <el-row>
-      <el-form-item label="工艺说明">
-        <el-input placeholder="工艺说明" />
-      </el-form-item>
-    </el-row>
-    <!-- v-if="formData.good_img" -->
-    <el-row>
-      <el-form-item label="商品图片(<1mb)" prop="good_img" class="activity-upload">
-        <div class="btnupload" style="position: relative; margin-left: 10px" v-if="formData.good_img">
-          <img :src="formData.good_img" class="avatar" />
-        </div>
-        <div>
-          <i class="el-icon-plus avatar-uploader-icon" style="position: relative; width: 50px; height: 50px">
-            <file-upload class="Upload" :accept="'.jpg,.png,.jpeg'" :multiple="true" :disabled="type === 'view'"
-              :uploadcondition="beforeAvatarUpload" @UploadErrorEvent="UploadErrorEventgood_img"
-              @UploadSuccessEvent="UploadSuccessEventgood_img"></file-upload>
-          </i>
-        </div>
-      </el-form-item>
-    </el-row>
-
-    <el-row>
-      <div style="display:flex;justify-content:flex-end;width:100%;margin-bottom: 10px;">
-        <el-button type="primary" size="small" @click="handleConfirm">保存</el-button>
-      </div>
-    </el-row>
-  </el-form>
-</template>
-
-
-<script>
-import { mapGetters } from "vuex";
-import { get_company_list } from "@/utils/auth";
-import SpecModal from './spec-modal.vue';
-import asyncRequest from "@/apis/report";
-
-export default {
-  data() {
-    return {
-      spec: {},
-      speclist: [],
-      companyList: [],
-      showModal: false,
-      modalIndex: '',
-      configOptions: ["证书", "包装盒", "绒布袋", "标签", "其他"],
-      formRef: null,
-      formData: {
-        num: 0,
-        companyName: "",
-        is_determine_price: "",
-        is_determine_price: "0",
-        service_proportion: "",
-        expect_service: "",
-        brand_id: "",
-        preservation_day: "",
-        delivery_day: "",
-        make_day: "",
-        tax: "",
-        unit_id: "",
-        cat_id: "",
-        good_name: "",
-        origin_place: [],
-        delivery_place: [],
-        weight: "",
-        supply_area: "",
-        pay_way: "",
-        cgd_charge: "",
-        gold_weight: "",
-        noble_metal: "",
-        config: "",
-        otherConfig: "",
-        good_img: ""
-      }
-    }
-  },
-  components: {
-    SpecModal
-  },
-  computed: {
-    ...mapGetters(['business_companyNo'])
-  },
-  mounted() {
-    this.companyList = get_company_list() ? JSON.parse(get_company_list()) : [];
-  },
-  methods: {
-    handleSpecModal(index) {
-      this.showModal = true;
-      this.modalIndex = index;
-      this.spec = index >= 0 ? this.speclist[index] : {};
-    },
-    handleEditSpec(spec) {
-      const shallowSpacData = { ...spec };
-      if (this.modalIndex === -1) {
-        this.speclist.push(shallowSpacData);
-        return
-      }
-      this.$set(this.speclist, this.modalIndex, shallowSpacData);
-    },
-    async brandidsearchChange(e) {
-      const { id } = e ?? {};
-      this.formData.brand_id = id;
-    },
-    async number_change(e, key) {
-      this.formData[key] = e + "" || "0"
-    },
-    unitsearchChange(e) {
-      const { code } = e;
-      this.formData.unit_id = code;
-    },
-    async cat_id_change(e) {
-      const { pid, id } = e;
-      // if (pid === "6") {
-      //   this.$message.warning("不允许反馈贵金属商品!");
-      //   this.ruleForm.cat_id = [];
-      // } else {
-      //   this.ruleForm.cat_id = id ? [id] : [];
-      // }
-      this.formData.cat_id = id;
-    },
-    selectAreaorigin_place(e, key) {
-      this.formData[key].origin_place = e;
-    },
-    //贵金属种类选择
-    async noble_metalsearchChange(e) {
-      const { id, code, label } = e;
-      this.formData.noble_metal = id || "";
-    },
-    UploadErrorEventgood_img(res) {
-      this.imgUploadError(1, res);
-    },
-    imgUploadError(type, res) {
-      if (res !== "break") {
-        this.$message.error("图片上传失败!");
-        // this.$refs.ruleForm.validateField(
-        //   type === 1 ? "good_img" : type === 2 ? "good_img" : ""
-        // );
-      }
-    },
-    //判断图片规格
-    beforeAvatarUpload(file) {
-      let isJPG = false;
-      if (
-        file.type === "image/jpg" ||
-        file.type === "image/png" ||
-        file.type === "image/jpeg"
-      ) {
-        isJPG = true;
-      }
-      const isLt2M = file.size / 1024 / 1024 < 1;
-      if (!isJPG) {
-        this.$message.error("图片格式不正确!");
-      }
-      if (!isLt2M) {
-        this.$message.error("图片大小不能超过 1MB!");
-      }
-      return isJPG && isLt2M;
-    },
-    closeImg(index, key) {
-      this.formData[key].splice(index, 1);
-      // this.$refs.ruleForm.validateField(key);
-    },
-    async UploadSuccessEventgood_img(data) {
-      await this.UploadSuccessEvent(1, data);
-    },
-    //图片上传成功
-    async UploadSuccessEvent(type, data) {
-      // if (this.ruleForm.good_img.length > 10) {
-      //   this.$message.warning("上传图片最多不能超过10张");
-      //   return;
-      // }
-      const { url } = data;
-      if (url === "noToken") {
-        await this.logout();
-      } else if (url === "noSupplierNo") {
-        this.$notify({
-          title: "当前供应商参数错误",
-          dangerouslyUseHTMLString: true,
-          message: "5秒后,请您重新登录!",
-        });
-        await setTimeout(async () => {
-          await this.logout();
-        }, 5000);
-      } else {
-        if (type === 1) {
-          this.formData.good_img = url
-          // this.$refs.ruleForm.validateField("good_img");
-        } else if (type === 2) {
-          this.formData.good_img = url
-          // this.$refs.ruleForm.validateField("good_img");
-        }
-        this.$message.success("图片上传成功!");
-      }
-    },
-    handleConfirm() {
-      this.$refs.formRef.validate(async isValid => {
-        if (!isValid) return;
-
-        const spec_list = this.speclist;
-        const supplierNo = this.business_companyNo;
-
-        const {
-          num,
-          companyName,
-          is_determine_price,
-          cgd_charge,
-          service_proportion,
-          expect_service,
-          brand_id,
-          preservation_day,
-          delivery_day,
-          make_day,
-          tax,
-          unit_id,
-          cat_id,
-          good_name,
-          delivery_place,
-          origin_place,
-          weight,
-          supply_area,
-          pay_way,
-          gold_weight,
-          noble_metal,
-          config,
-          other_config,
-          remark,
-          cost_desc,
-          
-        } = this.formData;
-
-        const params = {
-          customerCode,
-          companyName,
-          num
-        }
-
-        // const { data, code, message } = await asyncRequest.add(this.formData);
-
-        // if(code === 0){
-        //   this.$router.push("/report/index");
-        // }
-      })
-    }
-  }
-}
-</script>

+ 49 - 0
src/views/report/cpns/shipment-request.vue

@@ -0,0 +1,49 @@
+<template>
+  <el-table size="mini" border :data="list" max-height="300px" v-loading="loading">
+    <el-table-column label="发货申请编号" width="160px" prop="orderCode" show-overflow-tooltip />
+    <el-table-column label="状态" width="120px" prop="status" show-overflow-tooltip>
+      <template #default="scope">
+        <el-tag>{{statusOptions.find(({value}) => value === String(scope.row.status))?.label}}</el-tag>
+      </template>
+    </el-table-column>
+    <el-table-column label="发货数量" width="80px"  prop="send_num" show-overflow-tooltip />
+    <el-table-column width="90px" label="联系人" prop="contactor" show-overflow-tooltip />
+    <el-table-column width="120px" label="联系电话" prop="mobile" show-overflow-tooltip />
+    <el-table-column label="收货地址" prop="addr" show-overflow-tooltip />
+    <el-table-column label="物流公司" prop="post_name" show-overflow-tooltip />
+    <el-table-column label="物流单号" prop="post_code" show-overflow-tooltip/>
+    <el-table-column label="发货时间" prop="updatetime" show-overflow-tooltip />
+  </el-table>
+</template>
+
+
+<script>
+import asyncRequest from "@/apis/report";
+import { statusOptions } from "./../config/columns";
+export default {
+  props:["orderCode"],
+  data(){
+    return {
+      list:[],
+      loading:false,
+      statusOptions:[
+        { value: "0", label: "待发货" },
+        { value: "1", label: "待库管发货" },
+        { value: "2", label: "已发货待收货" },
+        { value: "3", label: "已收货" },
+        { value: "4", label: "已全部退货" }
+      ]
+    }
+  },
+  async mounted(){
+    const orderCode = this.orderCode;
+    if(!orderCode) return
+    this.loading = true;
+    const { data, code, message } = await asyncRequest.saleOutList({ orderCode })
+    this.loading = false;
+    if(Number(code) === 0){
+      this.list = data.list;
+    }
+  }
+}
+</script>

+ 104 - 20
src/views/report/cpns/wait-transferred.vue

@@ -10,6 +10,7 @@
             <span v-else>{{ scope.row.receipt_quantity }}</span>
           </template>
         </el-table-column>
+
         <el-table-column label="收货联系人">
           <template slot-scope="scope">
             <el-form-item v-if="scope.$index === editIndex" prop="contactor">
@@ -18,22 +19,26 @@
             <span v-else>{{ scope.row.contactor }}</span>
           </template>
         </el-table-column>
+
         <el-table-column label="收货联系电话" prop="mobile">
           <template slot-scope="scope">
             <el-form-item v-if="scope.$index === editIndex" prop="mobile">
-              <el-input size="mini" placeholder="收货联系电话" v-model="editCacheData.mobile" />
+              <el-input size="mini" placeholder="收货联系电话" maxlength="11" v-model="editCacheData.mobile" />
             </el-form-item>
             <span v-else>{{ scope.row.mobile }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="收货省市区" prop="in_addr">
+
+        <el-table-column label="收货省市区" prop="addr_code">
           <template slot-scope="scope">
-            <el-form-item v-if="scope.$index === editIndex" prop="in_addr">
-              <select-area :value="editCacheData.in_addr" :placeholder="'收货省市区'" size="mini" @selectChange="handleInAddrChange($event)" />
+            <el-form-item v-if="scope.$index === editIndex" prop="addr_code">
+              <select-area :value="editCacheData.addr_code" :placeholder="'收货省市区'" size="mini"
+                @selectChange="handleInAddrChange($event)" />
             </el-form-item>
-            <span v-else>{{ scope.row.in_addr }}</span>
+            <span v-else>{{ scope.row.addr_code_name }}</span>
           </template>
         </el-table-column>
+
         <el-table-column label="详细地址" prop="addr">
           <template slot-scope="scope">
             <el-form-item v-if="scope.$index === editIndex" prop="addr">
@@ -46,26 +51,33 @@
         <el-table-column width="90px">
           <template #header>
             <el-tooltip placement="top" content="下载收货模板">
-              <el-button type="text" icon="el-icon-download" />
+              <el-button size="mini" type="text" icon="el-icon-download" @click="downloadTemplate" />
             </el-tooltip>
 
             <el-tooltip placement="top" content="导入收货地址">
-              <el-button type="text" icon="el-icon-upload2" @click="handleShowModal" />
+              <el-button size="mini" type="text" icon="el-icon-upload2" @click="handleShowModal" />
             </el-tooltip>
 
             <el-tooltip placement="top" content="手动添加地址">
-              <el-button type="text" icon="el-icon-circle-plus-outline" @click="handlePushAddress" />
+              <el-button size="mini" type="text" icon="el-icon-circle-plus-outline" @click="handlePushAddress" />
             </el-tooltip>
           </template>
 
           <template slot-scope="scope">
-            <el-button v-if="Number(editIndex) === Number(scope.$index)" type="text" icon="el-icon-circle-check"
+            <el-button size="mini" v-if="Number(editIndex) === Number(scope.$index)" type="text" icon="el-icon-circle-check"
               @click="handleSave()" />
-            <el-button v-else type="text" icon="el-icon-edit" @click="handleSetEdit(scope.$index)" />
-            <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.$index)" />
+            <el-button v-else size="mini" type="text" icon="el-icon-edit" @click="handleSetEdit(scope.$index)" />
+            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.$index)" />
           </template>
         </el-table-column>
       </el-table>
+
+
+      <el-form-item>
+        <div style="width:100%;display:flex;justify-content:flex-end;margin-top:10px">
+          <el-button type="primary" size="mini" @click="handleSubmit">保存</el-button>
+        </div>
+      </el-form-item>
     </el-form>
 
 
@@ -77,16 +89,20 @@
 <script>
 import InAddressModal from "@/components/in-address-modal"
 import { addressRules } from "./../config/rules"
+import { utils, writeFile } from "xlsx";
+import asyncRequest from "@/apis/report";
 
 const defaultAddressData = {
   receipt_quantity: '',
+  addr_code_name: '',
   contactor: '',
-  in_addr: '',
+  addr_code: '',
   mobile: '',
   addr: ''
 }
 
 export default {
+  props: ['id','num'],
   data() {
     return {
       list: [],
@@ -104,29 +120,57 @@ export default {
     handleShowModal() {
       this.showModal = true;
     },
-    
+
     handleSetEdit(index) {
       if (this.editIndex >= 0) {
         this.$message.warning('当前已有地址在编辑,请保存后再试!');
         return;
       }
       this.editIndex = index;
-     
-      const { contactor, receipt_quantity, mobile, in_addr, addr } = this.list[index];
+
+      const { contactor, receipt_quantity, mobile, addr_code, addr, addr_code_name } = this.list[index];
 
       this.editCacheData = {
-        contactor, receipt_quantity, mobile, in_addr, addr
+        contactor, receipt_quantity, mobile, addr_code, addr, addr_code_name
       }
     },
 
+    downloadTemplate() {
+      const data = Array(20).fill(0).map(() => ({
+        '收货总数': '1',
+        '收货联系人': '张三',
+        '收货联系电话': '17878787878',
+        '收货省名称': '北京市',
+        '收货市名称': '北京市',
+        '收货区名称': '东城区',
+        '详细地址': 'xxx街道xxx号',
+      }))
+
+      const workBook = utils.book_new();
+      const workSheet = utils.json_to_sheet(data);
+      utils.book_append_sheet(workBook, workSheet, "sheet");
+
+      //导出模板
+      writeFile(workBook, "收货模板.xlsx", {
+        bookType: "xlsx"
+      });
+    },
     handleDelete(index) {
       this.list.splice(index, 1)
       if (this.editIndex >= 0) this.editIndex = -1;
     },
 
     handleSave() {
-      this.$refs.formRef.validate(isValid => {
+      this.$refs.formRef.validate(async isValid => {
         if (!isValid) return;
+
+        const { addr_code } = this.editCacheData;
+        const { data, code } = await asyncRequest.addrall({ code: addr_code[addr_code.length - 1] })
+
+        if (Number(code) === 0) {
+          this.editCacheData.addr_code_name = data.province.name + '/' + data.city.name + '/' + data.area.name
+        }
+
         this.$set(this.list, this.editIndex, this.editCacheData)
         this.editCacheData = { ...defaultAddressData }
         this.editIndex = -1;
@@ -134,7 +178,15 @@ export default {
     },
 
     handleRefresh(data) {
-      this.list = [...this.list, ...data.list]
+      const _data = data.list.map(({ addr, addr_code, contactor, mobile, receipt_quantity, addr_code_name }) => ({
+        addr,
+        addr_code,
+        contactor, mobile,
+        receipt_quantity,
+        addr_code_name
+      }))
+
+      this.list = [...this.list, ..._data]
       this.showModal = false;
     },
 
@@ -148,8 +200,40 @@ export default {
       this.editIndex = this.list.length - 1;
     },
 
-    handleInAddrChange(e){
-      this.editCacheData['in_addr'] = e;
+    handleInAddrChange(e) {
+      this.editCacheData['addr_code'] = e;
+    },
+
+    async handleSubmit() {
+      if (this.editIndex !== -1) {
+        this.$message.warning('当前已有地址在编辑,请保存后再试!')
+        return
+      }
+
+      if(this.list.length === 0){
+        this.$message.warning('至少填写一条记录!')
+        return
+      }
+
+      const currentNum = this.list.reduce((current,prev) => {
+        return Number(current) + Number(prev.receipt_quantity)
+      },0)
+
+      if(Number(this.num) > currentNum){
+        this.$message.warning('收货数量小于销售数量!');
+        return;
+      }
+
+      const { data, code, message } = await asyncRequest.transfer({
+        id: this.id,
+        addr_list: this.list
+      });
+
+      if (Number(code) === 0) {
+        this.$emit("refresh");
+      } else {
+        this.$message.error(message)
+      }
     }
   }
 }

+ 49 - 11
src/views/report/detail.vue

@@ -3,15 +3,25 @@
     <el-tabs v-model="activeTabs">
       <el-tab-pane name="1" :label="title">
         <el-collapse v-model="collapses">
-          <el-collapse-item name="1" :title="title">
-            <report-form />
+          <el-collapse-item name="1" :title="title" v-if="type === 'add'">
+              <base-form :type="type" :id="id"  />
           </el-collapse-item>
 
-          <tempalte v-if="preview">
+          <template v-else>
+              <base-detail ref="baseForm" :sitem="sitem" @change-status="handleChangeStatus" @change-num="handleChangeNum" @change-order-code="handleChangeOrderCode" />
+           </template>
+
+          <tempalte v-if="status === '2'">
             <el-collapse-item name="2" title="待转单">
-              <wait-transferred />
+              <wait-transferred :id="id" :num="num" @refresh="handleRefresh" />
             </el-collapse-item>
           </tempalte>
+
+          <template v-if="status === '3'">
+            <el-collapse-item name="3" title="发货申请">
+              <shipment-request :order-code="orderCode" />
+            </el-collapse-item>
+          </template>
         </el-collapse>
       </el-tab-pane>
     </el-tabs>
@@ -19,26 +29,54 @@
 </template>
 
 <script>
-import ReportForm from './cpns/report-form.vue'
 import WaitTransferred from './cpns/wait-transferred.vue'
+import ShipmentRequest from "./cpns/shipment-request.vue"
+import baseDetail from './cpns/baseDetail.vue'
+import BaseForm from './cpns/baseForm.vue'
 
 export default {
   data() {
     return {
       activeTabs: '1',
-      collapses:['1','2']
+      collapses:['1','2','3'],
+      status:'',
+      sitem:{},
+      orderCode:"",
+      num:"0"
     }
   },
   components: {
-    ReportForm,
-    WaitTransferred
+    BaseForm,
+    baseDetail,
+    WaitTransferred,
+    ShipmentRequest
   },
   computed: {
     title() {
-      return this.isPreview ? '报备单详情' : '新建报备单'
+      return this.id && this.id !== 'add' ? '报备单详情' : '新建报备单'
+    },
+    type(){
+      return this.id && this.id !== 'add' ? 'view' : 'add'
+    },
+    id(){
+      return this.$route.query.id
+    },
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+  },
+  methods:{
+    handleChangeStatus(status){
+      this.status = status;
+    },
+    handleChangeOrderCode(orderCode){
+      this.orderCode = orderCode
+    },
+    handleRefresh(){
+      this.$refs.baseForm.initData()
     },
-    preview() {
-      return !!this.$route.query.id && this.$route.query.id !== 'add'
+    handleChangeNum(num){
+      this.num = num
     }
   }
 }

+ 90 - 98
src/views/report/index.vue

@@ -1,59 +1,40 @@
 <template>
   <div class="purchaseOrder pagePadding">
-    <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();
-      "
-      @selection="selection_change"
-    >
+    <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();
+      " @selection="selection_change">
       <template #table-header="{}">
         <div style="width: 100%">
           <el-row style="padding: 0 0 0 80px" :gutter="10">
             <el-col :span="4" style="width: 303px; padding: 0 0 0 10px">
-              <period-date-picker
-                :type="1"
-                :width="'135px'"
-                :size="searchSize"
-                :start="timeOBJ.start"
-                :end="timeOBJ.end"
-                @timeReturned="handleTime"
-              />
+              <period-date-picker :type="1" :width="'135px'" :size="searchSize" :start_date="timeOBJ.start_date"
+                :end_date="timeOBJ.end_date" @timeReturned="handleTime" />
             </el-col>
 
             <el-col :span="4">
-              <el-input size="mini" placeholder="咨询单号" />
+              <el-input size="mini" placeholder="报备单号" v-model="parmValue.filingCode" 
+              @blur="pageInfo.curr = 1;
+                     parmValue.page = 1;
+                    searchList();" />
             </el-col>
 
             <el-col :span="4">
-              <el-input size="mini" placeholder="商品名称" />
+              <el-input size="mini" placeholder="商品名称" v-model="parmValue.good_name"  
+              @blur="pageInfo.curr = 1;
+                     parmValue.page = 1;
+                     searchList();" />
             </el-col>
 
-            <el-col :span="4">
-              <el-input size="mini" placeholder="商品编码" />
-            </el-col>
-            
             <el-col :span="3" style="width: 66px; float: right">
-              <el-button
-                :size="searchSize"
-                type="primary"
-                style="float: right; margin-left: 5px"
-                @click="searchList"
-              >
+              <el-button :size="searchSize" type="primary" style="float: right; margin-left: 5px" @click="searchList">
                 刷新
               </el-button>
             </el-col>
@@ -65,61 +46,58 @@
           </el-row>
           <el-row>
             <el-col :span="3" class="fr" style="width: 66px; margin-top: 10px">
-              <el-button
-                :size="searchSize"
-                type="success"
-                style="float: right"
-                @click="routeGoto('/report/detail', { id: 'add', type: 'add' })"
-              >
+              <el-button :size="searchSize" type="success" style="float: right"
+                @click="routeGoto('/report/detail', { id: 'add', type: 'add' })">
                 添加
               </el-button>
             </el-col>
 
             <el-col :span="4" style="margin-top:15px;margin-right:10px">
-              <el-input size="mini" placeholder="企业客户名称" />
+              <el-input size="mini" placeholder="企业客户名称" v-model="parmValue.companyName" 
+              @blur="pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();" />
             </el-col>
 
             <el-col :span="4" style="margin-top:15px;margin-right:10px">
-              <el-input size="mini" placeholder="企业客户编码" />
+              <el-input size="mini" placeholder="企业客户编码" v-model="parmValue.companyCode" 
+              @blur="pageInfo.curr = 1;
+                     parmValue.page = 1;
+                     searchList();"  />
             </el-col>
 
-            
+
             <el-col :span="4" style="margin-top:15px;margin-right:10px">
-              <el-select size="mini" placeholder="请选择状态" />
+              <el-select clearable size="mini" placeholder="请选择状态" v-model="parmValue.status" 
+              @change="pageInfo.curr = 1;
+                       parmValue.page = 1;
+                       searchList();" >
+                <el-option v-for="status in statusOptions" :key="status.value" :value="status.value" :label="status.label" />
+              </el-select>
             </el-col>
           </el-row>
         </div>
       </template>
-      <template #good_name="{ scope }">
-        <span>{{ scope.row.good_name }}</span>
-        <span v-for="(si, i) in scope.row.speclist" :key="si.spec_id + i">
-          {{ i === 0 ? "__" : "--" }}{{ si.spec_name }}[{{ si.spec_value }}]
-        </span>
+
+      <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"
-          v-text="
-            (statusOptions.find((item) => item.value == scope.row.status) || {}).label ||
-            '--'
-          "
-        ></el-tag>
-      </template>
-      <template #order_id="{ scope }">
-        <el-tag
-          :size="tablebtnSize"
-          v-text="
-            (cg_order_type_options.find((item) => item.id == scope.row.order_type) || {})
-              .label || '--'
-          "
-        ></el-tag>
+        <el-tag :size="tablebtnSize" v-text="
+          (statusOptions.find((item) => item.value == scope.row.status) || {}).label || '--'
+        "></el-tag>
       </template>
+
       <template #operation="{ scope }">
         <el-tooltip effect="dark" content="详情" placement="top">
-          <i
-            class="el-icon-view tb-icon"
-            @click="getRouter('/report/detail', scope.row.cgdNo)"
-          ></i>
+          <i class="el-icon-view tb-icon" @click="getRouter('/report/detail', scope.row.id)"></i>
+        </el-tooltip>
+
+        <el-tooltip effect="dark" content="取消转单" placement="top">
+          <i v-if="String(scope.row.status) !== '3' && String(scope.row.status) !== '5'" class="el-icon-refresh-right tb-icon" @click="handleCancel(scope.row.id)"></i>
         </el-tooltip>
       </template>
     </ex-table>
@@ -133,6 +111,7 @@ import asyncRequest from "@/apis/report";
 import { columns, statusOptions } from "./config/columns";
 import { cg_order_type_options } from "@/assets/js/statusList";
 import { mapGetters } from "vuex";
+import { param } from "@/utils";
 
 export default {
   name: "purchaseOrder",
@@ -163,8 +142,8 @@ export default {
       select: "1",
       input: "",
       timeOBJ: {
-        start: "", //起始时间
-        end: "", // 结束时间
+        start_date: "", //起始时间
+        end_date: "", // 结束时间
       },
       // 状态
       statusOptions: statusOptions,
@@ -175,8 +154,8 @@ export default {
       wsm_code: [],
       wsm_supplierNo: [],
       parmValue: {
-        start: "", //新建起始时间
-        end: "", // 新建结束时间
+        start_date: "", //新建起始时间
+        end_date: "", // 新建结束时间
       },
       tableData: [],
       passwordModel: false,
@@ -205,7 +184,7 @@ export default {
     if (back) {
       this.parmValue = JSON.parse(back);
       console.log(this.parmValue);
-      const { page, size, start, end  } = this.parmValue;
+      const { page, size, start_date, end_date } = this.parmValue;
 
       this.pageInfo = {
         size: size,
@@ -222,6 +201,7 @@ export default {
 
   methods: {
     getRouter(toRouter, queryId) {
+      console.log(toRouter, queryId);
       if (toRouter && queryId) {
         let model = {
           id: queryId,
@@ -243,6 +223,14 @@ export default {
         this.$message.warning("暂未找到相关流程!");
       }
     },
+    async handleCancel(id){
+      const {code,message} = await asyncRequest.cancel({id});
+      if(Number(code) === 0){
+        this.searchList()
+      }else{
+        this.$message.warning(message);
+      }
+    },
     //选中触发函数
     selection_change(e) {
       const { list } = e;
@@ -267,11 +255,11 @@ export default {
       this.wsm_code = [];
       this.wsm_supplierNo = [];
       this.timeOBJ = {
-        start: "", //起始时间
-        end: "", // 结束时间
+        start_date: "", //起始时间
+        end_date: "", // 结束时间
       };
       this.parmValue = {
-        bk_code: "", // 备库编码
+        filingCode: "", // 报备单编码
         wsm_in_code: "", // 入库单号
         cgdNo: "", // 销售订单编码
         apply_name: "", // 申请人
@@ -279,10 +267,10 @@ export default {
         good_code: "", // 产品属性编号
         status: "", //状态
         wsm_code: "", //入货仓库编码
-        start: "", //新建起始时间
-        end: "", // 新建结束时间
-        last_start: "", //最后入库时间开始
-        last_end: "", //最后入库时间结束
+        start_date: "", //新建起始时间
+        end_date: "", // 新建结束时间
+        last_start_date: "", //最后入库时间开始
+        last_end_date: "", //最后入库时间结束
         orderCode: "", //订单编号
         company_name: "", //部门
         page: 1, // 页码
@@ -300,20 +288,19 @@ export default {
       if (this.loading) return;
 
       if (
-        (this.timeOBJ.start !== "" && this.timeOBJ.end === "") ||
-        (this.timeOBJ.start === "" && this.timeOBJ.end !== "")
+        (this.timeOBJ.start_date !== "" && this.timeOBJ.end_date === "") ||
+        (this.timeOBJ.start_date === "" && this.timeOBJ.end_date !== "")
       ) {
         this.$message.warning("时间区间不完整!");
         return;
       }
 
       this.loading = true;
-      this.parmValue.cgdNo = this.select === "1" ? this.input : ""; // 销售订单编码
-      this.parmValue.good_code = this.select === "4" ? this.input : ""; // 产品属性编号
-      this.parmValue.good_name = this.select === "5" ? this.input : ""; // 产品名称
-      console.log(this.pageInfo);
       // this.wsm_supplierNo = [];
-      const res = await asyncRequest.list(this.parmValue);
+      const res = await asyncRequest.list({
+        ...this.parmValue,
+        ...this.timeOBJ
+      });
       const { code, data } = await this.useResHandle(res);
       if (code === 0) {
         const { list, count } = data;
@@ -327,9 +314,14 @@ export default {
     },
     // 时间
     async handleTime(e) {
-      this.timeOBJ.start = e?.startTime ?? "";
-      this.timeOBJ.end = e?.endTime ?? "";
-      await this.handleClick(this.sselect);
+      this.timeOBJ.start_date = e?.startTime ?? "";
+      this.timeOBJ.end_date = e?.endTime ?? "";
+
+      if(e.startTime && e.endTime){
+        this.pageInfo.curr = 1;
+        this.parmValue.page = 1;
+        this.searchList();
+      }
     },
   },
 };

+ 67 - 1
src/views/workbench/components/baseForm.vue

@@ -144,7 +144,7 @@
                       @click="openEdit(scope.$index, scope.row)"
                     ></i>
                   </el-tooltip>
-                  <el-tooltip effect="dark" content="删除" placement="top">
+                  <el-tooltip effect="dark" v-if="!scope.row.isMust" placement="top">
                     <i
                       class="el-icon-delete tb-icon"
                       @click="openDelete(scope.$index)"
@@ -990,6 +990,70 @@ export default {
         }
       }
     },
+    async set_must_spec() {
+      const { cat_id } = this.ruleForm;
+      let id = cat_id.length == 1 ? cat_id[0] : "";
+      if (id) {
+        const { code, message, data } = await asyncRequest.catinfo({ id: id });
+        if (code === 0) {
+          const { spec } = data;
+          if (spec && spec.length > 0) {
+            if (this.spec_tableData && this.spec_tableData.length > 0) {
+              this.spec_tableData.forEach((c) => {
+                c.isMust = false;
+              });
+              spec.forEach((a, ai) => {
+                let findex = this.spec_tableData.findIndex((b) => b.specid === a.id);
+                if (findex !== -1) {
+                  this.spec_tableData[findex].isMust = true;
+                } else {
+                  this.spec_tableData.push({
+                    id: "",
+                    index: "1",
+                    specid: a.id,
+                    spec_name: a.spec_name,
+                    isMust: true,
+                    spec_value_name: "",
+                    spec_value_id: "",
+                  });
+                }
+              });
+            } else {
+              spec.forEach((a, ai) => {
+                let model = {
+                  id: "",
+                  index: "1",
+                  specid: a.id,
+                  spec_name: a.spec_name,
+                  isMust: true,
+                  spec_value_name: "",
+                  spec_value_id: "",
+                };
+                this.spec_tableData.push(model);
+              });
+            }
+          }
+          this.spec_tableData.map((e, ei) => {
+            e.index = ei + "";
+            return e;
+          });
+
+          this.spec_tableData.forEach((si, sii) => {
+            this.$set(this.spec_tableData, sii, si);
+          });
+          console.log(this.spec_tableData);
+        } else if (code >= 100 && code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(message);
+        }
+      } else {
+        this.spec_tableData.forEach((si, sii) => {
+          si.isMust = false;
+          this.$set(this.spec_tableData, sii, si);
+        });
+      }
+    },
     async submitForm() {
       if (this.loading) {
         return;
@@ -1140,6 +1204,7 @@ export default {
           if (this.type === "add") {
             this.spec_tableData = JSON.parse(JSON.stringify(this.askItem.specinfo));
           }
+          await this.set_must_spec();
         }
       });
     },
@@ -1187,6 +1252,7 @@ export default {
         this.ruleForm.nake_fee = "0";
       }
       this.computedCost();
+      await this.set_must_spec();
     },
     setrules() {
       let list1 = ["noble_weight", "is_gold_price", "is_diff"];

+ 1 - 1
src/views/workbench/components/baseFormAddEdit.vue

@@ -29,7 +29,7 @@
             <el-form-item label="规格类型" prop="specid">
               <search-spec
                 :value="ruleForm.specid"
-                :disabled="false"
+                :disabled="sitem.isMust"
                 :size="'mini'"
                 :isDetail="false"
                 :placeholder="'规格类型'"

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov