|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<div v-loading="loading">
|
|
|
+ {{ sitem.is_gold_price }}
|
|
|
<el-form
|
|
|
:model="addrForm"
|
|
|
ref="addrForm"
|
|
@@ -50,8 +51,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="new_sale_price" show-overflow-tooltip>
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
- <span>系统售价(元)</span>
|
|
|
- <el-popover
|
|
|
+ <span>系统售价</span>
|
|
|
+ <!-- <el-popover
|
|
|
placement="top-start"
|
|
|
title="计算公式:"
|
|
|
width="300"
|
|
@@ -83,7 +84,7 @@
|
|
|
</div>
|
|
|
|
|
|
<i class="el-icon-question tb-icon" slot="reference"></i>
|
|
|
- </el-popover>
|
|
|
+ </el-popover> -->
|
|
|
</template>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
@@ -106,7 +107,12 @@
|
|
|
<span v-show="!scope.row.edit">{{ scope.row.new_sale_price }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="sale_price" label="售价" show-overflow-tooltip>
|
|
|
+ <el-table-column
|
|
|
+ prop="sale_price"
|
|
|
+ label="售价"
|
|
|
+ show-overflow-tooltip
|
|
|
+ v-if="sitem && sitem.is_gold_price !== '1'"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
v-show="scope.row.edit"
|
|
@@ -133,6 +139,65 @@
|
|
|
<span v-show="!scope.row.edit">{{ scope.row.sale_price }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="new_cost_fee"
|
|
|
+ show-overflow-
|
|
|
+ v-if="sitem && sitem.is_gold_price === '1'"
|
|
|
+ label="系统工艺费"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ v-show="scope.row.edit"
|
|
|
+ :prop="'good_ladder.' + scope.$index + '.' + 'new_cost_fee'"
|
|
|
+ :rules="addrRules.new_cost_fee"
|
|
|
+ :size="'mini'"
|
|
|
+ :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-loading="scope.row.loading"
|
|
|
+ v-model="scope.row.new_cost_fee"
|
|
|
+ placeholder="工艺费"
|
|
|
+ :disabled="true"
|
|
|
+ :size="'mini'"
|
|
|
+ maxlength="20"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <span v-show="!scope.row.edit">{{ scope.row.new_cost_fee }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="cost_fee"
|
|
|
+ label="工艺费"
|
|
|
+ show-overflow-tooltip
|
|
|
+ v-if="sitem && sitem.is_gold_price === '1'"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ v-show="scope.row.edit"
|
|
|
+ :prop="'good_ladder.' + scope.$index + '.' + 'cost_fee'"
|
|
|
+ :rules="addrRules.cost_fee"
|
|
|
+ :size="'mini'"
|
|
|
+ :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
+ >
|
|
|
+ <digital-input
|
|
|
+ :values="scope.row.cost_fee"
|
|
|
+ :placeholder="'工艺费'"
|
|
|
+ :min="0"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :controls="false"
|
|
|
+ :append="''"
|
|
|
+ :newTime="scope.row.newTime"
|
|
|
+ :size="'mini'"
|
|
|
+ :disabled="!scope.row.edit"
|
|
|
+ @reschange="num_change($event, 'cost_fee', scope.$index)"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <span v-show="!scope.row.edit">{{ scope.row.cost_fee }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
prop="market_price"
|
|
|
label="市场价"
|
|
@@ -389,7 +454,6 @@
|
|
|
<p>文件格式:.xlsx,.xls,.pdf,.zip,.rar,.7z</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
</li>
|
|
|
</ul>
|
|
|
</el-form-item>
|
|
@@ -557,7 +621,7 @@ export default {
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
-
|
|
|
+ new_sale_price: [{ required: false }],
|
|
|
sale_price: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -565,6 +629,18 @@ export default {
|
|
|
validator: validate_num,
|
|
|
},
|
|
|
],
|
|
|
+ cost_fee: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ trigger: "blur",
|
|
|
+ validator: validate_num,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ new_cost_fee: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ },
|
|
|
+ ],
|
|
|
market_price: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -625,10 +701,12 @@ export default {
|
|
|
if (index === -1) {
|
|
|
this.addrForm.good_ladder.push({
|
|
|
edit: true,
|
|
|
- min_num: "",
|
|
|
- new_sale_price: "",
|
|
|
- sale_price: "",
|
|
|
- market_price: "",
|
|
|
+ min_num: "0",
|
|
|
+ new_sale_price: "0",
|
|
|
+ new_cost_fee: "0",
|
|
|
+ sale_price: "0",
|
|
|
+ cost_fee: "0",
|
|
|
+ market_price: "0",
|
|
|
market_platform: "",
|
|
|
status: "1",
|
|
|
});
|
|
@@ -648,6 +726,7 @@ export default {
|
|
|
let resModel = {
|
|
|
isok: code,
|
|
|
price: code === 0 ? data.sale_price : "0",
|
|
|
+ new_cost_fee: code === 0 ? data.new_cost_fee : "0",
|
|
|
message: message,
|
|
|
};
|
|
|
this.addrForm.good_ladder[index].search_loading = false;
|
|
@@ -666,14 +745,18 @@ export default {
|
|
|
this.$message.warning("当前已有相同起订量的销售价!");
|
|
|
return;
|
|
|
}
|
|
|
- let { isok, price, message } = await this.get_new(rowIndex);
|
|
|
+ let { isok, price, message, new_cost_fee } = await this.get_new(
|
|
|
+ rowIndex
|
|
|
+ );
|
|
|
if (isok === 0) {
|
|
|
this.addrForm.good_ladder[rowIndex].new_sale_price = price;
|
|
|
+ this.addrForm.good_ladder[rowIndex].new_cost_fee = new_cost_fee;
|
|
|
this.addrForm.good_ladder[rowIndex].edit = false;
|
|
|
} else if (isok >= 100 && isok <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
this.addrForm.good_ladder[rowIndex].new_sale_price = price;
|
|
|
+ this.addrForm.good_ladder[rowIndex].new_cost_fee = new_cost_fee;
|
|
|
this.$message.warning(message);
|
|
|
}
|
|
|
}
|
|
@@ -694,13 +777,17 @@ export default {
|
|
|
this.addrForm.good_ladder[index].new_sale_price = "0";
|
|
|
} else {
|
|
|
if (!this.addrForm.good_ladder[index].search_loading) {
|
|
|
- let { isok, price, message } = await this.get_new(index);
|
|
|
+ let { isok, price, message, new_cost_fee } = await this.get_new(
|
|
|
+ index
|
|
|
+ );
|
|
|
if (isok === 0) {
|
|
|
this.addrForm.good_ladder[index].new_sale_price = price;
|
|
|
+ this.addrForm.good_ladder[index].new_cost_fee = new_cost_fee;
|
|
|
} else if (isok >= 100 && isok <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
this.addrForm.good_ladder[index].new_sale_price = price;
|
|
|
+ this.addrForm.good_ladder[index].new_cost_fee = new_cost_fee;
|
|
|
this.$message.warning(message);
|
|
|
}
|
|
|
}
|
|
@@ -752,14 +839,16 @@ export default {
|
|
|
}
|
|
|
this.$refs.ruleForm.validateField("proof_url");
|
|
|
for (let i = 0; i < this.addrForm.good_ladder.length; i++) {
|
|
|
- let { isok, price, message } = await this.get_new(i);
|
|
|
+ let { isok, price, new_cost_fee, message } = await this.get_new(i);
|
|
|
if (isok === 0) {
|
|
|
this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
+ this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
this.addrForm.good_ladder[i].edit = false;
|
|
|
} else if (isok >= 100 && isok <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
+ this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
this.addrForm.good_ladder[i].edit = true;
|
|
|
this.addrForm.good_ladder[i].newTime = new Date().valueOf() + "";
|
|
|
this.$message.warning(message);
|
|
@@ -795,15 +884,19 @@ export default {
|
|
|
let all_is_ok = true;
|
|
|
for (let i = 0; i < this.addrForm.good_ladder; i++) {
|
|
|
this.addrForm.good_ladder[i].search_loading = true;
|
|
|
- let { isok, price } = await this.get_new(i);
|
|
|
+ let { isok, price, new_cost_fee } = await this.get_new(i);
|
|
|
if (isok === 0) {
|
|
|
this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[i].edit = false;
|
|
|
+ this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
+ this.addrForm.good_ladder[i].this.addrForm.good_ladder[
|
|
|
+ i
|
|
|
+ ].edit = false;
|
|
|
} else if (isok >= 100 && isok <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
all_is_ok = false;
|
|
|
this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
+ this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
this.addrForm.good_ladder[i].edit = true;
|
|
|
this.addrForm.good_ladder[i].newTime = new Date().valueOf() + "";
|
|
|
}
|