pull/1/head
xiaozhiyong 2 years ago
parent dc50eeea8a
commit 3796514d32
  1. 16
      src/views/product/components/add.vue
  2. 1
      src/views/product/components/adjust.vue
  3. 1
      src/views/product/components/batch.vue
  4. 2
      src/views/product/components/create.vue
  5. 38
      src/views/product/components/record.vue
  6. 22
      src/views/product/index.vue
  7. 2
      src/views/refineryInfo/components/add.vue

@ -39,34 +39,36 @@
<el-form-item label="所属炼厂库名" prop="belongLibrary"> <el-form-item label="所属炼厂库名" prop="belongLibrary">
<el-input <el-input
v-model="form.belongLibrary" v-model="form.belongLibrary"
placeholder="请输入内容" placeholder="请输入所属炼厂库名"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<template v-if="!controlWindows.addInfo.id">
<el-form-item label="成本价" prop="floorPrice"> <el-form-item label="成本价" prop="floorPrice">
<el-input <el-input
v-checkNum v-checkNum
v-model="form.floorPrice" v-model="form.floorPrice"
placeholder="请输入内容" placeholder="请输入成本价"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="企业销售价" prop="salePrice2company"> <el-form-item label="企业销售价" prop="salePrice2company">
<el-input <el-input
v-checkNum v-checkNum
v-model="form.salePrice2company" v-model="form.salePrice2company"
placeholder="请输入内容" placeholder="请输入企业销售价"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="个人销售价" prop="salePrice2personal"> <el-form-item label="个人销售价" prop="salePrice2personal">
<el-input <el-input
v-checkNum v-checkNum
v-model="form.salePrice2personal" v-model="form.salePrice2personal"
placeholder="请输入内容" placeholder="请输入个人销售价"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</template>
<el-form-item label="计量单位" prop="measurement"> <el-form-item label="计量单位" prop="measurement">
<el-input <el-input
v-model="form.measurement" v-model="form.measurement"
placeholder="请输入内容" placeholder="请输入计量单位"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="启用状态" prop="enableMark"> <el-form-item label="启用状态" prop="enableMark">
@ -90,11 +92,10 @@ import refineryServe from "api/refineryInfo.js";
export default { export default {
props: { props: {
controlWindows: Object, controlWindows: Object,
// refineryTypeEnum: Array,
}, },
data() { data() {
return { return {
form: { name: "" }, form: {},
refineryList: [], refineryList: [],
productTypeList: [ productTypeList: [
{ {
@ -154,6 +155,7 @@ export default {
if (id) { if (id) {
// //
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo)); this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
console.log("this.form", this.form.floorPrice);
} }
}, },
submit() { submit() {

@ -69,6 +69,7 @@ export default {
closeWindow() { closeWindow() {
this.form = {}; this.form = {};
this.$emit("closeWindow"); this.$emit("closeWindow");
this.$refs.form.clearValidate();
this.controlWindows.adjust = false; this.controlWindows.adjust = false;
}, },
}, },

@ -68,6 +68,7 @@ export default {
this.list = []; this.list = [];
this.form = {}; this.form = {};
this.$emit("closeWindow"); this.$emit("closeWindow");
this.$refs.form.clearValidate();
this.controlWindows.batch = false; this.controlWindows.batch = false;
}, },
}, },

@ -144,8 +144,8 @@ export default {
}, },
closeWindow() { closeWindow() {
this.$emit("closeWindow"); this.$emit("closeWindow");
this.$refs.form.clearValidate();
this.form = {}; this.form = {};
this.$refs.form.clearValidate();
this.controlWindows.create = false; this.controlWindows.create = false;
}, },
}, },

@ -9,14 +9,6 @@
> >
<div class="record"> <div class="record">
<div class="frame record-frame"> <div class="frame record-frame">
<!-- <el-input
class="mr20"
placeholder="创建人"
v-model="parameter.params.productName"
:fetch-suggestions="querySearchAsync"
@select="handleSelect"
></el-input> -->
<el-date-picker <el-date-picker
v-model="datetime" v-model="datetime"
type="datetimerange" type="datetimerange"
@ -46,32 +38,44 @@
> >
<el-table-column label="成本价"> <el-table-column label="成本价">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<p v-if="row.floorPrice">
{{ row.floorPrice }}/{{ row.measurement }} {{ row.floorPrice }}/{{ row.measurement }}
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上次成本价"> <el-table-column label="上次成本价">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<p v-if="row.lastFloorPrice">
{{ row.lastFloorPrice }}/{{ row.measurement }} {{ row.lastFloorPrice }}/{{ row.measurement }}
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="企业销售价"> <el-table-column label="企业销售价">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<p v-if="row.salePrice2company">
{{ row.salePrice2company }}/{{ row.measurement }} {{ row.salePrice2company }}/{{ row.measurement }}
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上次企业销售价"> <el-table-column label="上次企业销售价">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.lastSalePrice2company }}/{{ row.measurement }}</template <p v-if="row.lastSalePrice2company">
{{ row.lastSalePrice2company }}/{{ row.measurement }}
</p></template
> >
</el-table-column> </el-table-column>
<el-table-column label="个人销售价"> <el-table-column label="个人销售价">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<p v-if="row.salePrice2personal">
{{ row.salePrice2personal }}/{{ row.measurement }} {{ row.salePrice2personal }}/{{ row.measurement }}
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上次个人销售价"> <el-table-column label="上次个人销售价">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.lastSalePrice2personal }}/{{ row.measurement }}</template <p v-if="row.lastSalePrice2personal">
{{ row.lastSalePrice2personal }}/{{ row.measurement }}
</p></template
> >
</el-table-column> </el-table-column>
<el-table-column label="时间" width="235"> <el-table-column label="时间" width="235">
@ -85,19 +89,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <el-pagination
class="record-el-pagination"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="parameter.currentPage"
:page-size="parameter.pageSize"
:popper-append-to-body="false"
:page-sizes="[10, 20, 30, 50]"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination> -->
<!-- 分页 --> <!-- 分页 -->
<pagination <pagination
class="record-el-pagination" class="record-el-pagination"
@ -108,7 +99,6 @@
</div> </div>
<div class="footer-buttons"> <div class="footer-buttons">
<el-button @click="controlWindows.record = false">关闭 </el-button> <el-button @click="controlWindows.record = false">关闭 </el-button>
<!-- <el-button @click="submit">确定</el-button> -->
</div> </div>
</el-drawer> </el-drawer>
</template> </template>

@ -282,22 +282,17 @@ export default {
this.controlWindows.addInfo = { id: row.id }; this.controlWindows.addInfo = { id: row.id };
this.controlWindows.adjust = true; this.controlWindows.adjust = true;
}, },
//
deleteRow(row) {
serve
.deleteRow({
id: row.id,
})
.then((res) => {
this.$message.success(res.msg);
this.getByPage();
});
},
// //
commandMore(val, row) { commandMore(val, row) {
if (val === "base") { if (val === "base") {
this.controlWindows.addInfo.title = "产品修改"; this.controlWindows.addInfo = {
Object.assign(this.controlWindows.addInfo, row); title: "产品修改",
...row,
};
console.log(
"this.controlWindows.addInfo",
this.controlWindows.addInfo.floorPrice
);
this.controlWindows.add = true; this.controlWindows.add = true;
} }
}, },
@ -328,7 +323,6 @@ export default {
this.$message.warning("请至少选择一条数据"); this.$message.warning("请至少选择一条数据");
return; return;
} }
this.controlWindows.batch = true; this.controlWindows.batch = true;
}, },
// //

@ -115,9 +115,9 @@ export default {
}, },
closeWindow() { closeWindow() {
this.$emit("closeWindow"); this.$emit("closeWindow");
this.$refs.form.clearValidate();
this.form = {}; this.form = {};
this.controlWindows.addInfo = {}; this.controlWindows.addInfo = {};
this.$refs.form.clearValidate();
this.controlWindows.add = false; this.controlWindows.add = false;
}, },
}, },

Loading…
Cancel
Save