feature/0423
wanghousheng 9 months ago
parent c9fa00edec
commit 685c66d19b
  1. 28
      src/views/goods/Create.vue
  2. 4
      src/views/server/Index.vue
  3. 16
      src/views/server/modules/Add.vue
  4. 22
      src/views/server/modules/Edit.vue

@ -36,7 +36,6 @@
:dropdownStyle="{ maxHeight: '500px', overflow: 'auto' }"
:treeData="formData.categoryList"
treeCheckable
treeCheckStrictly
allowClear
v-decorator="['categorys', { rules: [{ required: true, message: '请至少选择1个商品分类' }] }]"
></a-tree-select>
@ -377,7 +376,10 @@
<span>{{ province.name }}</span>
<template v-if="province.citys.length">
<span>(</span>
<span class="city-name" v-for="(city, cidx) in province.citys" :key="cidx"
<span
class="city-name"
v-for="(city, cidx) in province.citys"
:key="cidx"
>{{ city.name }}{{ province.citys.length > cidx + 1 ? '、' : '' }}</span
>
<span>)</span>
@ -534,7 +536,7 @@ import { AreasModal } from '@/components/Modal'
const defaultItem = {
key: 0,
region: [],
region_text: [],
region_text: []
}
export default {
components: {
@ -544,7 +546,7 @@ export default {
Ueditor,
InputNumberGroup,
MultiSpec,
AreasModal,
AreasModal
},
data () {
return {
@ -570,11 +572,11 @@ export default {
title: '销售区域',
dataIndex: 'region_text',
width: '400px',
scopedSlots: { customRender: 'region_text' },
},
scopedSlots: { customRender: 'region_text' }
}
],
//
citysCount: null,
citysCount: null
}
},
//
@ -632,7 +634,7 @@ export default {
//
const {
form: { validateFields },
ruleList,
ruleList
} = this
validateFields((errors, values) => {
// tab
@ -668,7 +670,7 @@ export default {
['goods_type', 'goods_name', 'categorys', 'imagesIds', 'delivery_id', 'is_ind_delivery_type', 'delivery_type'],
['spec_type', 'goods_price', 'is_restrict', 'restrict_total', 'restrict_single'],
['content'],
['alone_grade_equity', 'first_money', 'second_money', 'third_money'],
['alone_grade_equity', 'first_money', 'second_money', 'third_money']
]
const field = Object.keys(errors).shift()
for (const key in tabsFieldsMap) {
@ -722,7 +724,7 @@ export default {
//
handleAreaSubmit (result) {
const {
custom: { scene, item },
custom: { scene, item }
} = result
item.region = result.selectedCityIds
item.region_text = result.selectedText
@ -755,10 +757,10 @@ export default {
onOk () {
app.ruleList.splice(index, 1)
modal.destroy()
},
}
})
},
},
}
}
}
</script>
<style lang="less" scoped>

@ -127,8 +127,8 @@ const columns = [
scopedSlots: { customRender: 'server_price' }
},
{
title: '成本价',
dataIndex: 'cost_price',
title: '划线价',
dataIndex: 'line_price',
scopedSlots: { customRender: 'cost_price' }
},
{

@ -38,7 +38,7 @@
<a-input-number
:min="0.01"
:precision="2"
v-decorator="['cost_price', { initialValue: 1, rules: [{ required: true, message: '请输入成本价' }] }]"
v-decorator="['line_price', { initialValue: 1, rules: [{ required: true, message: '请输入划线价' }] }]"
/>
<span class="ml-10"></span>
</a-form-item>
@ -94,7 +94,7 @@ import { SelectImage, Ueditor } from '@/components'
export default {
components: {
SelectImage,
Ueditor,
Ueditor
},
props: {
//
@ -106,18 +106,18 @@ export default {
title: '',
//
labelCol: {
span: 7,
span: 7
},
//
wrapperCol: {
span: 13,
span: 13
},
// modal()
visible: false,
// modal() loading
confirmLoading: false,
//
form: this.$form.createForm(this),
form: this.$form.createForm(this)
}
},
methods: {
@ -141,7 +141,7 @@ export default {
e.preventDefault()
//
const {
form: { validateFields },
form: { validateFields }
} = this
validateFields((errors, values) => {
// api
@ -172,7 +172,7 @@ export default {
.finally((result) => {
this.confirmLoading = false
})
},
},
}
}
}
</script>

@ -34,11 +34,11 @@
/>
<span class="ml-10"></span>
</a-form-item>
<a-form-item label="成本价" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-form-item label="划线价" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number
:min="0.01"
:precision="2"
v-decorator="['cost_price', { initialValue: 1, rules: [{ required: true, message: '请输入成本价' }] }]"
v-decorator="['line_price', { initialValue: 1, rules: [{ required: true, message: '请输入划线价' }] }]"
/>
<span class="ml-10"></span>
</a-form-item>
@ -94,7 +94,7 @@ import { SelectImage, Ueditor } from '@/components'
export default {
components: {
SelectImage,
Ueditor,
Ueditor
},
props: {
//
@ -106,11 +106,11 @@ export default {
title: '',
//
labelCol: {
span: 7,
span: 7
},
//
wrapperCol: {
span: 13,
span: 13
},
// modal()
visible: false,
@ -119,7 +119,7 @@ export default {
//
form: this.$form.createForm(this),
//
record: {},
record: {}
}
},
methods: {
@ -145,7 +145,7 @@ export default {
//
setFieldsValue () {
const {
form: { setFieldsValue },
form: { setFieldsValue }
} = this
//
this.$nextTick(() => {
@ -161,7 +161,7 @@ export default {
'content',
'comment_rate',
'sold',
'comment_num',
'comment_num'
])
)
})
@ -171,7 +171,7 @@ export default {
e.preventDefault()
//
const {
form: { validateFields },
form: { validateFields }
} = this
validateFields((errors, values) => {
// api
@ -202,7 +202,7 @@ export default {
.finally((result) => {
this.confirmLoading = false
})
},
},
}
}
}
</script>

Loading…
Cancel
Save