|
@@ -5,7 +5,7 @@
|
|
|
:center="true"
|
|
|
align="left"
|
|
|
top="18vh"
|
|
|
- width="500px"
|
|
|
+ width="700px"
|
|
|
:close-on-click-modal="false"
|
|
|
:visible.sync="showModelThis"
|
|
|
element-loading-text="拼命加载中"
|
|
@@ -25,71 +25,145 @@
|
|
|
label-width="80px"
|
|
|
class="demo-ruleForm"
|
|
|
>
|
|
|
- <el-form-item label="起订量" prop="min_num">
|
|
|
- <digital-input
|
|
|
- :values="ruleForm.min_num"
|
|
|
- :placeholder="'起订量'"
|
|
|
- :min="0"
|
|
|
- :name="'ruleForm.min_num'"
|
|
|
- :disabled="false"
|
|
|
- :max="100000000000"
|
|
|
- :position="'right'"
|
|
|
- :precision="0"
|
|
|
- :size="'mini'"
|
|
|
- :controls="false"
|
|
|
- :append="''"
|
|
|
- @reschange="number_change($event, 'min_num')"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="成本合计" prop="nake_fee">
|
|
|
- <digital-input
|
|
|
- :values="ruleForm.nake_fee"
|
|
|
- :placeholder="'成本合计'"
|
|
|
- :min="0"
|
|
|
- :name="'ruleForm.nake_fee'"
|
|
|
- :disabled="false"
|
|
|
- :max="100000000000"
|
|
|
- :position="'right'"
|
|
|
- :precision="2"
|
|
|
- :size="'mini'"
|
|
|
- :controls="false"
|
|
|
- :append="'元'"
|
|
|
- @reschange="number_change($event, 'nake_fee')"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="工艺费" prop="cost_fee">
|
|
|
- <digital-input
|
|
|
- :values="ruleForm.cost_fee"
|
|
|
- :placeholder="'工艺费'"
|
|
|
- :min="0"
|
|
|
- :name="'ruleForm.cost_fee'"
|
|
|
- :disabled="false"
|
|
|
- :max="100000000000"
|
|
|
- :position="'right'"
|
|
|
- :precision="2"
|
|
|
- :size="'mini'"
|
|
|
- :controls="false"
|
|
|
- :append="'元'"
|
|
|
- @reschange="number_change($event, 'cost_fee')"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="物流费" prop="delivery_fee">
|
|
|
- <digital-input
|
|
|
- :values="ruleForm.delivery_fee"
|
|
|
- :placeholder="'物流费'"
|
|
|
- :min="0"
|
|
|
- :name="'ruleForm.delivery_fee'"
|
|
|
- :disabled="false"
|
|
|
- :max="100000000000"
|
|
|
- :position="'right'"
|
|
|
- :precision="2"
|
|
|
- :size="'mini'"
|
|
|
- :controls="false"
|
|
|
- :append="'元'"
|
|
|
- @reschange="number_change($event, 'delivery_fee')"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="起订量" prop="min_num">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.min_num"
|
|
|
+ :placeholder="'起订量'"
|
|
|
+ :min="0"
|
|
|
+ :name="'ruleForm.min_num'"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="0"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="''"
|
|
|
+ @reschange="number_change($event, 'min_num')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="裸价" prop="nake_price">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.nake_price"
|
|
|
+ :placeholder="'裸价'"
|
|
|
+ :min="0"
|
|
|
+ :name="'ruleForm.nake_price'"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="number_change($event, 'nake_price')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="证书费" prop="cert_fee">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.cert_fee"
|
|
|
+ :placeholder="'证书费'"
|
|
|
+ :min="0"
|
|
|
+ :name="'ruleForm.cert_fee'"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="number_change($event, 'cert_fee')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="包装费" prop="packing_fee">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.nake_fee"
|
|
|
+ :placeholder="'packing_fee'"
|
|
|
+ :min="0"
|
|
|
+ :name="'ruleForm.packing_fee'"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="number_change($event, 'packing_fee')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="工艺费" prop="cost_fee">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.cost_fee"
|
|
|
+ :placeholder="'工艺费'"
|
|
|
+ :min="0"
|
|
|
+ :name="'ruleForm.cost_fee'"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="number_change($event, 'cost_fee')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="物流费" prop="delivery_fee">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.delivery_fee"
|
|
|
+ :placeholder="'物流费'"
|
|
|
+ :min="0"
|
|
|
+ :name="'ruleForm.delivery_fee'"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="number_change($event, 'delivery_fee')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="系统成本合计" label-width="110px" required>
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.new_nake_fee"
|
|
|
+ disabled
|
|
|
+ placeholder="系统成本合计"
|
|
|
+ >
|
|
|
+ <template slot="append">元</template></el-input
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="成本合计" prop="nake_fee">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.nake_fee"
|
|
|
+ :placeholder="'成本合计'"
|
|
|
+ :min="0"
|
|
|
+ :name="'ruleForm.nake_fee'"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="number_change($event, 'nake_fee')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
<el-col :span="24" style="text-align: right">
|
|
@@ -108,7 +182,7 @@
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
export default {
|
|
|
name: "brand",
|
|
|
- props: ["showModel", "index", "sitem"],
|
|
|
+ props: ["showModel", "index", "sitem", "goodsitem"],
|
|
|
mixins: [resToken],
|
|
|
data() {
|
|
|
const validate_num_0 = (rule, value, callback) => {
|
|
@@ -120,6 +194,14 @@ export default {
|
|
|
callback();
|
|
|
}
|
|
|
};
|
|
|
+ const validate_num = (rule, value, callback) => {
|
|
|
+ const { required } = rule;
|
|
|
+ if (required && value === "") {
|
|
|
+ callback(new Error("不能为空!"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
loading: false,
|
|
|
title: "",
|
|
@@ -130,8 +212,35 @@ export default {
|
|
|
min_num: [
|
|
|
{ required: true, validator: validate_num_0, trigger: "blur" },
|
|
|
],
|
|
|
+ nake_price: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validate_num,
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ //固定成本
|
|
|
+ cert_fee: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validate_num,
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ packing_fee: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validate_num,
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
cost_fee: [
|
|
|
- { required: true, message: "工艺费不能为空!", trigger: "blur" },
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validate_num,
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
],
|
|
|
nake_fee: [
|
|
|
{ required: true, message: "成本合计不能为空!", trigger: "blur" },
|
|
@@ -208,6 +317,32 @@ export default {
|
|
|
this.ruleForm[key] = e + "" || "0";
|
|
|
this.$refs.ruleForm.validateField(key);
|
|
|
},
|
|
|
+ async get_new_nake_price() {
|
|
|
+ const { nake_price, cert_fee, packing_fee, cost_fee, delivery_fee } =
|
|
|
+ this.ruleForm;
|
|
|
+ const { mark_fee, is_gold_price, noble_metal, cat_id, noble_weight } =
|
|
|
+ this.goodsitem;
|
|
|
+ let is_noble = false,
|
|
|
+ new_p = 0;
|
|
|
+ if (cat_id && cat_id.length > 0) {
|
|
|
+ cat_id.foreach((a) => {
|
|
|
+ if (a === "6") {
|
|
|
+ is_noble = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // this.ruleForm.new_nake_fee
|
|
|
+ new_p =
|
|
|
+ packing_fee * 100 +
|
|
|
+ nake_price * 100 +
|
|
|
+ mark_fee * 100 +
|
|
|
+ cert_fee * 100 +
|
|
|
+ delivery_fee * 100;
|
|
|
+ if (is_noble) {
|
|
|
+ // new_p+=is_gold_price
|
|
|
+ }
|
|
|
+ this.ruleForm.new_nake_fee = parseFloat(new_p);
|
|
|
+ },
|
|
|
async submitForm() {
|
|
|
await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
if (valid) {
|