123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728 |
- <template>
- <div class="app-container">
- <div v-if="show === 1">
- <!-- 筛选条件 -->
- <div>
- <div>
- <el-form
- ref="screenForm"
- :model="screenForm"
- label-width="70px"
- size="mini"
- label-position="left"
- >
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="物料编码" prop="materialNumber">
- <el-input
- placeholder="请输入物料编码"
- v-model="screenForm.materialNumber"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="产品名称" prop="materialName">
- <el-input
- placeholder="请输入产品名称"
- v-model="screenForm.materialName"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="产品编码" prop="materialOldNumber">
- <el-input
- placeholder="请输入产品编码"
- v-model="screenForm.materialOldNumber"
- ></el-input>
- </el-form-item>
- </el-col>
- <!-- <el-col :xs="24" :sm="12" :lg="6">-->
- <!-- <el-form-item label="生效日期" prop="startDate">-->
- <!-- <el-date-picker-->
- <!-- v-model="screenForm.startDate"-->
- <!-- type="datetime"-->
- <!-- placeholder="请输入生效日期"-->
- <!-- value-format="yyyy-MM-dd HH:mm:ss"-->
- <!-- >-->
- <!-- </el-date-picker>-->
- <!-- </el-form-item>-->
- <!-- </el-col>-->
- <!-- <el-col :xs="24" :sm="12" :lg="6">-->
- <!-- <el-form-item label="失效日期" prop="endDate">-->
- <!-- <el-date-picker-->
- <!-- v-model="screenForm.endDate"-->
- <!-- type="datetime"-->
- <!-- placeholder="请输入生效日期"-->
- <!-- value-format="yyyy-MM-dd HH:mm:ss "-->
- <!-- >-->
- <!-- </el-date-picker>-->
- <!-- </el-form-item>-->
- <!-- </el-col>-->
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="销售类型" prop="saleTypeId">
- <el-select
- v-model="screenForm.saleTypeId"
- filterable
- placeholder="选择销售类型"
- style="width: 100%"
- >
- <el-option label="全部" value=""></el-option>
- <el-option
- v-for="item in typeList"
- :key="item.id"
- :label="item.saleName"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="产品类别" prop="k3CategoryNumber">
- <el-select
- style="width:100%"
- placeholder="请选择产品类别"
- v-model="screenForm.k3CategoryNumber"
- >
- <el-option label="全部" value=""></el-option>
- <el-option
- v-for="item in dictList"
- :label="item.name"
- :value="item.number"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="规格型号" prop="specification">
- <el-input
- placeholder="请输入规格型号"
- v-model="screenForm.specification"
- ></el-input>
- </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-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- </div>
- <!-- 按钮 -->
- <div class="btn-group clearfix">
- <div class="fl">
- <el-button type="primary" v-if="$checkBtnRole('add', $route.meta.roles)" icon="el-icon-plus" size="mini" @click="addFn">新增</el-button>
- <!-- <el-button type="primary" size="mini">编辑</el-button> -->
- <el-popconfirm
- v-if="$checkBtnRole('del', $route.meta.roles)"
- confirm-button-text="好的"
- cancel-button-text="不用了"
- icon="el-icon-info"
- icon-color="red"
- title="内容确定删除吗?"
- @onConfirm="hanleDeleteAll"
- >
- <el-button
- type="primary"
- size="mini"
- icon="el-icon-delete"
- slot="reference"
- class="el-popover-left"
- >删除</el-button
- >
- </el-popconfirm>
- </div>
- <div class="fr">
- <ExportButton :exUrl="'/product-upd-price/export'" :exParams="exParams" />
- <!-- <el-button type="primary" size="mini">导入</el-button>
- <el-button type="primary" size="mini">导出</el-button>
- <el-button type="primary" size="mini">打印</el-button> -->
- </div>
- </div>
- <div class="mymain-container">
- <!-- 列表 -->
- <div class="table">
- <el-table
- v-loading="listLoading"
- :data="dataList"
- element-loading-text="Loading"
- border
- fit
- highlight-current-row
- @select-all="hanleSelectAll"
- @select="hanleSelectAll"
- stripe
- >
- <el-table-column
- type="selection"
- align="left"
- width="50"
- ></el-table-column>
- <el-table-column
- align="left"
- label="单据号"
- prop="updPriceBillId"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.updPriceBillId" />
- <span>{{scope.row.updPriceBillId}}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="销售类型"
- prop="saleTypeName"
- :formatter="formatterType"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <!-- <el-table-column
- align="left"
- label="产品类别"
- prop="mainName"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column> -->
- <el-table-column
- align="left"
- label="物料编码"
- prop="materialNumber"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.materialNumber" />
- <span>{{scope.row.materialNumber}}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="产品名称"
- prop="materialName"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.materialName" />
- <span>{{scope.row.materialName}}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="产品编码"
- prop="materialOldNumber"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.materialOldNumber" />
- <span>{{scope.row.materialOldNumber}}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="规格型号"
- prop="specification"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.specification" />
- <span>{{scope.row.specification}}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="计量单位"
- prop="unit"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="right"
- label="数量"
- prop="qty"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="right"
- label="批发价"
- prop="batchPrice"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="right"
- label="格力折扣"
- prop="discAmount"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="调价日期"
- prop="createTime"
- min-width="200"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="生效日期"
- prop="startDate"
- min-width="200"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="失效日期"
- prop="endDate"
- min-width="200"
- show-overflow-tooltip
- ></el-table-column>
- <!-- <el-table-column
- align="left"
- label="是否促销价"
- prop="isPromote"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-tag size="mini" type="success" v-if="scope.row.isPromote">是</el-tag>
- <el-tag size="mini" type="danger" v-else>否</el-tag>
- </template>
- </el-table-column> -->
- <el-table-column
- align="left"
- label="返利类型(钱包)"
- prop="wallets"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <template v-for="(item, index) in scope.row.wallets">
- <template v-if="item.type === 'REBATE'">
- <el-tag
- type="success"
- style="margin: 0 10px"
- size="mini"
- :key="index"
- >
- {{ item.walletName }}
- </el-tag>
- </template
- >
- </template>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="现金钱包"
- prop="modifyPriceDepartment"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <template v-for="(item, index) in scope.row.wallets">
- <template v-if="item.type === 'COMMONLY'">
- <el-tag
- type="success"
- style="margin: 0 10px"
- size="mini"
- :key="index"
- >
- {{ item.walletName }}
- </el-tag>
- </template
- >
- </template>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="调价部门"
- prop="adminWebsitName"
- min-width="200"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="调价业务员"
- prop="serviceName"
- min-width="200"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="制单日期"
- prop="createTime"
- min-width="200"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="审核人"
- prop="confirmName"
- min-width="200"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="审核日期"
- prop="confirmTime"
- min-width="200"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="状态"
- prop="examineStatus"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-tag size="mini" type="success" v-if="scope.row.examineStatus == 'SAVE'"
- >保存</el-tag
- >
- <el-tag
- size="mini"
- type="danger"
- v-else-if="scope.row.examineStatus == 'WAIT'"
- >待审核</el-tag
- >
- <el-tag
- size="mini"
- type="danger"
- v-else-if="scope.row.examineStatus == 'OK'"
- >通过</el-tag
- >
- <el-tag
- size="mini"
- type="danger"
- v-else-if="scope.row.examineStatus == 'FAIL'"
- >不通过</el-tag
- >
- <el-tag size="mini" type="danger" v-else>审核</el-tag>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="操作"
- fixed="right"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <template v-if="scope.row.examineStatus == 'SAVE'">
- <el-popconfirm
- title="确定提审吗?"
- @onConfirm="handleGetPriceSubmit(scope.row.updPriceBillId)"
- style="margin-right: 10px"
- >
- <el-button type="text" slot="reference">提审</el-button>
- </el-popconfirm>
- </template>
- <template v-if="scope.row.examineStatus == 'WAIT'">
- <el-button
- type="text"
- class="textColor"
- @click="approvalFn(scope.row.updPriceBillId)"
- >审批</el-button
- >
- </template>
- <el-button
- v-if="scope.row.examineStatus == 'SAVE'"
- type="text"
- class="textColor"
- @click="editFn(scope.row.updPriceBillId,scope.row)"
- >编辑</el-button
- >
- <el-button
- type="text"
- class="textColor"
- @click="detailFn(scope.row.updPriceBillId)"
- >详情</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 分页 -->
- <div class="fr">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- :page-sizes="[10, 20, 30, 50]"
- :page-size="10"
- layout="total, sizes, prev, pager, next, jumper"
- :total="listTotal"
- >
- </el-pagination>
- </div>
- </div>
- </div>
- <ModifyListApply v-else-if="show === 2 || show==5" :cid='cid'/>
- <ModifyListApproval v-else-if="show === 3 " :detail="detail" />
- <ModifyListDetail v-else :detail="detail" />
- </div>
- </template>
- <script>
- import ModifyListApply from './components/modify_list-apply.vue'
- import ModifyListApproval from './components/modify_list-approval.vue'
- import ModifyListDetail from './components/modify_list-detail.vue'
- import Mixin from '@/mixin/index'
- import {
- getPriceSubmit,
- getProductRricedel,
- getProductRriceDetail,
- getProductRriceList,
- getTypeList
- } from '@/api/basic_data/material'
- import { downloadFiles } from '@/utils/util'
- import { getCategoryList } from '@/api/common'
- export default {
- mixins: [Mixin],
- data() {
- return {
- show: 1,
- currentPage: 1, // 当前页码
- pageSize: 10, // 每页数量
- listTotal: 0, // 列表总数
- dataList: [
- {
- baseUnitId: "",
- batchPrice: "",
- billId: "",
- endDate: "",
- id: null,
- isPromote: "",
- isPublish: "",
- materialId: "",
- materialName: "",
- materialNumber: "",
- parentId: "",
- qty: "",
- rebateUseRate: "",
- retailPrice: "",
- saleTypeId: "",
- specification: "",
- startDate: "",
- wallets: [],
- },
- ],
- screenForm: {
- materialName: "",
- materialNumber: "",
- startDate: "",
- materialOldNumber:'',
- saleTypeId:'',
- k3CategoryNumber:'',
- specification:''
- },
- liDetail: {},
- detail: {},
- obj: {
- baseUnitId: "",
- batchPrice: "",
- billId: "",
- endDate: "",
- id: null,
- isPromote: "",
- isPublish: "",
- materialId: "4",
- materialName: "",
- materialNumber: "",
- parentId: "",
- qty: "",
- rebateUseRate: "",
- retailPrice: "",
- saleTypeId: "",
- specification: "",
- startDate: "",
- wallets: [],
- },
- cid:'',
- typeList: [],
- dictList:[]
- };
- },
- components: {
- ModifyListApply,
- ModifyListApproval,
- ModifyListDetail,
- },
- computed:{
- exParams() {
- return {
- materialName: this.screenForm.materialName,
- materialNumber: this.screenForm.materialNumber,
- startDate:this.screenForm.startDate
- };
- },
- },
- mounted() {
- let params = {
- pageNum: 1,
- pageSize: -1,
- saleCode: "",
- saleName: "",
- status: "",
- };
- getTypeList(params).then((res) => {
- this.typeList = res.data.records;
- });
- getCategoryList({ pageNum:1,pageSize:-1}).then((res) => {
- this.dictList = res.data.records
- console.log(this.dictList,777777)
- })
- },
- methods: {
- formatterType(row) {
- for (let i = 0; i < this.typeList.length; i++) {
- if (this.typeList[i].id == row.saleTypeId) {
- return this.typeList[i].saleName;
- }
- }
- },
- addFn() {
- this.show = 2;
- },
- hanleDeleteAll(id) {
- this.hanleDeleteAllPromise(id).then((ids) => {
- getProductRricedel(ids).then((res) => {
- this.$successMsg("删除成功");
- this.getList();
- });
- });
- },
- handleGetPriceSubmit(id) {
- console.log(id);
- getPriceSubmit({ id }).then((res) => {
- this.$successMsg("已提审");
- this.getList();
- });
- },
- approvalFn(id) {
- getProductRriceDetail({ id }).then((res) => {
- this.detail = res.data;
- this.show = 3;
- });
- },
- detailFn(id) {
- getProductRriceDetail({ id }).then((res) => {
- this.detail = res.data;
- this.show = 4;
- });
- },
- getList() {
- this.listLoading = true;
- console.log(456654);
- let params = {
- pageNum: this.currentPage,
- pageSize: this.pageSize,
- materialName: this.screenForm.materialName,
- materialNumber: this.screenForm.materialNumber,
- startDate: this.screenForm.startDate,
- materialOldNumber:this.screenForm.materialOldNumber,
- saleTypeId:this.screenForm.saleTypeId,
- k3CategoryNumber:this.screenForm.k3CategoryNumber,
- specification:this.screenForm.specification
- };
- getProductRriceList(params).then((res) => {
- this.dataList = res.data.records;
- this.listTotal = res.data.total;
- this.listLoading = false;
- });
- },
- editFn(id, row) {
- this.cid = id
- this.show = 5;
- // this.diaLogForm = {
- // id,
- // composeNumber: row.composeNumber,
- // items: row.items === undefined ? [] : row.items,
- // materialId: row.materialId,
- // orgNumber: row.orgNumber,
- // productModel: row.productModel,
- // productVolume: row.productVolume,
- // };
- // this.showDialogForm = true;
- },
- hanleInfo() {
- if (this.type === 1) {
- getProductAdd(this.diaLogForm).then((res) => {
- this.$successMsg("保存成功");
- console.log(params, 123);
- this.getList();
- });
- } else if (this.type === 2) {
- const params = {
- ...this.diaLogForm,
- };
- console.log(params, 123);
- getProductEdit(params).then((res) => {
- this.$successMsg("编辑成功");
- this.getList();
- });
- this.diaLogForm.id = null;
- }
- this.showDialogForm = false;
- },
- hanleDelete(id) {
- this.hanleDeleteAllPromise(id).then((ids) => {
- getProductDel(ids).then((res) => {
- this.$successMsg("删除成功");
- });
- });
- },
- handleExport() {
- let screenData = {
- customerName: this.screenForm.customerName,
- freeDay: this.screenForm.freeDay,
- toll: this.screenForm.toll,
- };
- downloadFiles("/product-compose/export", screenData);
- },
- resetInfo() {
- this.diaLogForm = {
- id: null,
- composeNumber: "",
- id: "",
- items: [],
- materialId: "",
- orgNumber: 0,
- productModel: "",
- productVolume: "",
- };
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-select--small {
- width: 100%;
- }
- </style>
|