style:删除无用代码和文件

This commit is contained in:
wangsongsole 2022-10-18 10:33:43 +08:00
parent 3895b3a94c
commit 92a2813fd0
8 changed files with 0 additions and 3409 deletions

View File

@ -89,13 +89,11 @@ export default class topNav extends React.Component {
let breakflag =
pathnamestr.includes("add") ||
pathnamestr.includes("aid") ||
// pathnamestr.includes("exchangecode-copyCode") ||
pathnamestr.includes("exchangecode-exchangecodeAdd") ||
pathnamestr.includes("distributor-edit") ||
pathnamestr.includes("key-list") ||
pathnamestr.includes("key-detail") ||
pathnamestr.includes("key-edit") ||
// pathnamestr.includes("exchangecode-edit") ||
pathnamestr.includes("plan-edit") ||
pathnamestr.includes("product-edit") ||
pathnamestr.includes("coupon-commodity")
@ -107,7 +105,6 @@ export default class topNav extends React.Component {
pathnamestr.includes("role-add") ||
pathnamestr.includes("distributor-add") ||
pathnamestr.includes("subaccount-add") ||
// pathnamestr.includes("exchangecode-edit") ||
pathnamestr.includes("plan-edit") ||
pathnamestr.includes("key-list") ||
pathnamestr.includes("exchange-addcommodity")

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +0,0 @@
.addkey-btn-group {
margin-left: 15px;
margin-top: 15px;
margin-bottom: 40px;
button {
width: 100px;
height: 36px;
}
}
.btn-add {
width: 50%;
margin: 0 auto;
height: 36px;
margin-top: 20px;
text-align: center;
line-height: 36px;
background-color: rgb(249, 250, 252);
}
#addkey .zent-radio-button--disabled[data-zv="9.11.0"].zent-radio-button--checked {
color: #8a96aa;
background: #dfe8fc !important;
border: 1px solid #8a96aa !important;
}
.line-value {
width: 508px;
text-align: left;
height: 36px;
border-bottom: 1px solid #e0e0e0;
padding-left: 12px;
}
.goods-boxs {
display: flex;
justify-content: flex-start;
}

View File

@ -1,152 +0,0 @@
export const Column2 = [
{
title: '商品ID',
name: 'product_id',
prop: 'product_id',
width: 'auto',
type: 'normal'
},
{
title: '商品名称',
width: 'auto',
prop: 'product_name',
name: 'product_name',
type: 'normal'
},
{
title: '立减金平台批次号',
width: '250px',
prop: 'channel_activity_id',
name: 'channel_activity_id',
type: 'normal'
},
{
title: '类型',
width: 'auto',
prop: 'type',
name: 'type',
type: 'slot'
},
{
title: '上游平台',
width: 'auto',
prop: 'upstream',
name: 'upstream',
type: 'normal'
},
{
title: '有效时间段',
width: '575px',
prop: 'effectDate',
name: 'effectDate',
type: 'normal'
},
{
title: '当前成本价格',
prop: 'cost_price',
name: 'cost_price',
width: '200px',
type: 'slot'
},
{
title: '合同价',
name: 'contract_price',
prop: 'contract_price',
type: 'normal',
width: 'auto'
},
{
title: '商品官方价',
type: 'normal',
prop: 'official_price',
width: 'auto'
},
{
title: '库存',
type: 'normal',
prop: 'quantity',
width: 'auto'
},
{
title: '操作',
prop: 'edit',
name: 'edit',
type: 'slot',
width: 'auto'
}
]
export const Column = [
{
title: '兑换名称',
name: 'title',
prop: 'title',
type: 'normal',
width: 'auto'
},
{
title: '兑换码范围',
type: 'normal',
prop: 'range',
width: 'auto'
},
{
title: '有效开始日期',
prop: 'begin_time',
name: 'begin_time',
width: 'auto',
type: 'normal'
},
{
title: '有效结束日期',
name: 'end_time',
prop: 'end_time',
type: 'normal',
width: 'auto'
},
{
title: '兑换码数量',
name: 'quantity',
type: 'normal',
prop: 'quantity',
defaultText: 'PM',
width: 'auto'
},
{
title: '绑定数',
prop: 'restrict',
name: 'restrict',
type: 'slot',
width: 'auto'
},
{
title: '操作',
prop: 'edit',
name: 'edit',
type: 'slot',
width: 'auto'
}
]
export const rules = {
bind_object: [{ type: 'required', message: '请选择绑定类型' }]
}
//基本信息
export const codeInfo = {
code_name: [{ type: 'required', message: '请输入兑换码名称' }],
issued: [
{ type: 'required', message: '请输入发放总量' },
{
type: 'regExp',
message: '请输入正整数',
reg: '^([1-9][0-9]*){1,3}$'
}
]
}
//基本规则
export const rulesInfo = {
date_time: [{ type: 'required', message: '请选择生效时间段' }],
rank: [{ type: 'required', message: '请选择商品范围' }]
}

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
.edit-btnList{
width: 90%;
margin: 0 auto;
button{
width: 100px;
}
.goods-boxs{
display: flex;
justify-content: flex-start;
}
}

View File

@ -127,134 +127,6 @@ export default class exchangeAdd extends React.Component {
/* 请求详情 */
getDetailFunction() {
// let approval_id = sessionStorage.getItem("approval_id")
// let approval_status = sessionStorage.getItem("approval_status")
/* 判断是否是在审批中、状态是否时编辑 */
// if (false) {
// //
// getApprovalsInfo(approval_id)
// .then((res) => {
// handelResponse(
// res,
// (req, msg) => {
// this.getResellerFunction(req.reseller_id)
// req.update_product = [...this.transFormData1(req.update_product)]
// req.new_product = [...this.transFormData1(req.new_product, true)]
// let codeInfo = {
// code_name: req.title,
// issued: req.quantity,
// stock: req.stock,
// describe: req.describe,
// date_time: [req.begin_time, req.end_time],
// range: req.update_product
// }
// if (req.new_product.length > 0) {
// req.new_product = _.map(req.new_product, (item) => {
// item.checked = false
// return item
// })
// codeInfo.range = codeInfo.range.concat(req.new_product)
// }
// let new_ids = _.map(req.new_product, (o) => {
// return o.only
// })
// this.setState({ new_product: new_ids })
// let delete_product = req.delete_product
// let payment_direction = req.payment_direction
// getCodesDetail(code_batch_id)
// .then((res) => {
// handelResponse(
// res,
// (req, msg) => {
// codeInfo.stock = req.stock
// this.setState({
// plan_time: [req.plan.start_time, req.plan.end_time]
// })
// let reqCopy = _.cloneDeep(req)
// const resData = this.transFormData(reqCopy)
// this.setState({ oldTable: resData })
// let deleteArr = []
// for (let i = 0; i < delete_product.length; i++) {
// let deleteData = resData.find(
// (o) => o.only == delete_product[i]
// )
// deleteData.checked = false
// deleteArr.push(deleteData)
// }
// this.setState({ codeInfo: codeInfo })
// this.setState({ isload: true })
// codeInfo.range = codeInfo.range.concat(deleteArr)
// let table = _.map(codeInfo.range, (res) => {
// let obj = resData.find((o) => o.only == res.only)
// res.usage = obj ? obj.usage : 0
// res.stock = obj ? obj.stock : res.quantity - res.usage
// res.checked = res.hasOwnProperty("checked")
// ? res.checked
// : true
// if (approval_status == 7 && obj) {
// res.checked = true
// }
// return res
// })
// this.setState({ deleteProduct: [] })
// this.setState({ tempdata: codeInfo.range })
// let arr = []
// let temp = []
// _.map(codeInfo.range, (res) => {
// let obj = {}
// obj.key = res.only
// obj.text = res.product_name
// if (new_ids.indexOf(res.only) < 0) {
// this.state.oldProduct.push(res.id)
// }
// if (
// table.find((o) => o.only == res.only).checked == true
// ) {
// temp.push(obj)
// }
// arr.push(obj)
// return obj
// })
// this.setState({ rankoptions: arr })
// this.setState({ rank: temp })
// if (payment_direction) {
// let index =
// this.state.payment_direction.indexOf(
// payment_direction
// )
// this.setState({ payType: index + 1 })
// }
// sessionStorage.setItem(
// "productData",
// JSON.stringify(codeInfo.range)
// )
// sessionStorage.setItem(
// "knockGoldData",
// JSON.stringify(codeInfo.range)
// )
// },
// (err) => {}
// )
// })
// .catch((err) => {})
// },
// (err) => {}
// )
// })
// .catch((err) => {})
// } else {
getCodesDetail(code_batch_id)
.then((res) => {
handelResponse(
@ -438,60 +310,6 @@ export default class exchangeAdd extends React.Component {
return newData
}
/* 无审核转换数据 */
// transFormData(reqCopy) {
// const resData = []
// reqCopy.goods.map((item) => {
// /* type 1 2 便 */
// /* only product_id channel_activity_id */
// if (item.type === 1) {
// item.entity.upstream = ""
// item.entity.only = item.entity.product_id
// item.entity.id = item.id
// item.entity.type = item.type
// item.entity.weight = item.weight
// resData.push(item.entity)
// } else if (item.type === 2) {
// /* id */
// if (this.state.isState === 1) delete item.entity.id
// item.entity.weight = item.weight
// resData.push({
// origin: item.entity,
// type: item.type,
// product_id: item.entity.goods_id,
// product_type_text: "",
// only: item.entity.channel_activity_id,
// id: item.entity.goods_id,
// upstream: String(item.entity.channel) === "1" ? "" : "",
// code_batch_id: item.code_batch_id,
// contract_price: item.entity.price,
// create_time: item.create_time,
// official_price: item.entity.reduce_amount,
// channel_activity_id: item.entity.channel_activity_id,
// product_name: item.entity.batch_goods_name,
// quantity: item.entity.stock,
// stock: parseInt(
// divNum(item.entity.all_budget, item.entity.reduce_amount) -
// divNum(item.entity.used_amount, item.entity.reduce_amount)
// ),
// usage: parseInt(
// divNum(item.entity.all_budget, item.entity.reduce_amount) -
// divNum(
// item.entity.all_budget - item.entity.used_amount,
// item.entity.reduce_amount
// )
// ),
// effectDate:
// item.entity.time_limit.effect_time.start_time +
// " " +
// item.entity.time_limit.effect_time.end_time //
// })
// }
// })
// return resData
// }
/* select事件 */
onRankChange(e) {
_.forEach(this.state.tempdata, (item) => {

View File

@ -3,7 +3,6 @@ import Overview from "@/pages/overview/main/main"
import Distributor from "@/pages/distributor/main/main"
import ExchangeCodeList from "@/pages/exchangecode/list/list"
import ExchangeCodeAdd from "@/pages/exchangecode/add/add"
// import ExchangeCodeEdit from "@/pages/exchangecode/edit/edit"
import ExchangeCommodity from "@/pages/exchangecode/commodity/commodity"
import ProductEdit from "@/pages/exchangecode/commodity/goodedit.js"
import ExchangePage from "@/pages/exchangepage/main/main"
@ -36,7 +35,6 @@ import DistriButorAdd from "@/pages/distributor/add/add"
import DistriButorEdit from "@/pages/distributor/add/add"
import MyTempMouldAdd from "@/pages/exchangepage/template/main.js"
import MyExChangeTemplate from "@/pages/exchangepage/mytemplate/main.js"
// import CopyCode from "@/pages/exchangecode/copyCode/index";
import ExchangeCodeAdds from "@/pages/exchangecode/exchangecodeAdd"
import CouponList from "@/pages/coupon/list"
import CouponAddEdit from "@/pages/coupon/addEdit"
@ -214,16 +212,6 @@ const router = [
component: ExchangeCodeAdd,
meta: { exact: true }
},
// {
// path: "/home/exchangecode-edit",
// component: ExchangeCodeEdit,
// meta: { exact: true }
// },
// {
// path: "/home/exchangecode-copyCode",
// component: CopyCode,
// meta: { exact: true }
// },
{
path: "/home/exchange-addcommodity",
component: ExchangeCommodity,