|
@@ -97,23 +97,18 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
- <el-input
|
|
|
- v-model="screenForm.remark"
|
|
|
- placeholder="请输入备注"
|
|
|
- />
|
|
|
+ <el-input v-model="screenForm.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :xs="24" :sm="24" :lg="24" class="tr">
|
|
|
<el-form-item label="">
|
|
|
<el-button size="mini" @click="resetScreenForm">清空</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="submitScreenForm"
|
|
|
- >搜索</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="submitScreenForm"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -121,32 +116,37 @@
|
|
|
</div>
|
|
|
<!-- 按钮 -->
|
|
|
<div class="btn-group clearfix">
|
|
|
- <div >
|
|
|
- <el-popconfirm
|
|
|
- v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
- confirm-button-text="好的"
|
|
|
- cancel-button-text="不用了"
|
|
|
- icon="el-icon-info"
|
|
|
- icon-color="red"
|
|
|
- title="内容确定删除吗?"
|
|
|
- @onConfirm="handleDelete"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- icon="el-icon-delete"
|
|
|
- slot="reference"
|
|
|
- class="el-popover-left"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </el-popconfirm>
|
|
|
+ <div>
|
|
|
+ <el-popconfirm
|
|
|
+ v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
+ confirm-button-text="好的"
|
|
|
+ cancel-button-text="不用了"
|
|
|
+ icon="el-icon-info"
|
|
|
+ icon-color="red"
|
|
|
+ title="内容确定删除吗?"
|
|
|
+ @onConfirm="handleDelete"
|
|
|
+ >
|
|
|
<el-button
|
|
|
- type="primary"
|
|
|
- style="margin-left:10px"
|
|
|
- size="mini"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ slot="reference"
|
|
|
+ class="el-popover-left"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </el-popconfirm>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ size="mini"
|
|
|
@click="handleRevokeAll"
|
|
|
- >批量作废</el-button>
|
|
|
-<!-- <el-button type="primary" size="mini">导出</el-button>-->
|
|
|
+ >批量作废</el-button
|
|
|
+ >
|
|
|
+ <ExportButton
|
|
|
+ :exUrl="'/product-upd-price/export'"
|
|
|
+ :exParams="exParams"
|
|
|
+ class="exp"
|
|
|
+ />
|
|
|
<!-- <el-button type="primary" size="mini">打印</el-button> -->
|
|
|
</div>
|
|
|
<div class="fl">
|
|
@@ -162,10 +162,9 @@
|
|
|
>批量作废</el-button>
|
|
|
|
|
|
</el-popconfirm> -->
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
<div class="mymain-container">
|
|
|
<!-- 列表 -->
|
|
|
<div class="table">
|
|
@@ -176,15 +175,15 @@
|
|
|
border
|
|
|
fit
|
|
|
:row-class-name="tableRowClassName"
|
|
|
- @select-all="hanleSelectAll"
|
|
|
- @select="hanleSelectAll"
|
|
|
+ @select-all="hanleSelectAll"
|
|
|
+ @select="hanleSelectAll"
|
|
|
>
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- align="left"
|
|
|
- width="50"
|
|
|
- ></el-table-column>
|
|
|
-<!-- <el-table-column type="selection" align="left" />-->
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ align="left"
|
|
|
+ width="50"
|
|
|
+ ></el-table-column>
|
|
|
+ <!-- <el-table-column type="selection" align="left" />-->
|
|
|
<!-- <el-table-column
|
|
|
align="left"
|
|
|
label="产品类别"
|
|
@@ -201,7 +200,7 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.materialNumber" />
|
|
|
- <span>{{scope.row.materialNumber}}</span>
|
|
|
+ <span>{{ scope.row.materialNumber }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -213,9 +212,8 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.materialOldNumber" />
|
|
|
- <span>{{scope.row.materialOldNumber}}</span>
|
|
|
+ <span>{{ scope.row.materialOldNumber }}</span>
|
|
|
</template>
|
|
|
-
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
align="left"
|
|
@@ -226,9 +224,8 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
|
- <span>{{scope.row.materialName}}</span>
|
|
|
+ <span>{{ scope.row.materialName }}</span>
|
|
|
</template>
|
|
|
-
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
align="left"
|
|
@@ -239,7 +236,7 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
|
- <span>{{scope.row.specification}}</span>
|
|
|
+ <span>{{ scope.row.specification }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -330,7 +327,9 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag size="mini" v-if="scope.row.isPromote" type="success">是</el-tag>
|
|
|
+ <el-tag size="mini" v-if="scope.row.isPromote" type="success"
|
|
|
+ >是</el-tag
|
|
|
+ >
|
|
|
<el-tag size="mini" v-else type="danger">否</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -342,7 +341,9 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag size="mini" v-if="scope.row.isRevoke" type="success">是</el-tag>
|
|
|
+ <el-tag size="mini" v-if="scope.row.isRevoke" type="success"
|
|
|
+ >是</el-tag
|
|
|
+ >
|
|
|
<el-tag size="mini" v-else type="danger">否</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -367,12 +368,7 @@
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
- <el-table-column
|
|
|
- fixed="left"
|
|
|
- width="150"
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column fixed="left" width="150" label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-popconfirm
|
|
|
v-if="!scope.row.isRevoke"
|
|
@@ -380,11 +376,9 @@
|
|
|
title="作废吗?"
|
|
|
@onConfirm="handleRevoke(scope.row.id)"
|
|
|
>
|
|
|
- <el-button
|
|
|
- slot="reference"
|
|
|
- type="text"
|
|
|
- size="mini"
|
|
|
- >作废</el-button>
|
|
|
+ <el-button slot="reference" type="text" size="mini"
|
|
|
+ >作废</el-button
|
|
|
+ >
|
|
|
</el-popconfirm>
|
|
|
|
|
|
<el-button
|
|
@@ -392,7 +386,8 @@
|
|
|
type="text"
|
|
|
size="mini"
|
|
|
@click="handleDelete(scope.row.id)"
|
|
|
- >删除</el-button>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -414,54 +409,75 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Mixin from '@/mixin/index'
|
|
|
-import { getProductDelete, getProductPriceList, getTypeList, handlePriceRevoke } from '@/api/basic_data/material'
|
|
|
-import { getCategoryList } from '@/api/common'
|
|
|
+import Mixin from "@/mixin/index";
|
|
|
+import {
|
|
|
+ getProductDelete,
|
|
|
+ getProductPriceList,
|
|
|
+ getTypeList,
|
|
|
+ handlePriceRevoke,
|
|
|
+} from "@/api/basic_data/material";
|
|
|
+import { getCategoryList } from "@/api/common";
|
|
|
+import ExportButton from "@/components/Common/export-button.vue";
|
|
|
|
|
|
export default {
|
|
|
mixins: [Mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
- currentPage: 1, // 当前页码
|
|
|
- pageSize: 10, // 每页数量
|
|
|
- listTotal: 0, // 列表总数
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ listTotal: 0,
|
|
|
dataList: [],
|
|
|
screenForm: {
|
|
|
- k3CategoryNumber: '',
|
|
|
- endDate: '',
|
|
|
- materialName: '',
|
|
|
- materialNumber: '',
|
|
|
- materialOldNumber: '',
|
|
|
- saleTypeId: '',
|
|
|
- specification: '',
|
|
|
- startDate: '',
|
|
|
- remark:''
|
|
|
+ k3CategoryNumber: "",
|
|
|
+ endDate: "",
|
|
|
+ materialName: "",
|
|
|
+ materialNumber: "",
|
|
|
+ materialOldNumber: "",
|
|
|
+ saleTypeId: "",
|
|
|
+ specification: "",
|
|
|
+ startDate: "",
|
|
|
+ remark: "",
|
|
|
},
|
|
|
ztypeList: [],
|
|
|
- dictList: {}
|
|
|
- }
|
|
|
+ dictList: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ exParams() {
|
|
|
+ return {
|
|
|
+ k3CategoryNumber: this.screenForm.k3CategoryNumber,
|
|
|
+ endDate: this.screenForm.endDate,
|
|
|
+ materialName: this.screenForm.materialName,
|
|
|
+ materialNumber: this.screenForm.materialNumber,
|
|
|
+ materialOldNumber: this.screenForm.materialOldNumber,
|
|
|
+ saleTypeId: this.screenForm.saleTypeId,
|
|
|
+ specification: this.screenForm.specification,
|
|
|
+ startDate: this.screenForm.startDate,
|
|
|
+ remark: this.screenForm.remark,
|
|
|
+ billType: "DIFF",
|
|
|
+ };
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
- getCategoryList({ pageNum:1,pageSize:-1}).then((res) => {
|
|
|
- this.dictList = res.data.records
|
|
|
- console.log(this.dictList,777777)
|
|
|
- })
|
|
|
+ getCategoryList({ pageNum: 1, pageSize: -1 }).then((res) => {
|
|
|
+ this.dictList = res.data.records;
|
|
|
+ console.log(this.dictList, 777777);
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
addFn() {
|
|
|
- this.showDialogForm = true
|
|
|
+ this.showDialogForm = true;
|
|
|
},
|
|
|
-
|
|
|
handleDelete(id) {
|
|
|
this.hanleDeleteAllPromise(id).then((ids) => {
|
|
|
getProductDelete(ids).then((res) => {
|
|
|
- this.$successMsg('删除成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- })
|
|
|
+ this.$successMsg("删除成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
getList() {
|
|
|
- this.listLoading = true
|
|
|
+ this.listLoading = true;
|
|
|
const params = {
|
|
|
pageNum: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
@@ -474,46 +490,47 @@ export default {
|
|
|
specification: this.screenForm.specification,
|
|
|
startDate: this.screenForm.startDate,
|
|
|
remark: this.screenForm.remark,
|
|
|
- billType:'HOME'
|
|
|
- }
|
|
|
+ billType: "DIFF",
|
|
|
+ };
|
|
|
getProductPriceList(params).then((res) => {
|
|
|
- this.dataList = res.data.records
|
|
|
- console.log(res.data.records)
|
|
|
- this.listTotal = res.data.total
|
|
|
- this.listLoading = false
|
|
|
- })
|
|
|
- getTypeList({...params,pageNum:1,pageSize:-1}).then((res) => {
|
|
|
- this.ztypeList = res.data.records
|
|
|
+ this.dataList = res.data.records;
|
|
|
+ console.log(res.data.records);
|
|
|
+ this.listTotal = res.data.total;
|
|
|
+ this.listLoading = false;
|
|
|
+ });
|
|
|
+ getTypeList({ ...params, pageNum: 1, pageSize: -1 }).then((res) => {
|
|
|
+ this.ztypeList = res.data.records;
|
|
|
// console.log(this.ztypeList, "type1111");
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
handleRevoke(id) {
|
|
|
- handlePriceRevoke({ ids:id }).then((res) => {
|
|
|
- this.$successMsg('操作成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
+ handlePriceRevoke({ ids: id }).then((res) => {
|
|
|
+ this.$successMsg("操作成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
},
|
|
|
handleRevokeAll() {
|
|
|
- handlePriceRevoke({ ids:this.ids.join('') }).then((res) => {
|
|
|
- this.$successMsg('操作成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
+ handlePriceRevoke({ ids: this.ids.join("") }).then((res) => {
|
|
|
+ this.$successMsg("操作成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
},
|
|
|
- tableRowClassName({row, rowIndex}) {
|
|
|
+ tableRowClassName({ row, rowIndex }) {
|
|
|
// || row.examineStatus=='FAIL'
|
|
|
- if (this.ids.includes(row.id)) {
|
|
|
- return 'warning-row';
|
|
|
- }
|
|
|
- return '';
|
|
|
+ if (this.ids.includes(row.id)) {
|
|
|
+ return "warning-row";
|
|
|
+ }
|
|
|
+ return "";
|
|
|
},
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+ components: { ExportButton },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- ::v-deep .el-table .warning-row {
|
|
|
- background: oldlace;
|
|
|
- }
|
|
|
+::v-deep .el-table .warning-row {
|
|
|
+ background: oldlace;
|
|
|
+}
|
|
|
|
|
|
::v-deep .el-select--small {
|
|
|
width: 100%;
|
|
@@ -521,4 +538,8 @@ export default {
|
|
|
::v-deep .el-date-editor {
|
|
|
width: 100%;
|
|
|
}
|
|
|
+.exp {
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
</style>
|