优化立减金代码

This commit is contained in:
wangsongsole 2022-05-19 11:19:00 +08:00
parent d34aef1039
commit 2921d09dd1
1 changed files with 3 additions and 69 deletions

View File

@ -65,12 +65,6 @@ export default class addKnockGold extends Component {
effect_date_type: '', //
effect_date: '' //
},
cur_product: {},
productOption: [],
products: [],
describe_url: '',
loadshow: false,
productpic: [],
copyEarly_per: '', //
visible: false, //
warningInput: '', //
@ -108,41 +102,11 @@ export default class addKnockGold extends Component {
}
this.setState({ model: model })
}
this.getProductInfo()
this.getUserSelectList()
}
//
getProductInfo() {
// let productList = sessionStorage.getItem('productsList')
// productList = JSON.parse(productList)
// let product_data = []
// if (sessionStorage.getItem('productData')) {
// product_data = JSON.parse(sessionStorage.getItem('productData'))
// }
// let checked_product = product_data ? product_data : []
// let arr = []
// this.setState({ products: productList })
// _.map(productList, (res) => {
// let obj = {}
// obj.key = res.id
// obj.text = res.title
// obj.disabled =
// checked_product.findIndex((item) => {
// return item.product_id === res.id
// }) > -1
// if (obj.disabled) {
// }
// arr.push(obj)
// return obj
// })
// this.setState({ productOption: arr })
// if (this.state.model.product_id) {
// let cur_product = arr.find((item) => {
// return item.key === this.state.model.product_id
// })
// this.setState({ cur_product: cur_product })
// }
}
//
getUserSelectList() {}
/* x时间控件禁用 */
onDisabledRange = (date, type) => {
@ -279,36 +243,6 @@ export default class addKnockGold extends Component {
return blr
}
// onProductChange(e) {
// console.log('e ===>', e)
// this.setState({ cur_product: e })
// let cur_product = this.state.products.find((item) => {
// return item.id === e.key
// })
// let picItem = window.goods.find((item) => {
// return item.id === cur_product.product_category_id
// })
// console.log('picItem ===>', picItem)
// let model2 = this.state.model
// model2.product_id = cur_product.id
// model2.product_type = cur_product.type
// model2.contract_price = this.state.model.contract_price
// model2.official_price = cur_product.official_price
// model2.cost_price = cur_product.cost_price
// model2.quantity = this.state.model.quantity
// model2.product_name = cur_product.title
// model2.account_type = cur_product.account_type
// model2.show_url = picItem ? picItem.pic : ''
// model2.describe_url = ''
// model2.map_product_name = cur_product.title
// model2.detail_url = ''
// this.setState({ model: model2 })
// this.setState({
// show_url: picItem ? [{ src: picItem.pic, id: new Date().getTime() }] : []
// })
// }
/* 输入事件和选择事件统一处理 */
onHandleChange(value, key) {
let model2 = this.state.model