|
@@ -17,15 +17,15 @@
|
|
|
:rules="rules"
|
|
|
>
|
|
|
<div style="margin-bottom: 10px;text-align: center;">
|
|
|
- <strong>近30天下单额</strong>
|
|
|
+ <strong>近{{ form&&form.day_limit||'' }}天下单额</strong>
|
|
|
</div>
|
|
|
- <a-form-model-item label="LV1" prop="lv1" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
- <a-input-number style="width:80%;" v-model.trim="form.lv1" :precision="2" allowClear placeholder="请输入LV1下单额"/>
|
|
|
+ <a-form-model-item label="LV1" prop="LV1" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
+ <a-input-number style="width:80%;" v-model.trim="form.LV1" :precision="2" allowClear placeholder="请输入LV1下单额"/>
|
|
|
元以下
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="LV2" prop="lv2" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
+ <a-form-model-item label="LV2" prop="LV2" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
<a-input-group style="width: 90%;" compact>
|
|
|
- <a-input style="width: 43%; text-align: center;pointer-events: none; backgroundColor: #f8f8f8;color:#666;" disabled v-model.trim="form.lv1"/>
|
|
|
+ <a-input style="width: 43%; text-align: center;pointer-events: none; backgroundColor: #f8f8f8;color:#666;" disabled v-model.trim="form.LV1"/>
|
|
|
<a-input
|
|
|
style=" width: 12%; pointer-events: none; backgroundColor: #fff"
|
|
|
placeholder="至"
|
|
@@ -33,17 +33,17 @@
|
|
|
/>
|
|
|
<a-input-number
|
|
|
:precision="2"
|
|
|
- :min="form.lv1"
|
|
|
+ :min="form.LV1"
|
|
|
style="width: 43%; text-align: center"
|
|
|
- v-model.trim="form.lv2"
|
|
|
+ v-model.trim="form.LV2"
|
|
|
allowClear
|
|
|
placeholder="请输入LV2下单额"/>
|
|
|
</a-input-group>
|
|
|
元
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="LV3" prop="lv3" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
+ <a-form-model-item label="LV3" prop="LV3" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
<a-input-group style="width: 90%;" compact>
|
|
|
- <a-input style=" width: 43%; text-align: center;pointer-events: none; backgroundColor: #f8f8f8;color:#666;" disabled v-model.trim="form.lv2"/>
|
|
|
+ <a-input style=" width: 43%; text-align: center;pointer-events: none; backgroundColor: #f8f8f8;color:#666;" disabled v-model.trim="form.LV2"/>
|
|
|
<a-input
|
|
|
style=" width: 12%; pointer-events: none; backgroundColor: #fff"
|
|
|
placeholder="至"
|
|
@@ -51,17 +51,17 @@
|
|
|
/>
|
|
|
<a-input-number
|
|
|
:precision="2"
|
|
|
- :min="form.lv2"
|
|
|
+ :min="form.LV2"
|
|
|
style=" width: 43%; text-align: center"
|
|
|
- v-model.trim="form.lv3"
|
|
|
+ v-model.trim="form.LV3"
|
|
|
allowClear
|
|
|
placeholder="请输入LV3下单额"/>
|
|
|
</a-input-group>
|
|
|
元
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="LV4" prop="lv4" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
+ <a-form-model-item label="LV4" prop="LV4" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
<a-input-group style="width: 90%;" compact>
|
|
|
- <a-input style=" width: 43%; text-align: center;pointer-events: none; backgroundColor: #f8f8f8;color:#666;" disabled v-model.trim="form.lv3"/>
|
|
|
+ <a-input style=" width: 43%; text-align: center;pointer-events: none; backgroundColor: #f8f8f8;color:#666;" disabled v-model.trim="form.LV3"/>
|
|
|
<a-input
|
|
|
style=" width: 12%; pointer-events: none; backgroundColor: #fff"
|
|
|
placeholder="至"
|
|
@@ -69,16 +69,16 @@
|
|
|
/>
|
|
|
<a-input-number
|
|
|
:precision="2"
|
|
|
- :min="form.lv3"
|
|
|
+ :min="form.LV3"
|
|
|
style=" width: 43%; text-align: center"
|
|
|
- v-model.trim="form.lv4"
|
|
|
+ v-model.trim="form.LV4"
|
|
|
allowClear
|
|
|
placeholder="请输入LV4下单额"/>
|
|
|
</a-input-group>
|
|
|
元
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="LV5" :label-col="{span: 4}" :wrapper-col="{span: 18}">
|
|
|
- <a-input style="width: 80%; text-align: center;pointer-events: none; backgroundColor: #f8f8f8;color:#666;" disabled v-model.trim="form.lv4"/>
|
|
|
+ <a-input style="width: 80%; text-align: center;pointer-events: none; backgroundColor: #f8f8f8;color:#666;" disabled v-model.trim="form.LV4"/>
|
|
|
元以上
|
|
|
</a-form-model-item>
|
|
|
|
|
@@ -93,7 +93,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { saveHw, shelfHWDetail } from '@/api/shelf.js'
|
|
|
+import { queryStoreLevelParamMap, saveStoreLevelParam } from '@/api/report.js'
|
|
|
export default {
|
|
|
name: 'AddHWModal',
|
|
|
props: {
|
|
@@ -121,24 +121,26 @@ export default {
|
|
|
roleList: [],
|
|
|
pageInfo: null,
|
|
|
form: {
|
|
|
- lv1: '',
|
|
|
- lv2: '',
|
|
|
- lv3: '',
|
|
|
- lv4: ''
|
|
|
+ LV1: '',
|
|
|
+ LV2: '',
|
|
|
+ LV3: '',
|
|
|
+ lv4: '',
|
|
|
+ LV5: '',
|
|
|
+ day_limit: '30'
|
|
|
},
|
|
|
rules: {
|
|
|
- lv1: [{ required: true, message: '请输入LV1下单金额', trigger: 'blur' }],
|
|
|
- lv2: [{ required: true, message: '请输入LV2下单金额', trigger: 'blur' }],
|
|
|
- lv3: [{ required: true, message: '请输入LV3下单金额', trigger: 'blur' }],
|
|
|
- lv4: [{ required: true, message: '请输入LV4下单金额', trigger: 'blur' }]
|
|
|
+ LV1: [{ required: true, message: '请输入LV1下单金额', trigger: 'blur' }],
|
|
|
+ LV2: [{ required: true, message: '请输入LV2下单金额', trigger: 'blur' }],
|
|
|
+ LV3: [{ required: true, message: '请输入LV3下单金额', trigger: 'blur' }],
|
|
|
+ LV4: [{ required: true, message: '请输入LV4下单金额', trigger: 'blur' }]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
// 查询货位详情
|
|
|
- getShelfHWDetail () {
|
|
|
+ getDetail () {
|
|
|
this.spinning = true
|
|
|
- shelfHWDetail({ shelfPlaceSn: this.nowData.shelfPlaceSn }).then(res => {
|
|
|
+ queryStoreLevelParamMap().then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.form = Object.assign({}, res.data)
|
|
|
}
|
|
@@ -150,11 +152,8 @@ export default {
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
- const params = JSON.parse(JSON.stringify(_this.form))
|
|
|
- params.shelfSn = _this.shelfSn ? _this.shelfSn : null
|
|
|
- console.log(params.id, params.shelfSn, '------------编辑新增')
|
|
|
_this.spinning = true
|
|
|
- saveHw(params).then(res => {
|
|
|
+ saveStoreLevelParam(_this.form).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$emit('refresh')
|
|
@@ -183,9 +182,7 @@ export default {
|
|
|
this.form = {}
|
|
|
this.$emit('close')
|
|
|
} else {
|
|
|
- if (this.nowData && this.nowData.id) { // 编辑
|
|
|
- this.getShelfHWDetail()
|
|
|
- }
|
|
|
+ this.getDetail()
|
|
|
}
|
|
|
}
|
|
|
}
|