xiaozy_产品列表
xiaozhiyong 2 years ago
parent 343bed9eab
commit 6fdc081c61
  1. 76
      src/views/product/index.vue

@ -99,17 +99,23 @@
</el-table-column> </el-table-column>
<el-table-column prop="refineryLevel" label="成本价" width="70"> <el-table-column prop="refineryLevel" label="成本价" width="70">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.floorPrice|toNumberFixed }}/{{ row.measurement|toNumberFixed }} {{ row.floorPrice | toNumberFixed }}/{{
row.measurement | toNumberFixed
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="refineryLevel" label="企业销售价" width="100"> <el-table-column prop="refineryLevel" label="企业销售价" width="100">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.salePrice2company|toNumberFixed }}/{{ row.measurement|toNumberFixed }} {{ row.salePrice2company | toNumberFixed }}/{{
row.measurement | toNumberFixed
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="refineryLevel" label="个人销售价" width="100"> <el-table-column prop="refineryLevel" label="个人销售价" width="100">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.salePrice2personal|toNumberFixed }}/{{ row.measurement|toNumberFixed }} {{ row.salePrice2personal | toNumberFixed }}/{{
row.measurement | toNumberFixed
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="时间" width="235"> <el-table-column label="时间" width="235">
@ -142,7 +148,12 @@
<el-dropdown-item command="record">调价记录</el-dropdown-item> <el-dropdown-item command="record">调价记录</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<span v-show="row.enableMark=='ENABLE'" class="el-dropdown-link" @click="updateCreate(row)">下单</span> <span
v-show="row.enableMark == 'ENABLE'"
class="el-dropdown-link"
@click="updateCreate(row)"
>下单</span
>
<el-dropdown <el-dropdown
@command=" @command="
(val) => { (val) => {
@ -232,12 +243,14 @@ export default {
autocomplete, autocomplete,
generalDetails, generalDetails,
}, },
filters:{ filters: {
toNumberFixed(val){ toNumberFixed(val) {
if(val){ if (val) {
return Number(val).toFixed(2) return Number(val).toFixed(2);
}else{return '暂无'} } else {
} return "暂无";
}
},
}, },
data() { data() {
return { return {
@ -347,19 +360,19 @@ export default {
// //
createOrder(row) { createOrder(row) {
this.controlWindows.addInfo = {} this.controlWindows.addInfo = {};
this.controlWindows.addInfo.title = "创建订单"; this.controlWindows.addInfo.title = "创建订单";
this.controlWindows.create = true; this.controlWindows.create = true;
console.log(this.controlWindows,'新增') console.log(this.controlWindows, "新增");
}, },
// //
updateCreate(row){ updateCreate(row) {
this.controlWindows.addInfo = { this.controlWindows.addInfo = {
title: "创建订单", title: "创建订单",
...row, ...row,
}; };
this.controlWindows.create = true; this.controlWindows.create = true;
console.log('修改') console.log("修改");
}, },
// //
detail(row) { detail(row) {
@ -390,17 +403,32 @@ export default {
}, },
// //
switchTrigger(val, row) { switchTrigger(val, row) {
row.enableMark = row.enableMark; row.enableMark = val === "ENABLE" ? "DISENABLE" : "ENABLE";
// return;
serve serve
.update({ .updateBatchEnable([
id: row.id, {
enableMark: val, id: row.id,
}) enableMark: val,
},
])
.then((res) => { .then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.getByPage(); this.getByPage();
} else this.$message.error(res.msg); }
// this.$message.success(res.msg);
// this.closeWindow();
}); });
// serve
// .update({
// id: row.id,
// enableMark: val,
// })
// .then((res) => {
// if (res.code === 20000) {
// this.getByPage();
// } else this.$message.error(res.msg);
// });
}, },
// //
batchHandler() { batchHandler() {

Loading…
Cancel
Save