|
@@ -22,10 +22,10 @@
|
|
|
:model="ruleForm"
|
|
|
status-icon
|
|
|
:rules="rulesThis"
|
|
|
- label-width="80px"
|
|
|
+ label-width="130px"
|
|
|
class="demo-ruleForm"
|
|
|
>
|
|
|
- <el-form-item label="商品编号" prop="skuCode">
|
|
|
+ <el-form-item label="商品编号" prop="skuCode" label-width="80px">
|
|
|
<el-input
|
|
|
v-model="ruleForm.skuCode"
|
|
|
placeholder="商品编号"
|
|
@@ -33,23 +33,8 @@
|
|
|
disabled
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="商品名称" prop="good_name">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.good_name"
|
|
|
- disabled
|
|
|
- placeholder="商品名称"
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="活动库存" prop="activity_stock">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.activity_stock"
|
|
|
- placeholder="活动库存"
|
|
|
- disabled
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="起订量" prop="moq_num">
|
|
|
+ <div style="display:flex">
|
|
|
+ <el-form-item label="起订量" prop="moq_num" label-width="80px">
|
|
|
<el-input
|
|
|
v-model="ruleForm.moq_num"
|
|
|
disabled
|
|
@@ -57,7 +42,7 @@
|
|
|
maxlength="100"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="成本单价" prop="cost_price">
|
|
|
+ <el-form-item label="成本单价" prop="cost_price" label-width="80px">
|
|
|
<el-input
|
|
|
v-model="ruleForm.cost_price"
|
|
|
disabled
|
|
@@ -67,7 +52,8 @@
|
|
|
<template slot="append">元</template></el-input
|
|
|
>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="非活动价" prop="sale_price">
|
|
|
+ </div>
|
|
|
+ <el-form-item label="非活动价" prop="sale_price" label-width="80px">
|
|
|
<el-input
|
|
|
v-model="ruleForm.sale_price"
|
|
|
disabled
|
|
@@ -77,7 +63,35 @@
|
|
|
<template slot="append">元</template></el-input
|
|
|
>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="活动价" prop="activity_price">
|
|
|
+ <el-form-item label="是否使用结算单价" prop="is_activity">
|
|
|
+ <el-select
|
|
|
+ v-model="ruleForm.is_activity"
|
|
|
+ style="width:100%"
|
|
|
+ placeholder="是否使用活动单价"
|
|
|
+ maxlength="100"
|
|
|
+ >
|
|
|
+ <el-option value="0" label="否" />
|
|
|
+ <el-option value="1" label="是" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="结算单价" prop="settle_price" label-width="80px">
|
|
|
+ <digital-input
|
|
|
+ :disabled="ruleForm.is_activity === '0'"
|
|
|
+ :values="ruleForm.is_activity === '0' ? '0' : ruleForm.settle_price"
|
|
|
+ :placeholder="'结算单价'"
|
|
|
+ :min="0"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'large'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="budget_total_change"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="活动价" prop="activity_price" label-width="80px">
|
|
|
<digital-input
|
|
|
:values="ruleForm.activity_price"
|
|
|
:placeholder="'活动价'"
|
|
@@ -128,6 +142,8 @@ export default {
|
|
|
cost_price: "",
|
|
|
sale_price: "",
|
|
|
activity_price: "",
|
|
|
+ is_activity:'1',
|
|
|
+ settle_price:''
|
|
|
},
|
|
|
rulesThis: this.rules,
|
|
|
rules: {
|
|
@@ -155,6 +171,9 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ budget_total_change(e){
|
|
|
+ this.ruleForm.settle_price = e + ''
|
|
|
+ },
|
|
|
async initForm() {
|
|
|
this.loading = true;
|
|
|
this.rulesThis = this.rules;
|
|
@@ -194,7 +213,10 @@ export default {
|
|
|
let model = JSON.parse(JSON.stringify(this.ruleForm));
|
|
|
this.showModelThis = false;
|
|
|
// 刷新
|
|
|
- this.$emit("refresh", model);
|
|
|
+ this.$emit("refresh", {
|
|
|
+ ...model,
|
|
|
+ settle_price:this.ruleForm.is_activity === '0' ? '0' : this.ruleForm.settle_price
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
console.log("error submit!!");
|