|
|
@@ -46,10 +46,54 @@
|
|
|
<template slot="detailsTextForm">
|
|
|
<avue-ueditor v-model="form.detailsText" :options="optionsUeditor"> </avue-ueditor>
|
|
|
</template>
|
|
|
- <!-- <template slot-scope="{ row, index }" slot="inventory">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="storeInventoryOpen(row)">{{ row.inventory }}
|
|
|
- </span>
|
|
|
- </template> -->
|
|
|
+ <template slot-scope="{ row, index }" slot="priceOne">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.upAndDownShelves == 0"
|
|
|
+ v-model="row.priceOne"
|
|
|
+ label="请输入售价"
|
|
|
+ :controls="false"
|
|
|
+ :precision="2"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-if="row.upAndDownShelves == 1">{{ row.priceOne }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row, index }" slot="priceTwo">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.upAndDownShelves == 0"
|
|
|
+ v-model="row.priceTwo"
|
|
|
+ label="请输入售价"
|
|
|
+ :controls="false"
|
|
|
+ :precision="2"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-if="row.upAndDownShelves == 1">{{ row.priceTwo }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row, index }" slot="priceThree">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.upAndDownShelves == 0"
|
|
|
+ v-model="row.priceThree"
|
|
|
+ label="请输入售价"
|
|
|
+ :controls="false"
|
|
|
+ :precision="2"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-if="row.upAndDownShelves == 1">{{ row.priceThree }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row, index }" slot="priceFour">
|
|
|
+ <el-input-number
|
|
|
+ v-if="row.upAndDownShelves == 0"
|
|
|
+ v-model="row.priceFour"
|
|
|
+ label="请输入售价"
|
|
|
+ :controls="false"
|
|
|
+ :precision="2"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input-number>
|
|
|
+ <span v-if="row.upAndDownShelves == 1">{{ row.priceFour }}</span>
|
|
|
+ </template>
|
|
|
<template slot-scope="{ type, size, row, index }" slot="menu">
|
|
|
<el-button
|
|
|
:size="size"
|
|
|
@@ -81,16 +125,13 @@
|
|
|
</template>
|
|
|
|
|
|
<template slot-scope="{ type, size, row, $index }" slot="menuLeft">
|
|
|
- <el-button type="primary" icon="el-icon-plus" size="small" @click="commoditySelection"
|
|
|
- >选择产品
|
|
|
- </el-button>
|
|
|
<el-button type="primary" size="mini" icon="el-icon-top" @click="outExport">导出</el-button>
|
|
|
<el-button class="el-icon-bottom" type="warning" size="small" @click="excelBoxfun('名称')">
|
|
|
- 按名称导入
|
|
|
+ 导入
|
|
|
</el-button>
|
|
|
- <el-button class="el-icon-bottom" type="warning" size="small" @click="excelBoxfun('code')">
|
|
|
+ <!-- <el-button class="el-icon-bottom" type="warning" size="small" @click="excelBoxfun('code')">
|
|
|
按编码导入
|
|
|
- </el-button>
|
|
|
+ </el-button> -->
|
|
|
<el-button
|
|
|
class="el-icon-document-copy"
|
|
|
:disabled="selectionList.length === 0"
|
|
|
@@ -113,155 +154,6 @@
|
|
|
</el-row>
|
|
|
</basic-container>
|
|
|
<el-dialog
|
|
|
- title="选择产品"
|
|
|
- v-if="dialogVisibles"
|
|
|
- append-to-body
|
|
|
- class="el-dialogDeep"
|
|
|
- :visible.async="dialogVisibles"
|
|
|
- width="80%"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :destroy-on-close="true"
|
|
|
- :close-on-press-escape="false"
|
|
|
- @close="dialogVisibles = false"
|
|
|
- >
|
|
|
- <el-row :style="{ height: rowHeight }">
|
|
|
- <el-col :span="5">
|
|
|
- <div>
|
|
|
- <el-scrollbar>
|
|
|
- <basic-container>
|
|
|
- <avue-tree
|
|
|
- style="height: 60vh; overflow-y: auto"
|
|
|
- :option="treeOption"
|
|
|
- :data="treeData"
|
|
|
- @node-click="nodeClick"
|
|
|
- />
|
|
|
- </basic-container>
|
|
|
- </el-scrollbar>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="19">
|
|
|
- <!-- <basic-container> -->
|
|
|
- <avue-crud
|
|
|
- :search.sync="query"
|
|
|
- :option="optionTwo"
|
|
|
- :table-loading="loading"
|
|
|
- :data="goodsListShow"
|
|
|
- ref="cruds"
|
|
|
- :reserve-selection="true"
|
|
|
- @refresh-change="refreshChangeCost"
|
|
|
- @selection-change="selectionChangeCost"
|
|
|
- @search-change="goodsSearchCost"
|
|
|
- @search-reset="goodsresetChange"
|
|
|
- :page.sync="pages"
|
|
|
- @on-load="onLoad"
|
|
|
- >
|
|
|
- <template slot="menuLeft">
|
|
|
- <el-tabs v-model="activeName" @tab-click="tabHandle">
|
|
|
- <el-tab-pane label="查询结果" name="searchList" />
|
|
|
- <el-tab-pane label="已选定数据" name="importStaging" />
|
|
|
- </el-tabs>
|
|
|
- </template>
|
|
|
- <template slot="priceOne" slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.priceOne"
|
|
|
- size="small"
|
|
|
- :controls="false"
|
|
|
- :precision="0"
|
|
|
- style="width: 100%"
|
|
|
- @change="selectChangefun($event, row)"
|
|
|
- @focus="selectFocusfun(row)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template slot="priceTwo" slot-scope="{ row }">
|
|
|
- <el-input v-model="row.priceTwo" size="small" @change="selectChangefun($event, row)"></el-input>
|
|
|
- <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
|
|
|
- </template>
|
|
|
- <!--花纹-->
|
|
|
- <template slot-scope="{ row }" slot="brandItem">
|
|
|
- <!--<el-select-->
|
|
|
- <!-- v-model="row.brandItem"-->
|
|
|
- <!-- multiple-->
|
|
|
- <!-- filterable-->
|
|
|
- <!-- remote-->
|
|
|
- <!-- reserve-keyword-->
|
|
|
- <!-- placeholder="请输入关键词"-->
|
|
|
- <!-- :remote-method="remoteMethod"-->
|
|
|
- <!-- :loading="loading">-->
|
|
|
- <!-- <el-option-->
|
|
|
- <!-- v-for="item in goodsListShow"-->
|
|
|
- <!-- :key="item.value"-->
|
|
|
- <!-- :label="item.brandItem"-->
|
|
|
- <!-- :value="item.value">-->
|
|
|
- <!-- </el-option>-->
|
|
|
- <!--</el-select>-->
|
|
|
- </template>
|
|
|
- <template slot="priceThree" slot-scope="{ row }">
|
|
|
- <el-input v-model="row.priceThree" size="small" @change="selectChangefun($event, row)"></el-input>
|
|
|
- <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
|
|
|
- </template>
|
|
|
- <template slot="priceFour" slot-scope="{ row }">
|
|
|
- <el-input v-model="row.priceFour" size="small" @change="selectChangefun($event, row)"></el-input>
|
|
|
- <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
|
|
|
- </template>
|
|
|
- <template slot="sharedCompany" slot-scope="{ row, index }">
|
|
|
- <span style="display: flex">
|
|
|
- <el-select
|
|
|
- v-model="row.sharedCompany"
|
|
|
- multiple
|
|
|
- placeholder="请选择"
|
|
|
- size="small"
|
|
|
- filterable
|
|
|
- style="width: 60%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in sharedCompanyoptions"
|
|
|
- :key="item.id"
|
|
|
- :label="item.fullName"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="small"
|
|
|
- @click.stop="importStagList(scope.row, scope.index)"
|
|
|
- v-if="activeName == 'searchList'"
|
|
|
- :disabled="goodsListSave.findIndex((item) => item.id == scope.row.id) !== -1"
|
|
|
- >选择
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- size="small"
|
|
|
- @click.stop="removeStagList(scope.row, scope.index)"
|
|
|
- v-else
|
|
|
- >移除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </avue-crud>
|
|
|
- <!-- </basic-container> -->
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogVisibles = false" :loading="saveLoading">取 消</el-button>
|
|
|
- <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading"
|
|
|
- >导入</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="importChoice"
|
|
|
- v-if="commodityData === true"
|
|
|
- :loading="saveLoading"
|
|
|
- :disabled="tableData.length !== 1"
|
|
|
- >导入</el-button
|
|
|
- >
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
- <el-dialog
|
|
|
title="添加产品"
|
|
|
v-if="excelBox"
|
|
|
append-to-body
|
|
|
@@ -329,7 +221,7 @@ import {
|
|
|
getDetail,
|
|
|
remove,
|
|
|
productLaunch,
|
|
|
- deptList, listAllP, groundingListZero
|
|
|
+ listAllP,
|
|
|
} from "@/api/basicData/listingManagement/index.js";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import { getCorpTypes } from "@/api/basicData/commodityInformation";
|
|
|
@@ -368,168 +260,6 @@ export default {
|
|
|
url: "link",
|
|
|
},
|
|
|
},
|
|
|
- optionTwo: {
|
|
|
- align: "center",
|
|
|
- height: "450",
|
|
|
- calcHeight: 80,
|
|
|
- stripe: true,
|
|
|
- tip: false,
|
|
|
- addBtn: false,
|
|
|
- searchShow: true,
|
|
|
- searchShowBtn: false,
|
|
|
- menu: true,
|
|
|
- viewBtn: false,
|
|
|
- editBtn: false,
|
|
|
- delBtn: false,
|
|
|
- menuWidth: 80,
|
|
|
- searchSpan: 8,
|
|
|
- searchMenuSpan: 24,
|
|
|
- searchMenuPosition: "right",
|
|
|
- border: true,
|
|
|
- index: true,
|
|
|
- selection: true,
|
|
|
- rowKey: "id",
|
|
|
-
|
|
|
- dialogClickModal: false,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "轮胎名称",
|
|
|
- prop: "cname",
|
|
|
- slot: true,
|
|
|
- search: true,
|
|
|
- width: 100,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "轮胎编码",
|
|
|
- prop: "code",
|
|
|
- search: true,
|
|
|
- width: 100,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "品牌",
|
|
|
- prop: "brandId",
|
|
|
- slot: true,
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- type: "select",
|
|
|
- props: {
|
|
|
- label: "cname",
|
|
|
- value: "id",
|
|
|
- },
|
|
|
- dicUrl: "/api/gubersail-admin/brandDesc/listAll?type=PP&enableOrNot=1",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "轮胎类别",
|
|
|
- prop: "goodsTypeId",
|
|
|
- addDisabled: false,
|
|
|
- search: true,
|
|
|
- type: "select",
|
|
|
- overHidden: true,
|
|
|
- props: {
|
|
|
- res: "data.records",
|
|
|
- label: "cname",
|
|
|
- value: "id",
|
|
|
- },
|
|
|
- dicUrl: "/api/gubersail-admin/goodsType/page?corpType=SP&parentId=0",
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "click",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "规格",
|
|
|
- prop: "typeno",
|
|
|
- search: false,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- label: "花纹",
|
|
|
- prop: "brandItem",
|
|
|
- slot: true,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "售价1",
|
|
|
- prop: "priceOne",
|
|
|
- slot: true,
|
|
|
- cell: false,
|
|
|
- overHidden: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "售价2",
|
|
|
- prop: "priceTwo",
|
|
|
- slot: true,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "售价3",
|
|
|
- prop: "priceThree",
|
|
|
- slot: true,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "售价4",
|
|
|
- prop: "priceFour",
|
|
|
- slot: true,
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "共享公司",
|
|
|
- prop: "sharedCompany",
|
|
|
- slot: true,
|
|
|
- type: "select",
|
|
|
- cell: "true",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "是否零库存上架",
|
|
|
- prop: "whether",
|
|
|
- search: true,
|
|
|
- type: "select",
|
|
|
- overHidden: true,
|
|
|
- clearable: false,
|
|
|
- dicData: [
|
|
|
- {
|
|
|
- label: "是",
|
|
|
- value: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "否",
|
|
|
- value: 0,
|
|
|
- },
|
|
|
- ],
|
|
|
- searchValue: 0,
|
|
|
- searchLabelWidth: 120,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
excelForm: {},
|
|
|
excelOption: {
|
|
|
submitBtn: false,
|
|
|
@@ -723,22 +453,6 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
- label: "共享公司",
|
|
|
- prop: "sharedCompany",
|
|
|
- // searchProp: "sharedCompanyList",
|
|
|
- search: true,
|
|
|
- overHidden: true,
|
|
|
- // tags: true,
|
|
|
- multiple: true, //将可选变为多选
|
|
|
- searchMultiple: false,
|
|
|
- type: "select",
|
|
|
- props: {
|
|
|
- label: "fullName",
|
|
|
- value: "id",
|
|
|
- },
|
|
|
- dicUrl: "/api/blade-system/dept/deptList",
|
|
|
- },
|
|
|
- {
|
|
|
label: "商品图片",
|
|
|
prop: "filesList",
|
|
|
hide: true,
|
|
|
@@ -828,24 +542,6 @@ export default {
|
|
|
this.onLoad(this.page, this.search);
|
|
|
},
|
|
|
async created() {
|
|
|
- isProcurement({ param: "whether.model" }).then((res) => {
|
|
|
- if (res.data.data == 1) {
|
|
|
- this.findObject(this.option.column, "brandItem").label = "规格型号1";
|
|
|
- this.findObject(this.optionTwo.column, "brandItem").label = "规格型号1";
|
|
|
- this.findObject(this.optionTwo.column, "cname").label = "名称";
|
|
|
- this.findObject(this.optionTwo.column, "code").label = "编码";
|
|
|
- this.findObject(this.optionTwo.column, "goodsTypeId").label = "类别";
|
|
|
- this.findObject(this.option.column, "explosionProof").search = false;
|
|
|
- this.findObject(this.option.column, "originalFactory").search = false;
|
|
|
- this.findObject(this.option.column, "selfRecovery").search = false;
|
|
|
- this.findObject(this.option.column, "explosionProof").hide = true;
|
|
|
- this.findObject(this.option.column, "originalFactory").hide = true;
|
|
|
- this.findObject(this.option.column, "selfRecovery").hide = true;
|
|
|
- this.findObject(this.option.column, "explosionProof").showColumn = false;
|
|
|
- this.findObject(this.option.column, "originalFactory").showColumn = false;
|
|
|
- this.findObject(this.option.column, "selfRecovery").showColumn = false;
|
|
|
- }
|
|
|
- });
|
|
|
this.key++;
|
|
|
let i = 0;
|
|
|
this.option.column.forEach((item) => {
|
|
|
@@ -862,12 +558,8 @@ export default {
|
|
|
excelBoxfun(name) {
|
|
|
if (name == "名称") {
|
|
|
this.findObject(this.excelOption.column, "excelFile").action =
|
|
|
- "/api/gubersail-admin/productLaunch/import-productLaunch";
|
|
|
- this.templateUrl = "/api/gubersail-admin/productLaunch/export-productLaunch";
|
|
|
- } else if (name == "code") {
|
|
|
- this.findObject(this.excelOption.column, "excelFile").action =
|
|
|
- "/api/gubersail-admin/productLaunch/import-productLaunch-code";
|
|
|
- this.templateUrl = "/api/gubersail-admin/productLaunch/export-productLaunch-code";
|
|
|
+ "/api/gubersail-admin/tireStockDesc/importTireStockDesc";
|
|
|
+ this.templateUrl = "/api/gubersail-admin/tireStockDesc/export-productLaunch";
|
|
|
}
|
|
|
this.excelBox = true;
|
|
|
},
|
|
|
@@ -889,7 +581,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
const routeData = this.$router.resolve({
|
|
|
- path: "/api/gubersail-admin/productLaunch/exportList", //跳转目标窗口的地址
|
|
|
+ path: "/api/gubersail-admin/tireStockDesc/stockExport", //跳转目标窗口的地址
|
|
|
query: {
|
|
|
...config.params, //括号内是要传递给新窗口的参数
|
|
|
identification: this.url,
|
|
|
@@ -1121,18 +813,42 @@ export default {
|
|
|
this.query = this.$options.data().query;
|
|
|
},
|
|
|
check(row) {
|
|
|
+ console.log(row.upAndDownShelves);
|
|
|
if (row.upAndDownShelves == 1) {
|
|
|
if (row.priceOne == 0 || row.priceTwo == 0) {
|
|
|
row.upAndDownShelves = 0;
|
|
|
return this.$message.error("请维护所有售价");
|
|
|
}
|
|
|
+ this.loading = true;
|
|
|
+ productLaunch([row])
|
|
|
+ .then((res) => {
|
|
|
+ batchOperationProductLaunch({
|
|
|
+ flag: row.upAndDownShelves,
|
|
|
+ ids: row.id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.onLoad(this.page, this.search);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.loading = true;
|
|
|
+ batchOperationProductLaunch({
|
|
|
+ flag: row.upAndDownShelves,
|
|
|
+ ids: row.id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.onLoad(this.page, this.search);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
}
|
|
|
- batchOperationProductLaunch({
|
|
|
- flag: row.upAndDownShelves,
|
|
|
- ids: row.id,
|
|
|
- }).then((res) => {
|
|
|
- this.onLoad(this.page, this.search);
|
|
|
- });
|
|
|
},
|
|
|
// 确认导入
|
|
|
importGoods() {
|
|
|
@@ -1171,7 +887,6 @@ export default {
|
|
|
},
|
|
|
//导入商品触发
|
|
|
importChoice() {
|
|
|
- return;
|
|
|
// this.contactsData = this.contactsData.concat(this.tableData)
|
|
|
if (this.tableData.length === 1) {
|
|
|
this.goodsShowData[this.choiceIndexT].cname = this.tableData[0].cname;
|
|
|
@@ -1303,25 +1018,6 @@ export default {
|
|
|
.finally(() => {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
- this.loading = true;
|
|
|
-
|
|
|
- groundingListZero({
|
|
|
- whether: params.whether ? params.whether : 0,
|
|
|
- ...params,
|
|
|
- whetherIntegral: "0",
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- this.goodsListShow = res.data.data.records;
|
|
|
- this.data = res.data.data.records;
|
|
|
- this.pages.total = res.data.data.total;
|
|
|
- this.loading = false;
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- deptList().then((res) => {
|
|
|
- this.sharedCompanyoptions = res.data.data;
|
|
|
- });
|
|
|
},
|
|
|
//点击可用库存打开
|
|
|
storeInventoryOpen(row) {
|