|
@@ -1,495 +0,0 @@
|
|
-/* eslint-disable prettier/prettier */
|
|
|
|
-import { h } from "vue";
|
|
|
|
-import { ElImage, ElTag } from "element-plus";
|
|
|
|
-import { DescriptionColumns } from "/@/components/BasicDescriptions";
|
|
|
|
-import { FormConfig } from "/@/components/PageSearch";
|
|
|
|
-import { createTooltip } from "/@/utils/tooltip";
|
|
|
|
-// import { payWayOptions, sendWayOptions, supplyAreaOptions } from "./_options";
|
|
|
|
-
|
|
|
|
-export const projectFormConfig: FormConfig = {
|
|
|
|
- labelWidth: "100px",
|
|
|
|
- formItems: [
|
|
|
|
- {
|
|
|
|
- label: "项目名称",
|
|
|
|
- field: "name",
|
|
|
|
- type: "input",
|
|
|
|
- placeholder: "项目名称",
|
|
|
|
- span: 12
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "所属平台",
|
|
|
|
- field: "platform",
|
|
|
|
- placeholder: "客户公司名称",
|
|
|
|
- span: 12,
|
|
|
|
- slot: "platform"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "销售方",
|
|
|
|
- field: "companyNo",
|
|
|
|
- placeholder: "销售方",
|
|
|
|
- slot: "companyNo",
|
|
|
|
- span: 12
|
|
|
|
- },
|
|
|
|
- // {
|
|
|
|
- // label: "购买方",
|
|
|
|
- // field: "khNo",
|
|
|
|
- // slot: "khNo",
|
|
|
|
- // placeholder: "购买方",
|
|
|
|
- // span: 12
|
|
|
|
- // },
|
|
|
|
- {
|
|
|
|
- label: "项目总预算",
|
|
|
|
- field: "budget_total",
|
|
|
|
- slot: "budget_total",
|
|
|
|
- placeholder: "项目总预算",
|
|
|
|
- span: 8
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "要求到货时间",
|
|
|
|
- field: "arrtime",
|
|
|
|
- slot: "arrtime",
|
|
|
|
- span: 8,
|
|
|
|
- placeholder: "要求到货时间",
|
|
|
|
- otherOptions: {
|
|
|
|
- disabledDate(date) {
|
|
|
|
- return date.getTime() < new Date().getTime() - 86400000;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "竞价截止时间",
|
|
|
|
- field: "endtime",
|
|
|
|
- placeholder: "竞价截止时间",
|
|
|
|
- slot: "endtime",
|
|
|
|
- span: 8,
|
|
|
|
- otherOptions: {
|
|
|
|
- disabledDate(date) {
|
|
|
|
- return date.getTime() < new Date().getTime() - 86400000;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "项目用途",
|
|
|
|
- field: "use_desc",
|
|
|
|
- type: "input",
|
|
|
|
- placeholder: "项目用途",
|
|
|
|
- span: 24
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "项目要求",
|
|
|
|
- field: "ladder",
|
|
|
|
- slot: "ladder",
|
|
|
|
- span: 24
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-//平台商品详情字段
|
|
|
|
-export const platformGoodColumns: DescriptionColumns = [
|
|
|
|
- {
|
|
|
|
- field: "good_name",
|
|
|
|
- label: "商品名称",
|
|
|
|
- span: 24,
|
|
|
|
- render: (goodname, { skuCode, speclist }) => {
|
|
|
|
- const goodName = speclist
|
|
|
|
- ? speclist
|
|
|
|
- .map(({ spec_name, spec_value }) => `${spec_name}[${spec_value}]`)
|
|
|
|
- .join("_")
|
|
|
|
- : "";
|
|
|
|
-
|
|
|
|
- return createTooltip(
|
|
|
|
- goodname + "_" + goodName,
|
|
|
|
- "商品编号: " + skuCode,
|
|
|
|
- 360
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "good_img",
|
|
|
|
- label: "商品主图",
|
|
|
|
- span: 12,
|
|
|
|
- render: good_img => {
|
|
|
|
- const previewSrcList = good_img ? good_img.split(",") : [];
|
|
|
|
- return previewSrcList.map(src =>
|
|
|
|
- h(ElImage, {
|
|
|
|
- previewSrcList: [src],
|
|
|
|
- src,
|
|
|
|
- previewTeleported: true,
|
|
|
|
- style: {
|
|
|
|
- height: "20px",
|
|
|
|
- width: "20px"
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "good_info_img",
|
|
|
|
- label: "商品详情图",
|
|
|
|
- span: 12,
|
|
|
|
- render: good_info_img => {
|
|
|
|
- return h(ElImage, {
|
|
|
|
- previewSrcList: [good_info_img],
|
|
|
|
- src: good_info_img,
|
|
|
|
- previewTeleported: true,
|
|
|
|
- style: {
|
|
|
|
- height: "20px",
|
|
|
|
- width: "20px"
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "company",
|
|
|
|
- label: "业务企业名称",
|
|
|
|
- span: 8,
|
|
|
|
- render: (company, { companyNo }) =>
|
|
|
|
- createTooltip(company, "业务企业编号: " + companyNo, 360)
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "platform_name",
|
|
|
|
- label: "所属平台",
|
|
|
|
- span: 8
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "brand_name",
|
|
|
|
- label: "品牌",
|
|
|
|
- span: 8
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "cat_info",
|
|
|
|
- label: "分类",
|
|
|
|
- span: 8,
|
|
|
|
- render(cat_info) {
|
|
|
|
- return cat_info ? cat_info.map(({ name }) => name).join("_") : "";
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "unit",
|
|
|
|
- span: 8,
|
|
|
|
- label: "单位"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "is_stock",
|
|
|
|
- label: "是否库存品",
|
|
|
|
- span: 6,
|
|
|
|
- render(is_stock) {
|
|
|
|
- return h(ElTag, null, {
|
|
|
|
- default: () => (is_stock !== "0" ? "库存品" : "非库存品")
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // {
|
|
|
|
- // field: "supply_area",
|
|
|
|
- // label: "供货区域",
|
|
|
|
- // span: 6,
|
|
|
|
- // render(supply_area) {
|
|
|
|
- // return h(ElTag, null, {
|
|
|
|
- // default: () =>
|
|
|
|
- // supplyAreaOptions.find(({ id }) => supply_area === id)?.label || "--"
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- {
|
|
|
|
- field: "good_type",
|
|
|
|
- label: "是否定制",
|
|
|
|
- span: 8,
|
|
|
|
- render(good_type) {
|
|
|
|
- return h(ElTag, null, {
|
|
|
|
- default: () => (good_type !== "0" ? "是" : "否")
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "tax",
|
|
|
|
- label: "税点",
|
|
|
|
- append: "%",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "delivery_day",
|
|
|
|
- label: "物流时间",
|
|
|
|
- append: "天",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "lead_time",
|
|
|
|
- label: "供货周期",
|
|
|
|
- append: "天",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "sample_day",
|
|
|
|
- label: "调样周期",
|
|
|
|
- append: "天",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "exclusive",
|
|
|
|
- label: "专属类型",
|
|
|
|
- span: 6,
|
|
|
|
- render(exclusive) {
|
|
|
|
- return exclusive ? exclusive.map(({ name }) => name).join("/") : "";
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "weight",
|
|
|
|
- label: "商品总克重",
|
|
|
|
- append: "g",
|
|
|
|
- span: 6
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "noble",
|
|
|
|
- label: "贵金属信息",
|
|
|
|
- render(
|
|
|
|
- _,
|
|
|
|
- {
|
|
|
|
- noble_weight,
|
|
|
|
- noble_metal,
|
|
|
|
- noble_name,
|
|
|
|
- gold_price,
|
|
|
|
- is_gold_price,
|
|
|
|
- is_diff,
|
|
|
|
- config,
|
|
|
|
- other_config
|
|
|
|
- }
|
|
|
|
- ) {
|
|
|
|
- if (!noble_metal) {
|
|
|
|
- return "";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- const weight = noble_weight ? `${noble_weight}g-${noble_name}` : "";
|
|
|
|
-
|
|
|
|
- const price = gold_price ? gold_price : "0";
|
|
|
|
-
|
|
|
|
- const isGoldPrice = is_gold_price === "0" ? "不" : "";
|
|
|
|
-
|
|
|
|
- const diff = is_diff === "1" ? "有" : "无";
|
|
|
|
-
|
|
|
|
- return `${weight}${price}元/g-${isGoldPrice}启用实时金价-${diff}工差-${config}-${other_config}`;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "delivery_place_cn",
|
|
|
|
- label: "发货地",
|
|
|
|
- span: 8
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "customized",
|
|
|
|
- label: "工期",
|
|
|
|
- span: 8
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "cgder",
|
|
|
|
- label: "供应商负责人",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "good_creater",
|
|
|
|
- label: "商品创建人",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "after_sales",
|
|
|
|
- label: "售后说明",
|
|
|
|
- span: 24
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "good_remark",
|
|
|
|
- label: "商品备注",
|
|
|
|
- span: 24
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- field: "craft_desc",
|
|
|
|
- label: "工艺说明",
|
|
|
|
- span: 24
|
|
|
|
- }
|
|
|
|
-];
|
|
|
|
-
|
|
|
|
-//采反商品详情字段
|
|
|
|
-export const commodityFeedbackColumns: DescriptionColumns = [
|
|
|
|
- {
|
|
|
|
- field: "good_name",
|
|
|
|
- label: "商品名称",
|
|
|
|
- span: 24,
|
|
|
|
- render: (goodname, { spuCode, speclist }) => {
|
|
|
|
- const goodName = speclist
|
|
|
|
- ? speclist
|
|
|
|
- .map(({ spec_name, spec_value }) => `${spec_name}[${spec_value}]`)
|
|
|
|
- .join("_")
|
|
|
|
- : "";
|
|
|
|
-
|
|
|
|
- return createTooltip(
|
|
|
|
- goodname + "_" + goodName,
|
|
|
|
- "上线商品编号: " + spuCode,
|
|
|
|
- 360
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- field: "cat_info",
|
|
|
|
- label: "分类",
|
|
|
|
- span: 8,
|
|
|
|
- render(cat_info) {
|
|
|
|
- return cat_info ? cat_info.map(({ name }) => name).join("_") : "";
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- field: "brand_name",
|
|
|
|
- label: "品牌",
|
|
|
|
- span: 8
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- // {
|
|
|
|
- // field: "send_way",
|
|
|
|
- // label: "发货方式",
|
|
|
|
- // span: 8,
|
|
|
|
- // render(send_way) {
|
|
|
|
- // return h(ElTag, null, {
|
|
|
|
- // default: () =>
|
|
|
|
- // sendWayOptions.find(({ id }) => send_way === id)?.label || "--"
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- {
|
|
|
|
- field: "unit",
|
|
|
|
- label: "单位",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "tax",
|
|
|
|
- label: "税点",
|
|
|
|
- append: "%",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- // {
|
|
|
|
- // field: "pay_way",
|
|
|
|
- // label: "付款方式",
|
|
|
|
- // span: 4,
|
|
|
|
- // render(pay_way) {
|
|
|
|
- // return h(ElTag, null, {
|
|
|
|
- // default: () =>
|
|
|
|
- // payWayOptions.find(({ id }) => pay_way === id)?.label || "--"
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- field: "weight",
|
|
|
|
- label: "商品总克重",
|
|
|
|
- append: "g",
|
|
|
|
- span: 6
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- field: "addtime",
|
|
|
|
- label: "反馈时间",
|
|
|
|
- span: 6
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "expire_day",
|
|
|
|
- label: "竞价有效期",
|
|
|
|
- append: "天",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- field: "delivery_day",
|
|
|
|
- label: "物流时间",
|
|
|
|
- append: "天",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "work_day",
|
|
|
|
- label: "生产工期",
|
|
|
|
- append: "天",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "cgder",
|
|
|
|
- label: "供应商负责人",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "creater",
|
|
|
|
- label: "商品创建人",
|
|
|
|
- span: 4
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "supply_area",
|
|
|
|
- label: "供货区域",
|
|
|
|
- span: 4,
|
|
|
|
- render(supply_area) {
|
|
|
|
- return h(ElTag, null, {
|
|
|
|
- default: () =>
|
|
|
|
- supplyAreaOptions.find(({ id }) => supply_area === id)?.label || "--"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- field: "good_img",
|
|
|
|
- label: "商品图片",
|
|
|
|
- span: 24,
|
|
|
|
- render: good_img => {
|
|
|
|
- const previewSrcList = good_img ? good_img.split(",") : [];
|
|
|
|
- return previewSrcList.map(src =>
|
|
|
|
- h(ElImage, {
|
|
|
|
- previewSrcList: [src],
|
|
|
|
- src,
|
|
|
|
- previewTeleported: true,
|
|
|
|
- style: {
|
|
|
|
- height: "20px",
|
|
|
|
- width: "20px"
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "noble",
|
|
|
|
- label: "贵金属信息",
|
|
|
|
- span: 24,
|
|
|
|
- render(
|
|
|
|
- _,
|
|
|
|
- {
|
|
|
|
- noble_weight,
|
|
|
|
- noble_metal,
|
|
|
|
- noble_name,
|
|
|
|
- gold_price,
|
|
|
|
- is_gold_price,
|
|
|
|
- is_diff,
|
|
|
|
- config,
|
|
|
|
- other_config
|
|
|
|
- }
|
|
|
|
- ) {
|
|
|
|
- if (!noble_metal) {
|
|
|
|
- return "--";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- const weight = noble_weight ? `${noble_weight}g-${noble_name}` : "";
|
|
|
|
-
|
|
|
|
- const price = gold_price ? gold_price : "0";
|
|
|
|
-
|
|
|
|
- const isGoldPrice = is_gold_price === "0" ? "不" : "";
|
|
|
|
-
|
|
|
|
- const diff = is_diff === "1" ? "有" : "无";
|
|
|
|
-
|
|
|
|
- return `${weight}${price}元/g-${isGoldPrice}启用实时金价-${diff}工差-${config}-${other_config}`;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- field: "cost_desc",
|
|
|
|
- label: "工艺说明",
|
|
|
|
- span: 24
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: "remark",
|
|
|
|
- label: "采返备注",
|
|
|
|
- span: 24
|
|
|
|
- }
|
|
|
|
-];
|
|
|